cordova-pdf-generator
Advanced tools
Comparing version 1.0.13 to 1.0.14
{ | ||
"name": "cordova-pdf-generator", | ||
"version": "1.0.13", | ||
"version": "1.0.14", | ||
"description": "is a HTML to PDF (offline) Generator.", | ||
@@ -18,3 +18,3 @@ "cordova": { | ||
"ecosystem:cordova", | ||
"cordova-ios", | ||
"cordova-ios", | ||
"cordova-android" | ||
@@ -21,0 +21,0 @@ ], |
@@ -10,3 +10,3 @@ # cordova-pdf-generator | ||
- Generates a PDF document using a URL or HTML raw data. for better results with raw HTML the CSS should be available for the device. | ||
- Generates a PDF document using a URL or HTML. | ||
- Open-with menu, open the context menu and (push to cloud, print, save, mail, etc...). | ||
@@ -19,3 +19,3 @@ - Return the Base64 file representation back, so you can upload the file to a server (IOS only). | ||
* Android | ||
* iOS | ||
* iOS | ||
@@ -104,3 +104,3 @@ ## Installing the easy way (Cordova CLI) | ||
## Ionic/Angular 2 Example: | ||
## Ionic/Angular 2 Example: | ||
@@ -112,3 +112,3 @@ ```js | ||
declare var cordova:any; //global; | ||
declare var cordova:any; //global; | ||
@@ -136,7 +136,7 @@ @Component({ | ||
} | ||
} | ||
``` | ||
@@ -154,14 +154,21 @@ | ||
- data: here you sent raw HTML. | ||
- url: url location of the webpage. | ||
- documentSize: for now only support "A4" and "A3". | ||
- landscape: portrait or landscape. | ||
- type: | ||
Due to the different way each platform generates the PDF, options not supported in the platform are just silently ignored. | ||
- Android/iOS | ||
- data: here you sent raw HTML. | ||
- url: url location of the webpage. | ||
- iOS | ||
- documentSize: for now only support "A4" and "A3". | ||
- landscape: portrait or landscape. | ||
- success callback: only expect one parameter base64 in case you choose 'base64' type option or boolean in case you to share. | ||
- type: | ||
- *base64* give you the pdf in Base64 format. | ||
- *share* opens IOS menu with all options available, this came handy when you want IOS take ownership of the Doc. | ||
- *share* opens IOS menu with all options available, this came handy when you want IOS take ownership of the generated document.. | ||
- success callback: only expect one parameter base64 in case you choose 'base64' type option or boolean in case you to share. | ||
- | ||
- Android | ||
- fileName: saved file name | ||
- failure callback: receive error information about what going wrong, for now is just raw exception so i need to improve this. | ||
@@ -178,3 +185,3 @@ | ||
cordova run ios | ||
cordova run ios | ||
cordova run android | ||
@@ -181,0 +188,0 @@ |
@@ -13,5 +13,6 @@ /*global cordova, module*/ | ||
var type = options.type || "base64"; | ||
var fileName = options.fileName || "default"; | ||
cordova.exec(successCallback, errorCallback, "PDFService", "htmlToPDF", [ url, data, docSize, landscape, type ]); | ||
cordova.exec(successCallback, errorCallback, "PDFService", "htmlToPDF", [ url, data, docSize, landscape, type, fileName ]); | ||
} | ||
}; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
60440
13
189