Questions tagged [node-html-pdf]

56 questions
7
votes
2 answers

node-html-pdf businesscard example on Ubuntu

I am trying to use node-html-pdf (https://github.com/marcbachmann/node-html-pdf) node module on Ubuntu 16.04 and have started with the given businesscard example. Unfortunately I was not able to generate this PDF. First of all, I installed the…
Aleks
  • 4,962
  • 1
  • 22
  • 39
6
votes
0 answers

"ERROR Error: write EPIPE" on AWS Lambda with html-pdf

I coded a NodeJS class which is supposed to create a PDF file out of a html string. The class is deployed on AWS Lambda. It is based on html-pdf (https://www.npmjs.com/package/html-pdf). const {readFileSync} = require('fs'); const pdf =…
4
votes
1 answer

How to record page numbers html-pdf node.js?

I'm using html-pdf for node.js to create a pdf from html. Built into html-pdf is the ability to add page numbers to the footers. I want to record those page numbers somehow, maybe in an array. This is my current code: let index = 0; let myIndex =…
4
votes
2 answers

How to add watermark in pdf using nodejs?

I generated pdf through nodejs. i want to add watermark to this generated pdf. I used dynamic-html-pdf plugins in my code. If there is any options for adding watermark in dynamic-html-pdf. Here i display my sample code here. var…
Ram
  • 41
  • 1
  • 6
3
votes
0 answers

html-pdf converters that are compatible with css flex-box

I am trying to put together a pdf from html template code. The problem I am running into is that the html-pdf converters I have tried don't format the css properly, I guess they are not yet compatible with css flex-box. I have looked at two…
3
votes
1 answer

Can't install or run html-pdf on nodejs

I have a application that generates PDF's using html-pdf on nodejs, but after I made a deploy to the production server, I'm not able to generate. It gives this error: 'html-pdf: Failed to load PhantomJS module. You have to set the path to the…
lufizi
  • 363
  • 2
  • 4
  • 13
2
votes
2 answers

Node html-pdf Auto configuration failed

I have a simple project using html-pdf package, I'd like to make a simple pdf file with this code : ... pdf.create(html).toStream(function(err, stream){ if (err) reject(err) ; else …
Bilel-Zheni
  • 1,027
  • 2
  • 8
2
votes
0 answers

How can I generate a PDF with custom fonts using AWS Lambda?

I have an AWS Lambda function that generates PDFs using the html-pdf library with custom fonts. At first, I imported my fonts externally from Google Fonts, but then the PDF's size has enlarged by ten times. So I tried to import my fonts locally…
Eliya Cohen
  • 7,443
  • 6
  • 41
  • 82
2
votes
1 answer

How do I install fontconfig on AWS lambda?

This is a continuation of How do you install phantomjs on AWS lambda? I've figured out how to get phantomjs running on an aws lambda, but when I use it to generate pdfs (using the html-pdf nodejs library), the content is missing text. If I create a…
Daniel Kaplan
  • 54,448
  • 39
  • 189
  • 282
2
votes
2 answers

How do I install fonts in the IBM Cloud nodejs runtime? (cloud foundry)

I use the html-pdf component to generate pdf reports in my nodejs app and in order to properly embed custom fonts in the pdf document, these fonts must be installed in the server, in this case, in the IBM Cloud nodejs runtime. How do I do that?
Leo
  • 723
  • 4
  • 27
2
votes
1 answer

Error: Fontconfig warning: ignoring UTF-8: not a valid region tag

I have Ubuntu 18.04.1 LTS Instance running Nginx and NodeJs project, I am trying to create a PDF using html-pdf library but Its giving me following issue. Error: Fontconfig warning: ignoring UTF-8: not a valid region tag at ChildProcess.emit…
Prathamesh mhatre
  • 795
  • 5
  • 13
  • 30
2
votes
1 answer

Can I use phantomJS on Azure app service for linux?

I'm getting a consistent error when trying to use the html-pdf package in my node application: StatusError: Error: spawn /home/site/wwwroot/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs ENOENT As far as I can tell everything is installed…
Shaun Rowan
  • 8,261
  • 4
  • 26
  • 49
2
votes
2 answers

Node.JS HTML to PDF

I want to convert the HTML to PDF for which I am using this package (https://www.npmjs.com/package/html-pdf). But in this HTML I am also getting tables and that tables can come in any position in HTML. So I want to copy the table thead to another…
Ravi Badoni
  • 67
  • 2
  • 5
2
votes
0 answers

Streaming a PDF File to the Browser Using Dynamically Generated HTML in Node.js

Okay, I see a few versions of this question out here, but I think mine goes a bit deeper than some of the others and I don't see satisfactory answers. What I Want: I have a page on a website that will have its contents frequently changed by users,…
Jonathan Bechtel
  • 2,509
  • 3
  • 30
  • 54
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
  • 107
  • 1
  • 9
1
2 3 4