jhove
jhove copied to clipboard
False positive PDF-HUL-110 "Invalid object number or object stream" for /Filter in brackets ?
It seems that JHOVE reports PDF-HUL-110 "Invalid object number or object stream" for /Filter arguments in brackets. According to ISO 32000-1:2008 section 7.4.1 Filters can be listed in brackets to form a pipeline, e.g.
/Filter [/ASCII85Decode /LZWDecode]
Unfortunately I cannot share the file I have the problem with. In this concrete example, there brackets are around a single filter instead of a pipeline - however, this shouldn't throw an error. The object is:
4977 0 obj
<<
/N 54
/Type /ObjStm
/First 500
/Filter [/FlateDecode]
/Length 1502
>>
Since the filter is not really a pipeline but a single filter, I removed the brackets and rebuilt the xref, resulting in:
4977 0 obj
<<
/N 54
/Type /ObjStm
/First 500
/Filter /FlateDecode
/Length 1502
>>
The result is that the file now validates with a different error for a different object (investigation currently ongoing).
The standard can be interpreted in such a way that a pipeline, indicated by brackets, has to contain at least 2 filters:
Filters may be cascaded to form a pipeline that passes the stream through two or more decoding transformations in sequence. For example, data encoded using LZW and ASCII base-85 encoding (in that order) shall be decoded using the following entry in the stream dictionary: EXAMPLE 2 /Filter [/ASCII85Decode /LZWDecode]
It therefore can be considered correct behavior that JHOVE throws an error on a Filter pipleline with a single filter. However, in that case the error reported should be, IMO, PDF-HUL-45 "Malformed filter" and not PDF-HUL-110 "Invalid object number or object stream".