jeffleus/ionic-pdf

in android device not showing anything just blank white screen

Closed this issue · 6 comments

i have this problem in android device not show

screenshot 45

It looks like you are running the Android version in an emulator? Is that correct? Can you browse your emulator file system? If so, please browse to the location listed in the console for the file...

file:///storage/emulated/0/rptSample.pdf

Then, try and open the file from your dev machine to check on the pdf. If the pdf is blank, then we know that the problem is in the pdf creation. But if the file is missing, then the problem is in the file plugin not working correctly. But you are not getting cordova or plugin errors so my guess is something in the pdf definition file.

I never ran this in an Android emulator and haven't done much in Android. So, I will pull the Android SDK today and test it myself. Then, report back.

i use fileopener2 then work successfully..

Started to leave a comment yesterday, but I don't think it got posted. I know you followed up w/questions about editing the content of the pdf. Still need help w/ that?

yes, i want convert html to pdf, pdfmake build manual. so think convert
html to canvas use html2canvas.js so i can convert with pdfmake make as
image url, but it's not woking yet. i appreciate if you want help me.
thank's a lot

On Sat, Jan 23, 2016 at 1:24 AM, jeffleus notifications@github.com wrote:

Started to leave a comment yesterday, but I don't think it got posted. I
know you followed up w/questions about editing the content of the pdf.
Still need help w/ that?


Reply to this email directly or view it on GitHub
#3 (comment).

That's a lot different than my approach. I wanted the ability to generate my reports in blocks where I declared the content and render this directly to HTML. Using the canvas to render HTML as an image and then putting the image into a pdf is a longer way around the problem. I think it suffers from some issues in performance as well as the fidelity of the final rendered pdf. At least that is what I experienced in my initial testing.

But I do know that pdfmake can use the imageURL for placing images in the pdf. Do you have a viable imageURL from your canvas element that you can log to the console? have you seen the pdfMake.org example for using images? link to examples

@sabardotnet since the original issue was resolved when you implemented the fileopener2, I will consider this issue closed. If you would like to continue addressing the issue of html2canvas conversion and image work maybe open a new issue.