Skip to content

Conversation

@mettta
Copy link
Collaborator

@mettta mettta commented Sep 18, 2025

Added narrative rules:

  1. Disable hanging meta when there is no title.
  2. Prevent node breaks when there are no multiline fields.
    The 2nd is potentially dangerous if the structure consists only of single-column fields and there are a lot of them (more than 20).

This is a temporary fix and may still fail in edge cases. A full solution requires upgrading html2pdf to the 0.2.4+ version (currently in development and not yet released), which resolves conflicts between multiple page-break rules. In complex documents with deep nesting or long nodes, multiple active rules can overload the algorithm, resulting in empty pages or page breaks in undesirable places.

Attached is the most layout-intensive document we have so far — its rendering now looks acceptable.
User Guide - PDF.pdf

@mettta mettta requested a review from stanislaw September 18, 2025 11:56
@stanislaw stanislaw merged commit 1b43ed9 into main Sep 18, 2025
35 of 37 checks passed
@stanislaw stanislaw deleted the fix-no-hanging-overload branch September 18, 2025 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants