parallax/jsPDF

autoPaging: 'text' messes up lineheights

Open

#3,403 创建于 2022年4月6日

在 GitHub 查看
 (9 评论) (6 反应) (0 负责人)JavaScript (4,596 fork)batch import
Bughelp wanted

仓库指标

Star
 (28,280 star)
PR 合并指标
 (30 天内没有已合并 PR)

描述

"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

贡献者指南