Roberto P. Well-Known Member Licensed User Longtime User Oct 26, 2014 #1 How can trasform the content of a webview in a pdf or image file? thanks
Erel B4X founder Staff member Licensed User Longtime User Oct 27, 2014 #2 You can use WebView.CaptureBitmap to convert it to a bitmap. Upvote 0
Roberto P. Well-Known Member Licensed User Longtime User Oct 27, 2014 #3 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
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?
Erel B4X founder Staff member Licensed User Longtime User Oct 27, 2014 #4 You will need to convert the image to a pdf file. Upvote 0
Roberto P. Well-Known Member Licensed User Longtime User Oct 27, 2014 #5 how to do it? into the bitmap can not find functions to convert image to pdf !? thanks Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Oct 27, 2014 #6 There are several related libraries which you should check: http://www.b4x.com/android/forum/pages/results/?query=pdf&page=1&prefix=1 Upvote 0
There are several related libraries which you should check: http://www.b4x.com/android/forum/pages/results/?query=pdf&page=1&prefix=1
Roberto P. Well-Known Member Licensed User Longtime User Oct 29, 2014 #7 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 296.4 KB · Views: 259 Upvote 0
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
Erel B4X founder Staff member Licensed User Longtime User Oct 30, 2014 #8 Roberto P. said: Is it possible that there is a way to print a html without having to picture? Click to expand... Not that I know of. Try to decrease the bitmap size. It will solve the memory issue. Upvote 0
Roberto P. said: Is it possible that there is a way to print a html without having to picture? Click to expand... Not that I know of. Try to decrease the bitmap size. It will solve the memory issue.
Roberto P. Well-Known Member Licensed User Longtime User Oct 30, 2014 #9 I also tried setting the size parameter to 10 bmp.WriteToStream(out, 10, "PNG"), but it does not solve the problem! Upvote 0
I also tried setting the size parameter to 10 bmp.WriteToStream(out, 10, "PNG"), but it does not solve the problem!
Erel B4X founder Staff member Licensed User Longtime User Oct 30, 2014 #10 The file you are creating has nothing to do with the PDF. You need to decrease the size of BMP. Upvote 0
Roberto P. Well-Known Member Licensed User Longtime User Oct 30, 2014 #11 the file has a size of 50kb. If you'd like to send you the file generated by HTML. Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Oct 30, 2014 #12 The file size is not relevant. Try to do what I suggested. I have no further suggestions... Upvote 0
Roberto P. Well-Known Member Licensed User Longtime User Oct 30, 2014 #13 Erel ok, I reduce the quality here: bmp.WriteToStream (out 10, "PNG")? or tell me where to change. thanks Upvote 0
Erel ok, I reduce the quality here: bmp.WriteToStream (out 10, "PNG")? or tell me where to change. thanks