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

PDF Bookmark Support #1462

Merged
merged 1 commit into from
Sep 16, 2024
Merged

Conversation

jakobvogel
Copy link
Member

Description

Keeps the <bookmarks> element in <head> during cleanup. Jsoup moves it to <body> during parsing as it is a non-standard header tag required by flying saucer to generate PDF bookmarks (i.e. a PDF table of contents).

Additional Notes

  • This PR fixes or works on following ticket(s): OX-10783

Checklist

  • Code change has been tested and works locally
  • Code was formatted via IntelliJ and follows SonarLint & best practices

…as it is a non-standard header tag only supported by _flying saucer_.

OX-10783
@jakobvogel jakobvogel added the 🐛 Bugfix Contains only a small fix for an existing bug label Sep 15, 2024
@mkeckmkeck
Copy link
Contributor

We currently have an issue due to the JSoup cleanup mechanism. Could we get a config flag to control this mechanism?

@jmuscireum
Copy link
Contributor

We currently have an issue due to the JSoup cleanup mechanism. Could we get a config flag to control this mechanism?

The issue:

<!DOCTYPE stylesheet [
        <!ENTITY nbsp  "&#160;" >
]>

Jsoup breaks this doctype definition, I didn't check what exactly happens. In the rendered PDF I can see a ]> in the beginning of the page and the styling and image rendering breaks. We don't need this definition anymore, so I removed it for now.

@jakobvogel
Copy link
Member Author

We currently have an issue due to the JSoup cleanup mechanism. Could we get a config flag to control this mechanism?

The issue:

<!DOCTYPE stylesheet [
        <!ENTITY nbsp  "&#160;" >
]>

Jsoup breaks this doctype definition, I didn't check what exactly happens. In the rendered PDF I can see a ]> in the beginning of the page and the styling and image rendering breaks. We don't need this definition anymore, so I removed it for now.

I.e. PDF rendering works for S2 right now?

@jakobvogel jakobvogel merged commit 03581c9 into develop Sep 16, 2024
3 of 4 checks passed
@jakobvogel jakobvogel deleted the feature/jvo/OX-10783-PDF-Bookmarks branch September 16, 2024 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bugfix Contains only a small fix for an existing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants