Skip to content

PDF-HUL: Negative value for pdf.ObjectCount with JHOVE 1.34 #1088

@asciim0

Description

@asciim0

While the pdf.ObjectCount has always been off in JHOVE it now takes a particiular turn with JHOVE 1.34.

As hinted at in this fix #989 JHOVE takes the pdf.ObjectCount value from the count of the xref. However, I believe that JHOVE runs into problems when the cross-reference table is a included as a cross-reference stream.
Previously, whenver JHOVE couldn't adequatly report the number of objects, it would return "0". Since JHOVE 1.34 it now returns "-1".

Both are incorrect as a valid PDF cannot have 0 objects (let alone -1), but for backwards compatablity it might make sense to keep the value as "0" for now and to investigate into a more concrete fix to report something more meaningful for pdf.ObjectCount.

Could you also please answer based on what the pdf.ObjectCount is reported? Is a a simple count of the xref entries? If so, does it count through multiple xrefs if present or only the last or first one found?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions