I am trying to generate a pdf file to share through the context menu, but nothing happens when I test it (at the browser or device) by calling the function share_pdf() below:
function share_pdf() {
let options = {
documentSize: 'A4',
type: 'share'
}
pdf.fromData( \'\<html>\<h1>Hello World\<\/h1>\<\/html>\', options)
.then((stats)=> console.log('status', stats) ) // ok..., ok if it was able to handle the file to the OS.
.catch((err)=>console.err(err))
}
I am not calling it from eventListener, but directly from an onclick action from a button on an html page.
But, same thing happens with the sample code available here (which uses eventListener).
My cordova version is 9.0.0
Only thing is that I am serving the app from phonegap.
When I run at the browser I get the following messages:
Error: exec proxy not found for :: PDFService :: htmlToPDF
master.html:124 Missing Command Error
That looks like the plugin is not installed correctly. You may need to reinstall the plugin and make sure that is included in your APK (Android) or IPA (iOS).
Hi,
I am trying to generate a pdf file to share through the context menu, but nothing happens when I test it (at the browser or device) by calling the function share_pdf() below:
function share_pdf() { let options = { documentSize: 'A4', type: 'share' } pdf.fromData( \'\<html>\<h1>Hello World\<\/h1>\<\/html>\', options) .then((stats)=> console.log('status', stats) ) // ok..., ok if it was able to handle the file to the OS.
.catch((err)=>console.err(err)) }
I am not calling it from eventListener, but directly from an onclick action from a button on an html page.
But, same thing happens with the sample code available here (which uses eventListener).
My cordova version is 9.0.0
Only thing is that I am serving the app from phonegap.
When I run at the browser I get the following messages:
Error: exec proxy not found for :: PDFService :: htmlToPDF master.html:124 Missing Command Error
Am I missing something here?
Thanks a lot! Pedro