Skip to content

Commit

Permalink
upgrade to iText 8
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnost Havelka committed Jun 20, 2023
2 parents 64b8e11 + 487a7be commit bdbd87f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>17</java.version>
<jacoco.version>0.8.10</jacoco.version>
<itext.version>7.2.5</itext.version>
<itext.version>8.0.0</itext.version>
<lorem.version>2.1</lorem.version>
</properties>

Expand Down
2 changes: 1 addition & 1 deletion src/test/java/com/github/aha/poc/itext/BookmarkTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ void addTitle() throws Exception {
PdfNameTree destsTree = pdfDocument.getCatalog().getNameTree(PdfName.Dests);
PdfOutline outlines = pdfDocument.getOutlines(false);
outlines.getAllChildren().forEach(b -> {
int pageNumber = pdfDocument.getPageNumber((PdfDictionary) b.getDestination().getDestinationPage(destsTree.getNames()));
int pageNumber = pdfDocument.getPageNumber((PdfDictionary) b.getDestination().getDestinationPage(destsTree));
log.debug("Bookmark '{}' was found on page {}", b.getTitle(), pageNumber);
assertThat(parts).contains(b.getTitle());
assertThat(PdfTextExtractor.getTextFromPage(pdfDocument.getPage(pageNumber), new LocationTextExtractionStrategy()))
Expand Down

0 comments on commit bdbd87f

Please sign in to comment.