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

PdfStructureTreeRoot update - fixing Page linking #1145

Merged
merged 1 commit into from
Apr 14, 2024

Conversation

luzhanov
Copy link
Contributor

Description of the new Feature/Bugfix

A follow-up / bugfix for PR #1127

  • For cases when existing object is being added to /NUMS array via PdfStructureTreeRoot.addExistingObject, we need to save correct array entry into Page's /STRUCTPARENTS field.
    Previously this reference was populated with id = pageNumber which was broken by PR PdfStructureTreeRoot update - allowing to save Object References #1127
  • PdfWriter.getCurrentPage() is made public as far as both getPageReference() and getCurrentPageNumber() are public. So this method can be used instead of writer.getPageReference(writer.getCurrentPageNumber())

Unit-Tests for the new Feature/Bugfix

  • Unit-Tests added to reproduce the bug
  • Unit-Tests added to the added feature

Compatibilities Issues

Is anything broken because of the new code? Any changes in method signatures?

  • Visibility of one method PdfWriter.getCurrentPage() was changed from default to public, no compatibility issues expected.

Testing details

Any other details about how to test the new feature or bugfix?

Copy link

Quality Gate Passed Quality Gate passed

Issues
1 New issue
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@asturio asturio merged commit c07947f into LibrePDF:master Apr 14, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants