Questions tagged [html-pdf]

167 questions
1
vote
1 answer

Image is not rendering from dynamic image path while using express html-pdf package

I'm using the Html-pdf package to generate and download pdf in an express-MongoDB application. Here is the route, where I've used the Html-pdf package. //@route - GET /generate PDF router.get("/generateReport/:id", async (req, res) => { const…
Mehedi Hasan
  • 86
  • 1
  • 9
1
vote
1 answer

html-pdf runs very slow in firebase cloud functions

I have developed a function that take an one page HTML, convert it to PDF using htmp-pdf package and upload to firebase storage. When I run this function from my pc it takes less than 5 seconds, but when I run it from firebase function it takes up…
1
vote
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
  • 409
  • 8
  • 20
1
vote
2 answers

nodejs pdf-creator-node, output is not working in linux

Error: write EPIPEenter code here at afterWriteDispatched (internal/stream_base_commons.js:154:25) at writeGeneric (internal/stream_base_commons.js:145:3) at Socket._writeGeneric (net.js:784:11) at Socket._write (net.js:796:8) at doWrite…
Fitzgerald
  • 11
  • 3
1
vote
0 answers

Generating highly customized dynamic PDF file

I have a requirement to generate a report in PDF format. The report is having some graphics (graphs, charts, etc). All of these dynamics - value of graph and charts will change based on the user input. Currently I another similar working thing using…
Umair Mohammad
  • 4,489
  • 2
  • 20
  • 34
1
vote
1 answer

AWS Elastic BeanStalk Phantom Bug

I'm experiencing a bug when being on production in AWS Elastic Beanstalk, otherwise it works well, both locally and in Heroku. Logs say: html-pdf: Failed to load PhantomJS module. You have to set the path to the PhantomJS binary using…
1
vote
0 answers

Angular Export pdf with image and large dataset up to 10000

I have created stackblitz link with 500 records just for testing and understanding. Once we click on save pdf and we scroll everything becoming white page. After export complete we can able to view data on scroll.…
Amit
  • 323
  • 3
  • 18
1
vote
0 answers

Need to display page numbers in Table of contents

I am just printing the HTML page, I need to show the page numbers opposite to the titles in Table of contents. I investigated a lot, but couldn't find a proper solution. While investigating I found target-counter but it is not working for me. Seems…
1
vote
1 answer

Can pdfHTML handle dynamically generated HTML content?

I have a use-case in which i need to generate PDF dynamically using iText7. I have sample Landing page which accepts a url-encoded parameter id www.example.com/mypage.html?id=1 At the time of page load an ajax call gets triggered and some html…
1
vote
2 answers

Creating PDF document from dotnet Core 2 using node service

I need to create a pdf file from an HTML on the server-side (dotnet core 2) and send it as an attachment of an email. I have created a node service (createPdf.js) as follows and kept it in a local directory (NodeService) within the solution…
Raj
  • 417
  • 1
  • 3
  • 17
1
vote
0 answers

Is it possible to divide the address from saved search so that it is divided into three specific rows in Advanced PDF / HTML Templates?

By making a column with the client's address and imposing an address from saved search to Advanced PDF / HTML Templates, I would like to know if I can somehow manipulate the code with this value, eg to create 3 different lines of code from it as it…
1
vote
1 answer

Node js html-pdf Error: ENOENT: no such file or directory,

I have the following function which is expected to run and generate PDF from the link : var fs = require('fs'); var pdf = require('html-pdf'); var html = fs.readFileSync('https://www.google.com/', 'utf8'); var options = { format: 'Letter'…
H Dindi
  • 1,484
  • 6
  • 39
  • 68
1
vote
0 answers

How to setting dpi for nodejs html-pdf

I'm using html-pdf to generate dynamic pdf file with html. But pdf file is ugly, I think the reason is dpi not good. I tried setting: var options = { dpi: 96, }; pdf.create(htmlTemplate, options).toStream(function(err, stream){ if (err) { …
Duc Chi
  • 391
  • 4
  • 8
1
vote
3 answers

How to decrease the time taken by html-pdf for report generation?

I'm dealing with high volume data. I want to generate a PDF report which contains 1 year data. I'm using html-pdf to do that. The problem is that it is taking around 20 minutes to generate the PDF. Can I decrease it? I don't want to make my user…
Sanjay
  • 81
  • 11
1
vote
1 answer

Saving buffer/stream that comes from nodejs server

I am not sure what I am doing wrong. I have a html content and want to save it as pdf. I use html-pdf (from npm) and a download library http://danml.com/download.html Actually when I directly save to file or show it as a result I can get the pdf…
ertan2002
  • 1,458
  • 1
  • 32
  • 68