You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2022/07/03 11:13:17 UTC
svn commit: r1902427 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/action/PDActionEmbeddedGoTo.java
Author: tilman
Date: Sun Jul 3 11:13:17 2022
New Revision: 1902427
URL: http://svn.apache.org/viewvc?rev=1902427&view=rev
Log:
PDFBOX-5470: fix check of GoToE destination, as suggested by Gilad Denneboom
Modified:
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/action/PDActionEmbeddedGoTo.java
Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/action/PDActionEmbeddedGoTo.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/action/PDActionEmbeddedGoTo.java?rev=1902427&r1=1902426&r2=1902427&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/action/PDActionEmbeddedGoTo.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/action/PDActionEmbeddedGoTo.java Sun Jul 3 11:13:17 2022
@@ -22,6 +22,7 @@ import org.apache.pdfbox.cos.COSArray;
import org.apache.pdfbox.cos.COSBase;
import org.apache.pdfbox.cos.COSBoolean;
import org.apache.pdfbox.cos.COSDictionary;
+import org.apache.pdfbox.cos.COSInteger;
import org.apache.pdfbox.cos.COSName;
import org.apache.pdfbox.pdmodel.common.filespecification.PDFileSpecification;
import org.apache.pdfbox.pdmodel.interactive.documentnavigation.destination.PDDestination;
@@ -87,10 +88,10 @@ public class PDActionEmbeddedGoTo extend
if (destArray.size() >= 1)
{
COSBase page = destArray.getObject(0);
- if (!(page instanceof COSDictionary))
+ if (!(page instanceof COSInteger))
{
- throw new IllegalArgumentException("Destination of a GoToE action must be "
- + "a page dictionary object");
+ throw new IllegalArgumentException(
+ "Destination of a GoToE action must be an integer");
}
}
}