0

Cordova を使用してアプリを作成しており、このプラグインを使用して HTML ページのコンテンツを印刷しました。AirPrintプリンターを使用せずに、これをPDFに印刷しようとします。どうすればそれを行うことができますか (また、プラグイン フォルダー内の .m および .h ファイルを変更することによって)? 使用したプラグインは次のとおりです: https://github.com/phonegap/phonegap-plugins/tree/master/iPhone/PrintPlugin ありがとうございます!

 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);
                                 }
                                 });
4

1 に答える 1