pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1829616 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFStreamParser.java
Date Thu, 19 Apr 2018 21:03:01 GMT
Author: tilman
Date: Thu Apr 19 21:03:01 2018
New Revision: 1829616

URL: http://svn.apache.org/viewvc?rev=1829616&view=rev
Log:
PDFBOX-4071: improve error msg

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFStreamParser.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFStreamParser.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFStreamParser.java?rev=1829616&r1=1829615&r2=1829616&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFStreamParser.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdfparser/PDFStreamParser.java Thu
Apr 19 21:03:01 2018
@@ -276,7 +276,8 @@ public class PDFStreamParser extends Bas
                 String id = "" + (char) seqSource.read() + (char) seqSource.read();
                 if( !id.equals( "ID" ) )
                 {
-                    throw new IOException( "Error: Expected operator 'ID' actual='" + id
+ "'" );
+                    throw new IOException( "Error: Expected operator 'ID' actual='" + id
+
+                                           "' at stream offset " + seqSource.getPosition());
                 }
                 ByteArrayOutputStream imageData = new ByteArrayOutputStream();
                 if( isWhitespace() )



Mime
View raw message