ios - Print to PDF via AirPrint -


i'm building app using cordova , used plug-in print content of html page. try print pdf, not using airprint printer. how can (also modifying .m , .h files in plugin folder)? here's 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 not available");                                  }                                  else{                                  //localised error description                                  alert(result.error);                                  }                                  }); 

let me know if find better answer looking same solution. in meantime, have done open browser in new window (skip plugin together) , run html-document through pdfcrowd.com. use airprint directly browser.


Comments