Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken page headers in version 9.11.0 #447

Closed
rzam opened this issue Nov 21, 2024 · 3 comments · Fixed by #450
Closed

Broken page headers in version 9.11.0 #447

rzam opened this issue Nov 21, 2024 · 3 comments · Fixed by #450
Assignees
Labels
Milestone

Comments

@rzam
Copy link

rzam commented Nov 21, 2024

Page headers seem to be missing/broken in version 9.11.0.

Minimal HTML example:

<html xmlns="http://www.w3.org/1999/xhtml">

    <head>
        <style>
            @page {
                size: 200px 200px;
                @top-left { content: element(header); }
                @bottom-left { content: element(footer); }
            }

            #header {
                position: running(header);
            }

            #footer {
                position: running(footer);
            }
        </style>
    </head>

    <body>
        <div id="header">Header</div>
        <div id="body">Body</div>
        <div id="footer">Footer</div>
    </body>

</html>

This is how it was rendered up until version 9.10.2:

image

This is how it is rendered in version 9.11.0:

image

@asolntsev
Copy link
Contributor

asolntsev commented Nov 22, 2024

For the record, it was broken in commit 582fbb0 ("#429 [refactor] make class PageRule almost immutable").
In the previous commit b3deb2c ("#429 [refactor] make class PDFEncryption immutable"), the header was visible.

PR #450 fixes the problem.

asolntsev added a commit that referenced this issue Nov 22, 2024
the probles was in line CSSParser.java:553 - the `margins` map was overriden by the new value. Previous map content was lost.
@asolntsev asolntsev linked a pull request Nov 22, 2024 that will close this issue
@asolntsev asolntsev self-assigned this Nov 22, 2024
@asolntsev asolntsev added the bug label Nov 22, 2024
@asolntsev asolntsev added this to the 9.11.1 milestone Nov 22, 2024
asolntsev added a commit that referenced this issue Nov 22, 2024
the probles was in line CSSParser.java:553 - the `margins` map was overriden by the new value. Previous map content was lost.
@asolntsev
Copy link
Contributor

@rzam FlyingSaucer 9.11.1 has been release. Can you please check if it solves the problem?

@rzam
Copy link
Author

rzam commented Nov 22, 2024

@rzam FlyingSaucer 9.11.1 has been release. Can you please check if it solves the problem?

Works on my end. Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants