[ 
https://issues.apache.org/jira/browse/TIKA-4898?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18116416#comment-18116416
 ] 

Tim Allison edited comment on TIKA-4898 at 9/17/26 4:48 PM:
------------------------------------------------------------

:robot: suggests that this information is tracked and then nulled out in PDFBox?
{noformat}
 It looks like COSParser already has it: it walks the /Prev chain and records 
every section in 
XrefTrailerResolver, and getTrailerCount() is public — but the resolver is 
reset and nulled when
 parsing finishes, so nothing reaches COSDocument. Linearization would still 
need special-casing
 (the first-page xref's /Prev points at the main one), and a chain-based count 
would miss
 appended bytes that no xref references, which for our forensics use case is 
the interesting case.
 So probably both, not one instead of the other. 
{noformat}


was (Author: [email protected]):
:robot: suggests that this information is tracked and then nulled out in PDFBox?
{noformat}
 It looks like COSParser already has it: it walks the /Prev chain and records 
every section in XrefTrailerResolver, and getTrailerCount() is public — but the 
resolver is reset and nulled when parsing finishes, so nothing reaches 
COSDocument. Linearization would still need special-casing (the first-page 
xref's /Prev points at the main one), and a chain-based count would miss 
appended bytes that no xref references, which for our forensics use case is the 
interesting case. So probably both, not one instead of the other. 
{noformat}

> Improve xref scanning efficiency
> --------------------------------
>
>                 Key: TIKA-4898
>                 URL: https://issues.apache.org/jira/browse/TIKA-4898
>             Project: Tika
>          Issue Type: Task
>            Reporter: Tim Allison
>            Priority: Minor
>         Attachments: PDFJS-6078-screen-annotations.pdf
>
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to