node-wkhtml | Convert html to PDF or PNG | Document Editor library
kandi X-RAY | node-wkhtml Summary
kandi X-RAY | node-wkhtml Summary
Convert html to PDF or PNG format using the webkit rendering engine, and qt.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of node-wkhtml
node-wkhtml Key Features
node-wkhtml Examples and Code Snippets
Community Discussions
Trending Discussions on node-wkhtml
QUESTION
I'm trying to generate a pdf file from html and would like to know the best way. I've tried html-pdf, pdf-puppeteer, node-wkhtmltopdf.
The first 2 crash the server when used giving 0 errors on a Digital Ocean Droplet using an Ubuntu image. They work fine on my computer (MAC OS), but fail to where on the server. When I tried node-wkhtmltopdf, which looked promising:
...ANSWER
Answered 2018-Oct-19 at 14:56Found the solution, the qt is broken for the version which is installed using 'apt-get install' on ubuntu.
So, I installed wkhtmltopdf from the git repository and it worked fine.
QUESTION
I am trying to convert HTML into a PDF, but the HTML is generated dynamically and never actually served up. I've been using node-html-pdf but it has some issues I've found difficult to overcome (known, long-standing bugs).
I thought I'd give wkhtmltopdf (via node-wkhtmltopdf) a try, but it expects a URL.
My current thought (which isn't great) is to expose the HTML via express since I'm already exposing a REST API with this server. While doing this isn't rocket science, it seems pretty complicated to just hand something content from memory.
Does anyone have a good pattern for using wkhtmltopdf from node with HTML held in memory?
...ANSWER
Answered 2017-Mar-03 at 19:10Apparently there are two npm packages for this. If you google 'node wkhtmltopdf' you are likely to run into this one first: node-wkhtmltopdf
...but if you look further you'll find: wkhtmltopdf which is seems more actively maintained and has documentation explaining how to use it directly, as mentioned by @Ben Fortune in the comments above.
Using the correct package, it seems well explained how to use HTML directly.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install node-wkhtml
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page