Closed frabanzo closed 3 years ago
Hi @eKoopmans
I was experiencing some issues. Some contents are missing and it adds a margin to the left side even if I set the "margin: 0 ".
This issue was encountered when I used the bundled version URL ()
Here is the source code:
const QuotePDFTemplate = function(param) { return { init: function() { }, getElementToPrint: () => { return document.querySelector(`.pdfProposal`); }, export: () => { return new Promise((resolve, reject) => { const opts = QuotePDFTemplate.getPDFOptions(); const elementToPrint = QuotePDFTemplate.getElementToPrint(); html2pdf().set(opts).from(elementToPrint).save(); resolve(200); }) }, getPDFOptions: (element) => { const unix = func.dateTimeUnix(); filename = `Poultry Proposal Farm_${unix}.pdf`; pdfOptions = { margin: [0, 0], filename: filename, image: { type: 'jpeg', quality: 0.98 }, html2canvas: { scale: 2, logging: true, dpi: 192, letterRendering: true, }, jsPDF: { unit: 'in', format: 'letter', orientation: 'portrait' } }; return pdfOptions; }, } }()
and Here's the pdf Output:
It adds some margin on the left side
Some headers in the table are missing.
This is a super amazing library and I appreciate your work. :)
I'm hoping that one of you guys will help me with this issue.
TIA.
Please check this issue for the answer : https://github.com/eKoopmans/html2pdf.js/issues/474
Hi @eKoopmans
I was experiencing some issues. Some contents are missing and it adds a margin to the left side even if I set the "margin: 0 ".
This issue was encountered when I used the bundled version URL ()
Here is the source code:
and Here's the pdf Output:
It adds some margin on the left side
Some headers in the table are missing.
This is a super amazing library and I appreciate your work. :)
I'm hoping that one of you guys will help me with this issue.
TIA.