Android Question trasform webview content to pdf or image

Roberto P.

Well-Known Member
Licensed User
Longtime User
How can trasform the content of a webview in a pdf or image file?
thanks
 

Roberto P.

Well-Known Member
Licensed User
Longtime User
Done and it works. I attach the code, just in case someone.
thanks
It would also need to generate a pdf file! There is no other way to do it?
 
Upvote 0

Roberto P.

Well-Known Member
Licensed User
Longtime User
how to do it?
into the bitmap can not find functions to convert image to pdf !?
thanks
 
Upvote 0

Roberto P.

Well-Known Member
Licensed User
Longtime User
Hi Erel,
I'm sorry but I can not change the image, derived from html in a PDF format. That picture of the code and error.
Is it possible that there is a way to print a html without having to picture?

thanks again
 

Attachments

  • pdf image.png
    pdf image.png
    296.4 KB · Views: 255
Upvote 0

Roberto P.

Well-Known Member
Licensed User
Longtime User
I also tried setting the size parameter to 10 bmp.WriteToStream(out, 10, "PNG"), but it does not solve the problem!
 
Upvote 0

Roberto P.

Well-Known Member
Licensed User
Longtime User
the file has a size of 50kb. If you'd like to send you the file generated by HTML.
 
Upvote 0

Roberto P.

Well-Known Member
Licensed User
Longtime User
Erel ok, I reduce the quality here: bmp.WriteToStream (out 10, "PNG")? or tell me where to change.
thanks
 
Upvote 0
Top