parallax / parallax/jsPDF

html: support CSS page-break-after: avoid

Open
#3,375 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Feature Request
Dominant language
JavaScript
Stars
31.3k
Forks
4.8k
PR merge metrics
No merged PRs in 30d

Description

When I export to PDF, I get long table tables. I need it to not break after thead and tbody > tr:first-child. I wrote it like this:
table thead, table tbody > tr:first-child { page-break-after: avoid; }
but it doesn't work. Can you give me some advice?
Screen Shot 2022-02-11 at 12 14 40 AM
Screen Shot 2022-02-11 at 12 11 15 AM

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the HTML/CSS example and the reported PDF export behavior, then trace the export path used by jsPDF. Done means the sample table honors the requested page-break-after behavior in the generated PDF, with a reproducible check for thead and tbody > tr:first-child.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, javascript
Domain
web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.