jhove icon indicating copy to clipboard operation
jhove copied to clipboard

False positive for PDF-HUL-45 with Filter as indirect object

Open asciim0 opened this issue 3 years ago • 0 comments

It seems that JHOVE throws the PDF-HUL-45 "Malformed FIlter" validation error when the filter is referenced as an indirect object. Unfortunately I cannot share the file, but the example is as follows:

1402 0 obj
<</BitsPerComponent 8
/ColorSpace 1817 0 R
/Filter 1401 0 R
/Height 258
/Length 22703
/Subtype/Image
/Type/XObject
/Width 554>>stream

where the content of the referenced object 1401 is:

1401 0 obj
/DCTDecode
endobj

When I replace "/Filter 1401 0 R" with "/Filter /DCTDecode" and rebuild the xref, the PDF validates fine.

It appears that the according section in the code starts here: https://github.com/openpreserve/jhove/blob/47f077fcb09d3dd5720aeeb4abf27de5dac48d19/jhove-modules/pdf-hul/src/main/java/edu/harvard/hul/ois/jhove/module/pdf/PdfStream.java#L154

Maybe someone who can actually understand the code (not me) can verify this :-)

asciim0 avatar Apr 15 '21 14:04 asciim0