parallax/jsPDF

autoPaging: 'text' messes up lineheights

Open

#3403 aperta il 6 apr 2022

Vedi su GitHub
 (9 commenti) (6 reazioni) (0 assegnatari)JavaScript (4596 fork)batch import
Bughelp wanted

Metriche repository

Star
 (28.280 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

"I have read and understood the contribution guidelines.".

HTML

<h2>Hi there,</h2><p>this is a <em>basic</em> example of <strong>tiptap</strong>. <br>Next up: A bullet list:</p><ul><li><p>Free Open Source Software</p></li><li><p>Plattform independent</p></li></ul><p>Let’s try a code block:</p><pre><code class="language-css">
body {
    background-color: rgba(200,200,24,1);
}
</code></pre><p>1 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt </p>

JSPDF

doc.html(editorcontent, {
          callback: (doc) => {     },
          x: 0,
          y: 0,
          margin: [20,20,20,20],
          width :400,
          windowWidth:420,
          autoPaging: 'text',  //text, slice, false
});

As you can see in the following screenshots the < em > and the < strong > tags as well as < code >< pre > tag are messed up somehow.

autoPaging: slice :+1: Screenshot_20220406_211512 autoPaging: text :-1: Screenshot_20220406_211605

i am using "jspdf": 2.5.1 "node": 16.13.2

Guida contributor