[
https://issues.apache.org/jira/browse/PDFBOX-5382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17499136#comment-17499136
]
Michael Klink edited comment on PDFBOX-5382 at 2/28/22, 7:04 PM:
-----------------------------------------------------------------
Beware, consider these cases:
{noformat}
xref
0 10
0000000005 65535 f
0000000018 00000 n
0000000348 00000 n
0000000422 00000 n
0000000481 00000 n
0000000000 00001 f
0000003138 00000 n
0000032630 00000 n
0000033308 00000 n
0000033489 00000 n
{noformat}
and
{noformat}
xref
0 5
0000000000 65535 f
0000000018 00000 n
0000000348 00000 n
0000000422 00000 n
0000000481 00000 n
6 4
0000003138 00000 n
0000032630 00000 n
0000033308 00000 n
0000033489 00000 n
{noformat}
The former cross reference table has an entry for each object number, the
latter not.
If I understand theĀ {{COSDocument}} cross reference {{Map}} correctly, though,
it will contain the same entries, with keys 1..4 and 6..9, because no entries
will be generated for *f* cross reference lines. Thus, determining gaps in the
actual cross reference tables cannot be determined based on this {{Map}} alone.
was (Author: mkl):
Beware, consider these cases:
{noformat}
xref
0 10
0000000005 65535 f
0000000018 00000 n
0000000348 00000 n
0000000422 00000 n
0000000481 00000 n
0000000000 00001 f
0000003138 00000 n
0000032630 00000 n
0000033308 00000 n
0000033489 00000 n
{noformat}
and
{noformat}
xref
0 5
0000000000 65535 f
0000000018 00000 n
0000000348 00000 n
0000000422 00000 n
0000000481 00000 n
6 4
0000003138 00000 n
0000032630 00000 n
0000033308 00000 n
0000033489 00000 n
{noformat}
The former cross reference table has an entry for each object number, the
latter not.
If I understand theĀ {{COSDocument}} cross reference {{Map}} correctly, though,
it will contain the same entries, with keys 1..4 and 6..9, because no entries
will be generated for *f* entries.. Thus, determining gaps in the actual cross
reference tables cannot be determined based on this {{Map}} alone.
> Detect gaps in cross reference table
> ------------------------------------
>
> Key: PDFBOX-5382
> URL: https://issues.apache.org/jira/browse/PDFBOX-5382
> Project: PDFBox
> Issue Type: Improvement
> Components: Signing
> Affects Versions: 2.0.25
> Reporter: Tilman Hausherr
> Assignee: Tilman Hausherr
> Priority: Minor
> Fix For: 2.0.26, 3.0.0 PDFBox
>
>
> Detect PDF files with gaps in the cross reference table because these may
> fail validation in Acrobat Reader, see related SO answer.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]