parallax/jsPDF

autoPaging: 'text' messes up lineheights

Open

#3,403 建立於 2022年4月6日

在 GitHub 查看
 (9 留言) (6 反應) (0 負責人)JavaScript (28,280 star) (4,596 fork)batch import
Bughelp wanted

描述

"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

貢獻者指南