Questions tagged [html-pdf]
167 questions
2
votes
1 answer
html-pdf: Failed to load PhantomJS module. Error: Cannot find module 'phantomjs-prebuilt'
I am using html-pdf NPM module to convert my html (bill.html) code to pdf file (bill.pdf), I have simple html with heading tag and exporting that html by fs module below
import { create } from 'html-pdf';
import fs from 'fs';
import path from…

hardy
- 880
- 2
- 13
- 30
2
votes
1 answer
Converting HTML to PDF buffer in Nodejs
I am trying to convert an HTML code that is returned by the "returnDefaultOfferLetter" function here into PDF buffer(that I will use for sending attachments in a mail) using html-pdf package. So, the problem is it works on localhost but on AWS…

Paras Agrawal
- 21
- 1
- 3
2
votes
2 answers
pdf generation using html-pdf npm package , deploy on AWS as a GET api
I am able to generate a pdf using html-pdf in nodejs locally on my mac. The minute I deploy the my GET api using serverless on AWS everything fails. The pdf does not get generated and I get 400 bad request and message as html-pdf: Received the exit…

NinjaDev
- 301
- 1
- 7
- 19
2
votes
1 answer
html-pdf: How to ensure image doesn't span a page break
I am using html-pdf to convert HTML to PDF. To add Graphs, I am using Chart.js.
When generate the PDF, Graph break into two pages as shown in below image.
This is how I add the Graph.
2
votes
1 answer
How can I add repeating table headers after page breaks using node-html-pdf?
I'm using node-html-pdf to generate pdfs. It renders HTML then uses phantom js to convert to pdf.
I have several tables that overrun a single page in the pdf, and I'd like the table header to repeat on each new page.
From what I can tell, this…

rbristow
- 183
- 2
- 15
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
- 9,269
- 4
- 28
- 52
2
votes
1 answer
iText 7, htmlPDF 2 - Parallel usage of DefaultFontProvider
We are converting mail messages based on iText 7.1.2 and htmlPDF 2.0.2. The conversion is done within a static method which is called by parallel threads for every html-based message. The code looks simplified like this (streams are closed in a…

Tobias Held
- 23
- 4
2
votes
1 answer
Angular 2 - HTML & CSS to PDF (to be send as attachment in email)
I am trying to convert HTML & CSS of a page to PDF using jsPDF:
var pdf = new jsPDF('l', 'pt', 'a4');
pdf.addHTML(document.getElementsByClassName("container"),0,0, function () {
pdf.save('web.pdf');
});
However, jsPDF exclude CSS. Also, the PDF…

Sasa
- 205
- 1
- 3
- 16
2
votes
0 answers
html-pdf. Render table works bad
I'm using html-pdf nodejs library to render html table to PDF.
It seems all works good. But tables rows at the end of the page looks like broken.Here the results.
I've already used page-break-inside rule. And I've also put DIV inside the table's…

young B
- 127
- 1
- 11
2
votes
1 answer
print vueJS component or convert to pdf
I have a vueJS component that I want to print. However, when I use the standard print dialog I lose all the CSS and basically only have plain text.
I have also tried Printd.
My code is along the lines of:
mounted () {
this.cssText = `
…

KaffeeKaethe
- 301
- 1
- 3
- 10
2
votes
3 answers
Error: spawn ENOTDIR html-pdf in mac
I am using html-pdf@2.1.0 in my meteor app. When .create() called then following error genereated. Initially it was working but after updated of Mac Sierra it generate the following error. However it is working in ubuntu os.…

tts
- 157
- 1
- 1
- 13
1
vote
0 answers
How to convert a Vue page to a vector-based PDF on the client-side
I want to convert an HTML page written with Vue.js to a vector-based PDF client-side. I understand there are solutions in the backend, however, in my case I specifically want client-side. I have very complex Vue components and styling which I would…

Omar Bitar
- 53
- 5
1
vote
1 answer
How can i use braille fonts in jsPDF or similar libs?
When I convert 'html' file into pdf, my braille text don't appears. Instead, appears "(((((((".[enter image description here](https://i.stack.imgur.com/z4czk.png)
function generatePDF(){
var doc = new jsPDF('p', 'pt', 'a4');
const myFont =…

Jansen
- 13
- 2
1
vote
1 answer
Puppeteer won't start cpanel
I am trying to run puppeteer on a cpanel server but it won't start up, it works fine on my pc and on heroku though.
The error i keep getting says a dependency is missing, I would know how to solve it if it was on my pc, but i can't install…

Salihu Dickson
- 11
- 1
- 3
1
vote
0 answers
Can't get background image to repeat/show up on every page in Puppeteer .pdf
I am generating PDF pages from HTML using Puppeteer. The problem I'm experiencing is I cannot satisfactorily create background image that covers the whole page for every page that the html->pdf generates.
For example, in the code below, if the HTML…

Chris
- 13
- 3