Webview.Capture with scrolling

296 views
Skip to first unread message

Alan Hendry

unread,
Aug 24, 2020, 7:26:37 AM8/24/20
to DroidScript
All,

I got a direct email with an attached SPK (but no screen shots)

   To me it seems like Webview.Capture only captures the area of the website, which was          visible when the url was loaded. When I don't scroll it works perfectly, but when I scroll          down a little bit and capture a picture, the upper half becomes white (see picture and            screenshot below). When I scroll all the way down, the resulting picture is completely            white. I get this behaviour with every website.
    How can I capture a picture, that shows what's displayed on the screen, as you would            normally expect? Help, please!

If WebView.Capture is misbehaving then the official team need to look at it.
You could try WebView.Print (Prints current page via builtin android printer dialog).

Regards, ah

Erpel1

unread,
Aug 31, 2020, 1:01:40 PM8/31/20
to DroidScript
Thanks for your answer. Sorry, that I react this late, I probably overlooked it.
Here are the screenshots again, this time attached as a file.
(screenshot.png - a normal screenshot of the website as it is displayed in the app;
test.png - the resulting file of Webview.Capture)
I really think its a bug. I even tried it on a different phone and the results were the same.
Webview.Print does not work in my case, because it requires user interaction and only saves to a pdf.
I would like to simplify the process of taking a screenshot and sharing it with one button press (using app.SendFile).
Can anyone reproduce this misbehaving? (you can use the spk below)
test.png
WebCapture.spk
screenshot.jpg

Fatih Elitas

unread,
Apr 24, 2021, 5:43:14 AM4/24/21
to DroidScript

i am using android 10.
web captur doesn't work.
31 Ağustos 2020 Pazartesi tarihinde saat 19:01:40 UTC+2 itibarıyla Erpel1 şunları yazdı:

Alan Hendry

unread,
Apr 26, 2021, 10:42:15 AM4/26/21
to DroidScript
Hi,
It should be web.Capture(path-and-filename).
On Android 10 you probably have scoped storage which restricts what folders you can write to,
see other posts on this topic.
In my tests you can write to the folders from GetPrivateFolder with option External, and GetSpecialFolder.
Regards, ah

Reply all
Reply to author
Forward
0 new messages