Can please suggest a working plugin to view PDF in iOS Cordova based application.
I have tried many of PDF related plugins:
https://github.com/siegfriedbolz/cordova-plugin-file-opener2.git
https://github.com/RandyMcMillan/PDFViewer
but of no use..My application stopped at loading.
Lastly with I have tried with pebois/phonegap-plugin-PDFViewer:
I have installed using :
"cordova plugin add com.lesfrancschatons.cordova.plugins.pdfreader"
In index.html:
function onDeviceReady()
{
PDFViewer.open("file://sample.pdf","sample.pdf", function (msg) {
console.log(msg);//
});
}
//error on pdfviewer.open method
Can any one tell me what is the issue in above method.
And how can we provide the path for sample.pdf (Hope I am giving any wrong path)
Or if any PDF plugins for iOS Cordova
I always use a "homemade" plugin made by me; it get the PDF on a specific URL by a single GET.
PDFUtilities.m
PDFUtilities.h
Remember to add in your config.xml
You can call the plugin method on your Javascript file just like this: