Skip to content

fix: fix page break issue when document has images#531

Open
kassah-mahmoud wants to merge 1 commit intoeKoopmans:mainfrom
kassah-mahmoud:fix/page-break-images
Open

fix: fix page break issue when document has images#531
kassah-mahmoud wants to merge 1 commit intoeKoopmans:mainfrom
kassah-mahmoud:fix/page-break-images

Conversation

@kassah-mahmoud
Copy link
Copy Markdown

Page break produces unpredictable behavior when the document has images
This is due to the fact that the images may be fully loaded and rendered or not while calculating the element's rects values, which leads to incorrect calculations. As a result, page breaks and hyperlinks are located in incorrect positions.
In this PR, the worker chain make sure that all images are fully loaded then execute the page break logic
This modification solved the issues in my project so I made this PR

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.

1 participant