Android Example WebViewSharePDF

There are some examples on this forum for
1. saving Webview content as Bitmap,
2. creating PDF file using Printing library and
3. opening or sharing the PDF file to WhatsApp using FileProvider library

but I don't see combination of these code
so I have made a lot of trials and errors and
finally come out with a working example.

GitHub: https://github.com/pyhoon/WebViewSharePDF-B4A
 
Last edited:

aeric

Expert
Licensed User
Longtime User
Project updated to use
B4X:
Dim bmp As B4XBitmap = WebView1.CaptureBitmap
which has less line of code.
 

AlfaizDev

Well-Known Member
Licensed User
There are some examples on this forum for
1. saving Webview content as Bitmap,
2. creating PDF file using Printing library and
3. opening or sharing the PDF file to WhatsApp using FileProvider library

but I don't see combination of these code
so I have made a lot of trials and errors and
finally come out with a working example.

GitHub: https://github.com/pyhoon/WebViewSharePDF-B4A
Thanks aeric but there is an important issue: If the web view content is large, the
 
Last edited:

aeric

Expert
Licensed User
Longtime User
Thanks to aeric, I think I've reached this point, but there's an important issue: if the content of the webview is large, the PDF file should be divided into pages.
You should post your question in the question forum. This is example forum.
 
Top