I'm building an app using Cordova and I used this Plug-in to print the content of an HTML page. I would try to print this to a PDF, not using AirPrint printer. How can I do it (also by modifying .m and .h files in the Plugin Folder)? Here's the plugin I've used: https://github.com/phonegap/phonegap-plugins/tree/master/iPhone/PrintPlugin Thank you!
var html = document.getElementById("printHTML").innerHTML;
window.plugins.printPlugin.print(
html,
function(result) {
alert("Printing successful");
},
function(result) {
if (!result.available){
alert("Printing is not available");
}
else{
//Localised error description
alert(result.error);
}
});