You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by le...@apache.org on 2013/08/18 15:26:49 UTC
svn commit: r1515101 -
/pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/parser/PreflightParser.java
Author: leleueri
Date: Sun Aug 18 13:26:48 2013
New Revision: 1515101
URL: http://svn.apache.org/r1515101
Log:
[PDFBOX-1674] Fix error when the object identifiers isn't terminated by any EOL character
Modified:
pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/parser/PreflightParser.java
Modified: pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/parser/PreflightParser.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/parser/PreflightParser.java?rev=1515101&r1=1515100&r2=1515101&view=diff
==============================================================================
--- pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/parser/PreflightParser.java (original)
+++ pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/parser/PreflightParser.java Sun Aug 18 13:26:48 2013
@@ -685,10 +685,12 @@ public class PreflightParser extends Non
{
addValidationError(new ValidationError(ERROR_SYNTAX_OBJ_DELIMITER, "Single space expected"));
+
// reset pdfSource cursor to read object information
pdfSource.seek(offset);
readObjNr = readObjectNumber();
readObjGen = readGenerationNumber();
+ skipSpaces(); // skip spaces between Object Generation number and the 'obj' keyword
for (char c : OBJ_MARKER)
{
if (pdfSource.read() != c)