html2pdf.js icon indicating copy to clipboard operation
html2pdf.js copied to clipboard

The text is positioned below some of its styles (eg background, strikethrough text, list bullets). Or styles above the text.

Open Roman178 opened this issue 2 years ago • 4 comments

Hello everyone. Problems on sreens. 1st screen is initial html, 2nd is generated pdf from this html. Total 3 problems, 6 screenshots. If you have any idea what's a problem, please help) The text is positioned below some of its styles.

image image image image image image

Pdf configs private readonly _pdfConfigs = { margin: 36, pagebreak: { mode: ['avoid-all', 'css', 'legacy'] }, html2canvas: { scale: 2, letterRendering: true }, jsPDF: { unit: 'pt', orientation: 'portrait' }, };

Chrome, Linux

Roman178 avatar Feb 04 '23 14:02 Roman178

Hi @Roman178 Dis you find a solution? I'm having the same issue. Thanks

Elohina avatar May 23 '23 17:05 Elohina

@Elohina Good day! I insert <style>img { display: inline }</style> in html that will be generated to pdf. And it helped me. image

Roman178 avatar May 31 '23 11:05 Roman178

Got same problem

Rifaldikn-Siloam avatar May 31 '24 12:05 Rifaldikn-Siloam

@Roman178 Thanks for the tip! It does solve the problem to some degree.

preetmishra avatar Aug 06 '24 11:08 preetmishra