Questions tagged [node-html-pdf]
64 questions
11
votes
2 answers
html-pdf converters that are compatible with css flex-box
I am trying to put together a pdf from html template code. The problem I am running into is that the html-pdf converters I have tried don't format the css properly, I guess they are not yet compatible with css flex-box.
I have looked at two…

JustAnotherJohnDoe
- 167
- 8
11
votes
3 answers
Node html-pdf Auto configuration failed
I have a simple project using html-pdf package, I'd like to make a simple pdf file with this code :
...
pdf.create(html).toStream(function(err, stream){
if (err) reject(err) ;
else …

Bilel-Zheni
- 1,202
- 1
- 6
- 10
8
votes
0 answers
"ERROR Error: write EPIPE" on AWS Lambda with html-pdf
I coded a NodeJS class which is supposed to create a PDF file out of a html string. The class is deployed on AWS Lambda. It is based on html-pdf (https://www.npmjs.com/package/html-pdf).
const {readFileSync} = require('fs');
const pdf =…

juliusphysics
- 163
- 1
- 6
7
votes
2 answers
node-html-pdf businesscard example on Ubuntu
I am trying to use node-html-pdf (https://github.com/marcbachmann/node-html-pdf) node module on Ubuntu 16.04 and have started with the given businesscard example.
Unfortunately I was not able to generate this PDF.
First of all, I installed the…

Aleks
- 5,674
- 1
- 28
- 54
5
votes
1 answer
html-pdf: Failed to load PhantomJS module. You have to set the path to the PhantomJS binary using 'options.phantomPath' when using aws ec2
i have EC2 instance running in aws. after i deploy to the server. all workking fine until i check html-pdf. everytime i hit the api to create pdf, i check the log and the result is:
i already try to unninstall html pdf using npm uninstall html-pdf…

Muhammad Yusuf Malik
- 117
- 1
- 1
- 8
4
votes
1 answer
How to record page numbers html-pdf node.js?
I'm using html-pdf for node.js to create a pdf from html. Built into html-pdf is the ability to add page numbers to the footers. I want to record those page numbers somehow, maybe in an array. This is my current code:
let index = 0;
let myIndex =…

T.J. Webaholic
- 51
- 1
- 4
4
votes
1 answer
Can't install or run html-pdf on nodejs
I have a application that generates PDF's using html-pdf on nodejs, but after I made a deploy to the production server, I'm not able to generate. It gives this error:
'html-pdf: Failed to load PhantomJS module. You have to set the path
to the…

lufizi
- 403
- 2
- 7
- 14
4
votes
3 answers
How to add watermark in pdf using nodejs?
I generated pdf through nodejs. i want to add watermark to this generated pdf. I used dynamic-html-pdf plugins in my code. If there is any options for adding watermark in dynamic-html-pdf. Here i display my sample code here.
var…

Ram
- 49
- 1
- 1
- 6
3
votes
1 answer
How can I generate a PDF with custom fonts using AWS Lambda?
I have an AWS Lambda function that generates PDFs using the html-pdf library with custom fonts.
At first, I imported my fonts externally from Google Fonts, but then the PDF's size has enlarged by ten times.
So I tried to import my fonts locally…

Eliya Cohen
- 10,716
- 13
- 59
- 116
2
votes
2 answers
Receiving error: html-pdf: PDF generation timeout. Phantom.js script did not exit. within Firebase Cloud Functions
I'm building out a firebase function that uses the html-pdf package (which uses PhantomJS). The function works fine on my local machine, but whenever I deploy the function on Firebase, I get the following error:
Error: html-pdf: PDF generation…

Deep
- 223
- 3
- 12
2
votes
0 answers
NodeJs Buffer is not attached to Nodemailer file
Currently on my project I am dealing with a situation and I feel it is a problem of syntax but I am not getting the right answer and kinda feeling stressed and tilt over it for the last three days.
I am using three libraries NodeJs,…

thelittlemaster
- 157
- 1
- 8
2
votes
0 answers
node-html-pdf header and footer start from second page to last page
I am using node-html-pdf to convert the html to PDF.The conversions are really good.But the problem is to add header and footer in the PDF pages.Actually i need Header and footer starting from second page to last page..is there any way to possible…

user7075128
- 21
- 1
- 5
2
votes
1 answer
How do I install fontconfig on AWS lambda?
This is a continuation of How do you install phantomjs on AWS lambda? I've figured out how to get phantomjs running on an aws lambda, but when I use it to generate pdfs (using the html-pdf nodejs library), the content is missing text. If I create a…

Daniel Kaplan
- 62,768
- 50
- 234
- 356
2
votes
2 answers
How do I install fonts in the IBM Cloud nodejs runtime? (cloud foundry)
I use the html-pdf component to generate pdf reports in my nodejs app and in order to properly embed custom fonts in the pdf document, these fonts must be installed in the server, in this case, in the IBM Cloud nodejs runtime. How do I do that?

Leo
- 751
- 4
- 29
2
votes
1 answer
How can I add repeating table headers after page breaks using node-html-pdf?
I'm using node-html-pdf to generate pdfs. It renders HTML then uses phantom js to convert to pdf.
I have several tables that overrun a single page in the pdf, and I'd like the table header to repeat on each new page.
From what I can tell, this…

rbristow
- 183
- 2
- 15