Description: Do not fail if an ObjStm ends with a number
 Without this fix, pdftk fails for example on particular PDF version 1.5
 documents generated by newer pdflatex versions.

 The actual bug is in the method PRTokeniser#nextValidToken. This method has
 the feature that it treats an indirect object reference (such as 24 0 R) as a
 single token. Therefore when it sees a number, it has to look ahead to see if
 the number is actually the start of an indirect object reference.  If, however,
 the object stream ends during this lookahead then it would wrongly fail. So it
 will go wrong whenever the last object in an object stream is a number.
Author: Robin Houston <robin.houston@gmail.com>
Bug-Debian: http://bugs.debian.org/687669

-- 

--- a/java/com/lowagie/text/pdf/PRTokeniser.java
+++ b/java/com/lowagie/text/pdf/PRTokeniser.java
@@ -272,6 +272,12 @@
                 }
             }
         }
+        if (level > 0) {
+            type = TK_NUMBER;
+            file.seek(ptr);
+            stringValue = n1;
+            return;
+        }
         throwError("Unexpected end of file");
     }
     
