Questions tagged [node-html-pdf]

56 questions
0
votes
0 answers

How to send a PDF using sendgrid to an email address?

I'm trying to use the following code to send a pdf var html_to_pdf = require('html-pdf-node'); var defer = Q.defer(); let options = {format: 'A4', margin: {top: "20", left: "20", right: "20", bottom: "20"}}; let html = "

Hi…

Chris Scott
  • 5,388
  • 10
  • 53
  • 123
0
votes
1 answer

How to generate PDF from html with chart and google map in NodeJS

I want to export the HTML into PDF in Nodejs. My HTML file having a chart, graphs, images, and table data. I've created HTML with handlebar parsing as well as creating the one public URL for HTML of pdf. I've tried to export HTML to pdf using…
Keyur Chavda-kc1994
  • 977
  • 1
  • 11
  • 22
0
votes
0 answers

How to solve when html-pdf not work on server

I using html-pdf on my project, but after I deployed it on the server, it has problem. "message":"html-pdf: Received the exit code '1'\nAuto configuration failed\...." libssl_conf.so: cannot open shared object file: No such file or…
0
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…
0
votes
0 answers

How to add pagenumber in table of contents while rendering HTML as PDF in nodejs

I am trying to create a table of contents in a PDF. I am creating PDF using HTML and don't know how to show page numbers in TOC for the headings.I am using html-pdf
0
votes
0 answers

node.js SET HEADER ERROR ON upload to any host

I have a problem with node.js html-pdf, its give me the error SET HEADER ERROR, when I upload a file to any host like Amazon EC2 its give me Error: Can't set headers after they are sent to the client, but it works very will on my device host…
0
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…
0
votes
0 answers

Image is not seen in pdf file. when i converted HTML into pdf using html-pdf

I have an HTML(node ejs template) file. which contains some images in it. the HTML page is working fine. when I open the file in the browser but facing image issue when, I am converting the HTML into pdf using the node html-pdf Repositry structure…
0
votes
0 answers

nodejs convert html-pdf in format problem

I am trying to download a pdf file which I first converted it from ejs template to pdf. I am getting face problem in format. pdf format is getting disturbed. my code is below. app.get('/billtemp',(req,res)=>{ const public = __dirname + "/public"; …
0
votes
2 answers

NodeJS Server pdf Document Generation Issue

I am working on an API which generates a pdf document based on an EJS template which then gets emailed to some users. When running Locally everything works as expected however when my API is pushed to heroku the pdf is generated with some odd…
d0rf47
  • 189
  • 9
0
votes
1 answer

NodeJS - npm package - html-pdf alternate

I am creating a pdf from a static HTML code in nodejs using html-pdf npm package. But it is critical severity vulnerability. I want to change this package. Is there any package available to convert an HTML code to PDF on the server-side.
Vinodh Ram
  • 481
  • 1
  • 6
  • 17
0
votes
0 answers

NodeJS generate pdf and save to firebase storage. Can't open file

I've been stuck on this problem for awhile now and can't seem to figure out why this file isn't being uploaded to firebase correctly. I'm using the code below in firebase functions to generate a document, then I convert that document to a stream,…
0
votes
0 answers

How to return a stream PDF using html-pdf in Loopback 4?

I am trying to download a PDF using the node-html-pdf package and Loopback 4. This is what I am trying: @get('/reports/{id}/preview', { responses: { '200': { description: 'PDF', content: { 'application/pdf': { …
0
votes
1 answer

html-pdf text-align: justify not working?

I'm using html-pdf in Node.js to convert html text to a pdf. text-align: left, center, and right work. But text-align: justify does not work. When text-align is justified, it exports the text aligned left. Here's the HTML code:
Page COW
  • 241
  • 2
  • 14
0
votes
1 answer

how to fix html-pdf node module arbitrary file read vulnerability?

I want to convert html to pdf document. Using html-pdf npm module, which contain vulnerability. https://snyk.io/vuln/SNYK-JS-HTMLPDF-467248 Please suggest the alternative solutions.
Udhaya
  • 3,749
  • 2
  • 22
  • 36