Open uselessai opened 7 years ago
take a look at this example example, when you generate the PDF en iOS you can pass the control to the user to decide what to do he can send it by mail, open it, etc... if you have it in base64 you can use your own API to do that.
Nope.. It doesnt work for me.. I have a Xiaomi Redmi Note 3. Android version 6.0.1
Ionic version 3 / Angular 4
Code
cordova.plugins.pdf.htmlToPDF({ url: "http://www.google.es", documentSize: "A4", landscape: "portrait", type: "share" }, (sucess) => console.log('sucess: ', sucess), (error) => console.log('error:', error)); });
It doesn't appearance this options menu.. when I click in "download pdf".. it only ask me the name and where I want to download it.. and nothing else.. no base64 generator option.. nothing at all..
Hey @detolox I've just been working on that. It has been broken in Android until today.
You'll have to grab some bleeding edge stuff. Because Android base64 hasn't need working before now. I'm not sure if it is in master yet.
https://github.com/cesarvr/pdf-generator/issues/9 is solving base64 and the PDF via email sample code is also linked in there.
In the documentation says that is posible to send the pdf via email.. but you don't say how..