autoPaging: 'text' messes up lineheights
Open
Nobody has claimed this yet.
Bug
help wanted
- Dominant language
- JavaScript
- Stars
- 31.3k
- Forks
- 4.8k
- PR merge metrics
- No merged PRs in 30d
Description
"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 👍

autoPaging: text 👎

i am using
"jspdf": 2.5.1
"node": 16.13.2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the provided HTML with jsPDF's doc.html entry point and autoPaging set to 'text', then compare it with 'slice'. Done means inline em/strong formatting and pre/code block line heights render correctly across page breaks without the reported distortion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100