Forum › How do I...?

XREF table without subsections

MartinM
Hi,

please, is there a way to force Prince (using version 16) to generate PDF with XREF table where cross-reference section contains only one subsection, whose object numbering begins at 0.

I need the XREF table to look like this:

xref
0 7
0000000000 65535 f
0000000009 00000 n
0000000074 00000 n
0000000120 00000 n
0000000179 00000 n
0000000300 00000 n
0000000384 00000 n

But no matter what I tried (tagged, non-tagged, different output profiles), I always ended up with something like this:

xref
0 1
0000000000 65535 f
3 1
0000025325 00000 n
23 2
0000025518 00002 n
0000025635 00000 n
30 1
0000025777 00000 n

I didn't find any parameter, which would force this. Is there any way to achieve it?

Thank you in advance for any help.
wezm
The subsections in the cross-reference table are due to the use of object streams. These can be disabled by passing --no-object streams. Alternatively post-processing the PDF can also produce the single xref table you're looking for.

One option is passing a single PDF though pdfunite from the poppler project:
pdfunite in.pdf out.pdf


Another is mutool from MuPDF:
mutool clean in.pdf out.pdf

Edited by wezm

MartinM
Thank you very much for your answer!

Tried mutool and the result seems to be exactly what I need.

Have a great day!
MartinM
For the record: Passing --no-object-streams works as well!

Thank you again!