Questions tagged [html-pdf]
167 questions
0
votes
0 answers
What will be the phantom path in options while using html-pdf in elastic beanstalk in node
In local, I am using ./node_modules/html-pdf/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs phantom path but it is not working in elastic beanstalk

Karan
- 1
- 1
0
votes
2 answers
Print webpage with canvas content
I have a tool that allows you to assemble reports generated with fabricjs.
We are trying to convert those reports that currently work on the web to pdf, using the sejda.com tool
The problem with sejda is that it has a generation time limit of 1:50…

Pedro Jose
- 442
- 3
- 19
0
votes
1 answer
Error on nodejs app running on heroku. (html-pdf)
I am using library html-pdf to render pdf and then send the file with email.
It works like a charm on localhost
pdf.create(html, {format: 'A4'}).toFile(`./public/invoices/${order.id}.pdf`, (err, res) => {
if (err) return…

Vojir
- 43
- 4
0
votes
1 answer
html-pdf generating broken pdf
I am using html-pdf in nodejs cloud functions for generating pdf. The package is working properly when I am running the cloud functions locally. After deploying the cloud functions in firebase cloud function for generating pdf is generating broken…

Ariyan Ashfaque
- 119
- 6
0
votes
0 answers
Rendering IMAGE in EJS to CONVERT TO PDF
I'm creating an HTML via EJS and npm HTML-PDF, to convert to PDF, using NODEJS and MYSQL to pull data from the database.
However, I am not able to display the image, the image is hosted on the same server but in the REACTJS folder,…

Carlos Eduardo
- 25
- 7
0
votes
1 answer
SSL Error when using html-pdf in a Render instance
I'm using the html-pdf library to generate PDF files from HTML, and it's working great on my machine. However, when attempting to use this on an instance of the project hosted on Render, I'm getting the following error:
Auto configuration…

Robert May
- 799
- 6
- 13
0
votes
1 answer
Error: spawn ENOENT html-pdf nodejs in server
I have a problem when create pdf using html-pdf. In my local running well but in server can't work.
my code below:
const fileName = './public/offering/' + dayjs().format('YYYY-MM-DD') + '-' + name[0] + '.pdf';
const htmlToPdfOptions = {
type:…

zainal abidin
- 363
- 1
- 3
- 12
0
votes
1 answer
Is it possible to embed an iframe using html-pdf on Express?
I have the following file as a html just for testing purposes:
Page Header
test
0
votes
0 answers
node.js html-pdf dont load external files from absolute path
In my app external files provided by absolute path are not loaded properly, but in my template its all good.
html-pdf v.2.2.0
https://www.npmjs.com/package/html-pdf/v/2.2.0
I provide a href to my styles template, but they are not loading during…

radaxter
- 29
- 4
0
votes
2 answers
Mocking html-pdf using Jest
I am using the html-pdf package in my nodejs code (not in Typescript). Now, this package has a create() function which is chained with the toBuffer() function. I am unit testing my code using Jest and want to mock this call…

Abhijeet Kharkar
- 73
- 1
- 12
0
votes
2 answers
How to wait until a pdf is generated Javascript
I am using node html-pdf to generate a pdf and nodemailer to automatically send an email containing the pdf every minute using node-cron as demonstrated in the following code:
cron.schedule('* * * * *', () => {
// function to generate scan…

NicLovin
- 317
- 3
- 20
0
votes
1 answer
Node html-pdf not showing encoded image urls in PDF
I am using html-pdf node package to generate the PDF but recently, I am having an issue with my encoded image URLs are not working in img tag.
It works on my MAC though but not on sever which is Ubuntu.
Please advise.
code sample:

Hardik Raval
- 3,406
- 1
- 26
- 28
0
votes
1 answer
TypeError: (0 , _htmlPdf.create)(...).foFile is not a function
I am trying to create a pdf file in nodejs using "html-pdf" package.
First I imported as import pdf from "html-pdf" and got this error:
_htmlPdf.default.create(...).foFile is not a function.
But when I imported import { create } from "html-pdf" I…

Khudoyberdi Rahimov
- 11
- 1
- 3
0
votes
1 answer
img display only white blank squere after convert html to pdf
When i convert my html to pdf using html-pdf moudle on windows, my img tag display only white squere like this
why this is happening?
my code is very basic
module.exports = (formData) => {
const today = new Date();
return `

yanir midler
- 2,153
- 1
- 4
- 16
0
votes
1 answer
How to use html-pdf with jsZip
I generate some html text and then translate it to pdf using html-pdf package. Then I wanna put it into archive created by jsZip. In every example they use .toStream((err, stream) => stream.pipe(res)) but I cant find how to put it into archive.
I…

Cl0ser
- 1