cesarvr / pdf-generator

Cordova plugin to generate pdf in the client-side
MIT License
107 stars 61 forks source link

Any plans on making this compatible with PhoneGap Build? #4

Closed shawnlehner closed 7 years ago

shawnlehner commented 7 years ago

I have a PhoneGap Build app I would love to use this with. Do you have a test version, or any plans to make, a version compatible with PGB?

Edit: I just tried this with PhoneGap Build as a plugin and it appeared to build the app correctly. However, I copy and pasted your share example from the site and when a run it I get a success callback (with a success bool as the argument) but nothing happens. I never get the share menu. Any ideas why this might be? I have pasted the exact test code I used below:

pdf.htmlToPDF({
            data: "<html> <h1>  Hello World  </h1> </html>",
            documentSize: "A4",
            landscape: "portrait",
            type: "share" //use share to open the open-with-menu. 
        }, function(success) {
            alert('htmlToPdf: ' + success);
        }, function(error) {
            alert('htmlToPdf FAILURE: ' + error);
        });
cesarvr commented 7 years ago

did you try that example in ios device ?. Right now android is not supported :(

shawnlehner commented 7 years ago

Yes, I was testing on an iPad Mini (4th Generation) running iOS 9.1.

As my notes state, it seemed to build just fine but after I executed the function I never received any callbacks.

cesarvr commented 7 years ago

I find the problem, this happen because the iPad use a cloud for the menu and was crashing, i put a workaround for now, later will implement something to position the cloud in the screen.

the workaround is here 0.9.6.