Questions tagged [html-pdf]

167 questions
1
vote
0 answers

i can't render a image in pdf-creator-node header

const options = { format: 'Letter', orientation: 'portrait', border: '0mm', header: { contents: `
1
vote
1 answer

Losing colors when knitting a gt table to PDF

When I run the following code manually, in my Rmd file, I end up with a (correct) colored table: color_table <- c("darkgoldenrod2","darkslategray3", "darkseagreen3", "lightpink2") job <- c("job1", "job2", "job3","job4") prof_table <-…
Douwe
  • 112
  • 10
1
vote
0 answers

How to create PDF from dynamic html in express js

I am trying to render ejs into html and then generate a pdf from html. that works fine and pdf generated but the user input data that saved in report.ejs not found in report.pdf( is empty ). this is app.js code: app.post('/report', function (req,…
Rowaida
  • 17
  • 2
1
vote
1 answer

NodeJs HTML-PDF Library
 tag cutting PDF at right page

I'm having an issue with a node libray (html-pdf). I'm trying to render html to pdf, but the PDF page is not showing correctly. When I try to insert a tag, the workflow is cutting the right side of the page, and it doesn't show the entire text. How…
Raziak
  • 360
  • 1
  • 7
1
vote
0 answers

Chart js renders with bad quality in html-pdf

I use html-pdf to generate PDF from my HTML file with script for a chart I use html-pdf without any options: return new Promise((resolve, reject) => { const html = pug.renderFile(`${this.basePath}/${dirName}/${templateName}.pug`, data); …
Drem Edys
  • 123
  • 1
  • 7
1
vote
0 answers

Generate PDF with pdfkit

I'm changing the configuration of the website regarding the a pdf creation and download by the user. The idea here is that the pdf is created from data from the DB and it's not stored, but directly offered to the user for download. The original…
1
vote
0 answers

I using Pdf-node-creator for generating pdf in my node application, It was working fine in local environment , But in production I get the below Error

I dono why I am getting this error please help Error message [Error: ENOENT: no such file or directory, open 'C:\tmp\html-pdf-6364.pdf'] { errno: -4058, code: 'ENOENT', syscall: 'open', path: 'C:\tmp\html-pdf-6364.pdf' }
1
vote
3 answers

html-pdf not work in docker to create pdf

i have an node js app which deploy into docker and using html-pdf library. but when tried in local docker container, it return this error: Error: spawn Unknown system error -8 at ChildProcess.spawn (node:internal/child_process:415:11) at…
Khairul Habib
  • 452
  • 1
  • 12
  • 29
1
vote
0 answers

AWS Lambda Node.js PDF Generation with PhantomJS

I'm trying to create a lambda function that will generate a PDF file from an HTML template file using the pdf-creator-node package (built on top of html-pdf). The function is able to find the template just fine, and I have logged the html and…
axelfy
  • 53
  • 4
1
vote
2 answers

html-pdf package is not working on aws lambda

I have tried implementing html-pdf package in my code which is deployed at AWS lambda but getting error in it even after I have deployed the layer for html-pdf package at lambda. Below is my code: import pdf from 'html-pdf'; import AWS from…
1
vote
0 answers

How to use chrome-aws-lambda for generating pdf from html in AWS lambda functions?

I was using puppeteer for generating pdf from html. It worked as expected in local machine. But on deploying to AWS lambda, we found that it will exceed the size limit of 250MB set by AWS for lambda functions. Then we got to know about…
1
vote
1 answer

Node Js PDF Phantom ENOENT

I have a node js server that generates a pdf - from an html body - with no problema installed locally in my PC (Windows) but when I installed in a remote server (Linux) get this error: App 3111574 output: { Error: spawn…
1
vote
0 answers

PDF is not well formatted on Google Cloud Functions

I am generating the PDF from HTML. The run-time is node.js 10. The PDF is all-okay when the function is run in the firebase emulator. But the exact same code fails to produce a nicely formatted PDF. The part of CSS doesn't come into the effect. How…
Sukhi
  • 13,261
  • 7
  • 36
  • 53
1
vote
3 answers

EJS page is not loading image

I am new to node.js and for this project I a mtrying to load image on ejs file. Images are inside public folder but still its not displaying images on .ejs file. If I call the project with the image url as localhost:3000/public/images/bmLogo.png ,…
Yahoo
  • 558
  • 11
  • 34
1
vote
1 answer

Error: html-pdf: Received the exit code '127' in lambda nodejs

I am using "html-pdf" module in my lambda function. The below is my code await pdf.create(html, options).toStream(async function (err, stream) { if(err) { return err; } let fileName =…
Haris George
  • 291
  • 5
  • 16