Questions tagged [node-html-pdf]

64 questions
1
vote
1 answer

Problems with html-pdf on Elastic Beanstalk (Node.js)

I'm having serious and intermittent problems getting phantomjs-prebuilt installed on Elastic Beanstalk using html-pdf. I've tried every solution I can find, but I'm not well versed in how to fix these things. I can't even figure out how to SSH into…
1
vote
0 answers

assets and scripts missing in generated pdf

Im using html-pdf to convert a compiled ejs with dynamic values to PDF in ejs. When I try to render the ejs file all the scripts , images , svg are loading correctly , but when I generate PDF from compiled ejs some assets like fonts , and images are…
1
vote
1 answer

Firebase functions - custom fonts in html-pdf generation

I have a firebase function that generates and returns a pdf blob. Locally, and using firebase serve, I can use a font loaded from a url and locally. On firebase, the font is not ever loaded. I have tried variations of this in my template.html…
1
vote
1 answer

Generating pdf file from express-handlebars render with html-pdf library, css files not working

I'm trying to generating a pdf file which is generated from express-handlebars rendering. However, some css files don't seem to be working. Bootstrap are still working okays, but the custom css (i'm using a theme) is not working. I have tried…
1
vote
1 answer

Angular 4 show pdf in new tab with node api

My requirement is to generate pdf view of UI(angular 4 app) using Nodejs api. For that i fetched the entire content from UI and did some pre-processing which will be send to nodejs api. In node api i used html-pdfpackage to generate pdf from the…
Satheesh
  • 892
  • 2
  • 16
  • 38
1
vote
2 answers

Node JS Html-pdf : create different header footer for first and last page

I am new in node js, and I want to use different header and footer for first and last pages in node js, I am using html-pdf module which is not working when I use the same code as they have provided. please have a look into the code var fs =…
Ravi Gupta
  • 13
  • 1
  • 3
1
vote
0 answers

Pdf rendering issue in html-pdf

When I create a PDF from HTML using the html-pdf npm module, the output pdf is not correct (does not look the same as the html.) What needs to be done to receive exact same format as in html file? HTML PAGE -> PDF PAGE . - > var fs =…
Rohan Singh
  • 81
  • 1
  • 1
  • 8
0
votes
0 answers

Font issue in generated PDF (node-html-pdf)

Using node-html-pdf library for pdf generation (now it is deprecated, in future we'll switch to puppeteer) and if to use some font from external source by url (for example, google fonts), pdf is generated as image. Only if to use system fonts, pdf…
Iri.S.M.
  • 43
  • 4
0
votes
0 answers

Puppeteer to convert html to pdf using Nodejs in Durable functions(fan out fan in)

I'm working on a small project to convert a large xml to several formatted pdf documents. The large xml contains multiple similar format xmls. So I'm using a single html template for printing all the documents. After producing all the pdf documents…
Anupam Chand
  • 2,209
  • 1
  • 5
  • 14
0
votes
1 answer

html-pdf-node library not working with heroku

I am using this html-pdf-node library to convert html to pdf file in nodejs side. After converting it returns the pdf buffer, that i use to send to mail. Here is the code const file = { content: attachementPdfContentString }; return…
Sunil Garg
  • 14,608
  • 25
  • 132
  • 189
0
votes
0 answers

Node Express Mongo Vercel - How to create PDF from HTML and send in email (nodemailer)? This worked fine until I migrated from Heroku to serverless

employeesRouter.route('/newreview/:employeesId') .put(cors.cors, (req, res, next) => { var options = { format: 'Letter' }; var html = email.reviewStatus( req.body.name, req.body.review.date, …
0
votes
0 answers

PhantomJS errors out on EBS

I'm using html-pdf to generate and pdf on my nodejs app, which is then being uploaded to S3. This works fine on my local, but I face this error Error: spawn /usr/local/bin/phantomjs ENOENT when running the deployed app on EBS. I have added a config…
0
votes
1 answer

Repeat table header in html-pdf library while creating PDF from data in node.js

I have one scenario in which I have multiple tables to print by creating PDF. For say, I have 4 tables together and the third table is having number of rows resulting in page change. I want to repeat that table's header on the next page also before…
0
votes
1 answer

Convert HTML to PDF in node Js and open in new tab in browser without saving it

I am getting suggestion to use html-pdf npm package but it downloads the converted pdf file and I want to download only when clicked on download pdf button else I just want to open it in new tab or window without downloading. Any suggestions please?…
0
votes
1 answer

How to get the rendered view as a string in express.js?

I want to store the rendered view res.render as string to a variable and use node-html-pdf package to print pdf: var pdf = require('html-pdf'); var html = res.render('my_view', res.view_data); // not work pdf.create(html).toStream(function(err,…
Wilson
  • 755
  • 4
  • 12