diff --git a/jhove-modules/pdf-hul/src/main/java/edu/harvard/hul/ois/jhove/module/PdfModule.java b/jhove-modules/pdf-hul/src/main/java/edu/harvard/hul/ois/jhove/module/PdfModule.java index be16a7688..264afc450 100644 --- a/jhove-modules/pdf-hul/src/main/java/edu/harvard/hul/ois/jhove/module/PdfModule.java +++ b/jhove-modules/pdf-hul/src/main/java/edu/harvard/hul/ois/jhove/module/PdfModule.java @@ -1531,7 +1531,10 @@ protected boolean readXRefTables(RepInfo info) throws IOException { // (Most likely we've hit the keyword "trailer". break; } - _objCount = ((Numeric) _parser.getNext()).getIntegerValue(); + token = _parser.getNext(); + if (token instanceof Numeric) { + _objCount = ((Numeric) token).getIntegerValue(); + } if (_xref == null) { _xref = new long[_objCount]; }