Open AsrarMemon opened 6 years ago
i add nativescript-html2pdf module using
tns plugin install nativescript-html2pdf
this command.. and code
import { Component,ElementRef , ViewChild} from "@angular/core"; import { html2PdfFile } from 'nativescript-html2pdf/html2pdf''; import * as fs from "tns-core-modules/file-system"; @Component({ selector: "ns-app", templateUrl: "app.component.html", }) export class AppComponent { constructor() { let myHtml: string = '<p>Hello World</p>'; let pdfPath: string = fs.knownFolders.documents().getFile('myPdf.pdf').path; html2PdfFile(myHtml, pdfPath); } }
get error
Error: Unknown error. Cannot get error message
can you please help me how to use this plugin
i add nativescript-html2pdf module using
this command.. and code
get error
can you please help me how to use this plugin