In my application I have one html template which brings dynamic data from DB. I need to convert that html file(template) to PDF. Is there any package to convert the raw html to PDF in node.js? I go through with pdfcrowd and livedocx. Both using some webservices for conversion which does not suits for my specification. please suggest some package for converting HTML to PDF in local machine..?
Asked
Active
Viewed 1,428 times
1 Answers
-1
Go through this link..
Here u can convert HTML file to PDF or HTML content to PDF
import NDHTMLtoPDF.h
and NDHTMLtoPDF.m
from above source link
pass HTML file path to generate PDF here..
NSURL *targetURL = [NSURL fileURLWithPath:HTMLPath];
Converting HTML to PDF
self.PDFCreator = [NDHTMLtoPDF createPDFWithURL:targetURL
pathForPDF:[[NSString stringWithFormat:@"~/Documents/Sample.pdf"] stringByExpandingTildeInPath]
delegate:self
pageSize:kPaperSizeA4
margins:UIEdgeInsetsMake(20, 5, 90, 5)];
pass HTML Content to generate PDF here..
NSString *str_PDFName_path = [NSString stringWithFormat:@"~/Documents/Sample.pdf"];
self.PDFCreator = [NDHTMLtoPDF createPDFWithHTML:str_HTML pathForPDF:[str_PDFName_path stringByExpandingTildeInPath] delegate:self pageSize:kPaperSizeA4 margins:UIEdgeInsetsMake(20, 5, 90, 5)];

Hulk1991
- 3,079
- 13
- 31
- 46

Lokesh Chowdary
- 816
- 5
- 22
-
It seems to for some other app. i need it in node. – Aarthi Chandrasekaran Jun 24 '13 at 10:11
-
what is mean by node? can u post the code what ur doing exactly? – Lokesh Chowdary Jun 24 '13 at 10:40