Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cordova-pdf-generator

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-pdf-generator - npm Package Compare versions

Comparing version 1.0.13 to 1.0.14

4

package.json
{
"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 @@

#### pdf
#### PDF
- 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc