Skip to content

Rebase the Jaspersoft classic fork onto OpenPDF 1.4.2 (1.4.2.jaspersoft.1) - #1

Open
kevinkda wants to merge 32 commits into
Jaspersoft:release-1.3.43.jaspersoft.2from
kevinkda:release-1.4.2.jaspersoft.1
Open

kevinkda wants to merge 32 commits into
Jaspersoft:release-1.3.43.jaspersoft.2from
kevinkda:release-1.4.2.jaspersoft.1

Conversation

@kevinkda

@kevinkda kevinkda commented Oct 9, 2026

Copy link
Copy Markdown

This PR rebases the Jaspersoft classic OpenPDF fork from OpenPDF 1.3.43 onto OpenPDF 1.4.2, the last release of the com.lowagie 1.4 line. It keeps the Jaspersoft changes from 1.3.43.jaspersoft.2 and sets the version to 1.4.2.jaspersoft.1-SNAPSHOT.

Why

JasperReports uses openpdf.classic.version = 1.3.43.jaspersoft.2 for jasperreports-pdf. Any project that also has stock OpenPDF 1.4.x on its classpath (directly or through another library) must either downgrade it to the 1.3.43 fork or run JasperReports against stock OpenPDF. The second option logs Stock OpenPDF detected, link annotation /StructParent tagging is disabled and drops the glyph-position fixes (LibrePDF#561, LibrePDF#301). A 1.4.2.jaspersoft.1 release would remove that conflict for Java 11+ users. JasperReports 7 already requires Java 17.

What

  • Three cherry-picks from release-1.3.43.jaspersoft.2, each with its original author and an -x reference:
    • c710839 make PdfStructureTreeRoot subclassable and add PdfWriter.setStructureTreeRoot()
    • 33eecab honor X positions in glyph vectors
    • c82bc87 improve glyph vector X position adjustment
  • A version commit: 1.4.2.jaspersoft.1-SNAPSHOT in the five poms.
  • An -s ours merge of release-1.3.43.jaspersoft.2, so the branch fast-forwards from this PR's base. The resulting tree is exactly upstream tag 1.4.2 plus the four commits above. The diff against the base is therefore upstream's 1.3.43..1.4.2 change (Java 11 baseline, deprecated API removals, dependency updates) plus the version bump.

The changes to the three Java files are line-for-line identical to 1.3.43...1.3.43.jaspersoft.2. All three cherry-picks applied cleanly except for the pom version lines.

If you would rather keep release-1.3.43.jaspersoft.2 unchanged, you can create a branch from tag 1.4.2 and retarget this PR to it. The first four commits apply on 1.4.2 as they are, and the merge commit can be dropped.

Testing

On JDK 21 with Maven 3.9.16:

  • mvn -pl openpdf -am install: 1989 tests ran, with 1 failure and 4 skipped. The failure is DocumentTest.testThatVersionIsCorrect. Its regex ^OpenPDF \d+\.\d+\.\d+(-SNAPSHOT)?$ rejects any .jaspersoft.N version, including the existing 1.3.43.jaspersoft.2, so I left the test unchanged.
  • JasperReports master (ext/pdf and its dependencies) compiles against the new jar with -Dopenpdf.classic.version=1.4.2.jaspersoft.1-SNAPSHOT.
  • JasperReports 7.0.8 (core + jdt + pdf) runtime check: a report compiled, filled and exported to PDF.
    • With stock openpdf-1.4.2.jar, it logs Stock OpenPDF detected ....
    • With this build, the warning is gone, and the PDF is valid (%PDF-, 1067 bytes).

asturio and others added 30 commits February 20, 2024 13:03
- set version back to 1.4.1-SNAPSHOT
- Downgrade Java 17 -> Java 11
- Codacy Review

(cherry picked from commit 5749229)
- enable() and disable() in same Test
…ion (LibrePDF#1072)

* LibrePDF#1057 Generating PDF from HTML containing CSS font-size property fails with IllegalArgumentException

---------

Co-authored-by: Radek Wikturna <radek.wikturna@usu.com>
…plied (LibrePDF#1075)

* LibrePDF#1061 When converting HTML to PDF, background color is not applied

---------

Co-authored-by: Radek Wikturna <radek.wikturna@usu.com>
…LibrePDF#1081)

* LibrePDF#156: Throw Exception if PdfWriter.close() is called directly

- Throw an IllegalStateException if PdfWriter.close() is called before
  Document.close() is called.
- Delete old *.lng files in src/main/java
- Update *.lng files in src/main/resources
- BoyScout rule in PdfWriter

* LibrePDF#156: Throw Exception if PdfWriter.close() is called directly

- Codacy Issues

(cherry picked from commit 6c675f7)
- add back explicit dependency to surefire and failsafe
- reformat some files
- use more String.getBytes(withEncoding)
- Update Disabled-Comment in testSurrogatePair()
- other Tests
- display maven version in build
- some changes to keep tests more robust

(cherry picked from commit f17bca3)
- Use more UTF-8 in tests with passwords
- rename methods to not have UTF-8 chars in their names
- moved to config/
- updated forIntelliJ
- created for Eclipse
- Editorconfig updated
- 4 runs of reformatting
- all .java, .md, .yml and .html files
- Only format changed
- Copy all inactive rules back to checkstyle.xml
- Activated many rules.
- Reduced real line-length from 235 to 180
- Fixes some checkstyle-lower-hanging-fruits

(cherry picked from commit 9f8dceb)
- reformatted
- developers: added asturio
- scm just after developers
- minor correction
- checkstyle setup in pluginManagement
- created "release"-profile
- source, javadoc and gpg only run in "release"-profile
- set version vor maven-site-plugin
- gpg.skip not needed anymore
- added -Prelease to createRelease.sh

(cherry picked from commit 1da07d0)
Pick enhancements from 1.3 into 1.4

- Shandra's IndirectObjects
- Lonzak's ECDSA fixes
- Many @OVERRIDES
- Javadoc
- Cleanups
Signed-off-by: Tang Keyin <kevin_kda@yahoo.com.au>
….4.2

The Jaspersoft changes from 1.3.43.jaspersoft.2 are carried as the
cherry-picked commits above, so the tree is OpenPDF 1.4.2 plus those
changes.

Signed-off-by: Tang Keyin <kevin_kda@yahoo.com.au>
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.

6 participants