npm i --save nativescript-html2pdf
- Version: 2.0.0
- GitHub: https://github.com/radu2501/nativescript-html2pdf
- NPM: https://www.npmjs.com/package/nativescript-html2pdf
- Downloads:
- Last Day: 0
- Last Week: 0
- Last Month: 0
nativescript-html2pdf
Allows easy conversion from HTML to PDF files. Currently, only Android is supported.
Installation
tns plugin install nativescript-html2pdf
Usage
import { html2PdfFile } from 'nativescript-html2pdf';
let myHtml: string = '<p>Hello World</p>';
let pdfPath: string = 'fs.knownFolders.documents().getFile('myPdf.pdf').path;
html2PdfFile(myHtml, pdfPath);
//Your PDF file is now available at the specified path.