1

I wrote a cross-platform application using node-webkit. I have the needs to generate PDF from HTML+CSS and to package and distribute my application to Win, Linux and Mac.

I have known some nice libraries such as, PhantomJS, wkhtmltopdf can do this stuff. But I don't know how to integrate these libs into my node-webkit and works cross-platforms?

Thx for any idea.

ppn029012
  • 580
  • 1
  • 6
  • 20
  • Possible duplicate of: http://stackoverflow.com/questions/14552112/html-to-pdf-with-node-js?lq=1 – r0- Aug 10 '14 at 17:02
  • @staaar they focus on how to generate pdf. My question is mainly on how to integrate pdf generation lib(e.g. wkhtmltopdf, phantomjs) to node-webkit. – ppn029012 Aug 10 '14 at 17:25

1 Answers1

0

You can try PDFKit

It's JavaScript so you don't need any external libs, just install it via npm.

Otherwise there is wkhtmltopdf npm package

mallendeo
  • 1,507
  • 1
  • 9
  • 13
  • 1
    PDFKit can't transform a HTML to PDF. Also, wkhtmltopdf depends on the installed wkhtmltopdf, so it is difficult to package and distribute it with node-webkit. – ppn029012 Aug 12 '14 at 14:26