Open perazzo opened 3 years ago
I'm receiving a HTML for an API, I cannot change its content, but I can add styles. I created a NodeJS/Express backend to transform this HTML to a PDF. However, it is not formatted inside the PDF.
The example below shows the issue:
`const pdf = require('html-pdf');
let form = `
let options = { format: 'Letter' }; pdf.create(form, options).toBuffer(function(err, buffer){ res.writeHead(200, { 'Content-Type': 'application/pdf', 'Content-Length': buffer.length }); return res.end(buffer); });
The response is a PDF with the content outside the PDF file (image below). Is there a way to adjust the html-pdf to fix the content?
We are also seeing this problem. Help is appreciated!
need help
I'm receiving a HTML for an API, I cannot change its content, but I can add styles. I created a NodeJS/Express backend to transform this HTML to a PDF. However, it is not formatted inside the PDF.
The example below shows the issue:
`const pdf = require('html-pdf');
let form = `
let options = { format: 'Letter' }; pdf.create(form, options).toBuffer(function(err, buffer){ res.writeHead(200, { 'Content-Type': 'application/pdf', 'Content-Length': buffer.length }); return res.end(buffer); });
The response is a PDF with the content outside the PDF file (image below). Is there a way to adjust the html-pdf to fix the content?