Skip to content

Commit af2f5a4

Browse files
committed
PDFBOX-5951: ignore OpenAction that points to orphan page
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1923708 13f79535-47bb-0310-9956-ffa450edef68
1 parent 175750c commit af2f5a4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pdfbox/src/main/java/org/apache/pdfbox/multipdf/PDFMergerUtility.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,11 @@ else if (openAction instanceof PDDestination)
570570
if (page != null)
571571
{
572572
pageIndexOpenActionDest = srcCatalog.getPages().indexOf(page);
573+
if (pageIndexOpenActionDest == -1)
574+
{
575+
LOG.warn("OpenAction entry ignored because destination page doesn't exist");
576+
openAction = null;
577+
}
573578
}
574579
}
575580

0 commit comments

Comments
 (0)