|
THotPDF.UseObjectStreams
|
Top Previous Next |
|
Pack eligible indirect objects into PDF 1.5
Delphi syntax: property UseObjectStreams: Boolean;
C++ syntax: __property bool UseObjectStreams;
Description When UseObjectStreams is true (and UseXRefStream is true as well), EndDoc packs all eligible indirect objects - dictionaries, arrays, numbers, names, strings, booleans and nulls - into one or more
Works naturally alongside the UseXRefStream property for the most compact PDF 1.5+ writer pipeline. The ObjStm packer leaves stream objects, the encryption dictionary and the trailer-pointed Catalog and Info dictionaries uncompressed so that even minimal PDF parsers can still locate the document roots and decrypt the content.
Default value: false (opt-in). Setting UseObjectStreams to true silently falls back to false when UseXRefStream is off (type-2 entries cannot be represented in the textual xref table, per the spec) or when Version is below PDF 1.5.
It is also forced off under PDF/A-1: ISO 19005-1 (PDF 1.4, clause 6.1.4) forbids compressed object streams together with the cross-reference streams they ride on, so EndDoc emits a classic xref table whenever PDFACompliance names a part-1 level, whilst PDF/A-2 and PDF/A-3 (PDF 1.7) leave it available
Code Example
Size savings On documents dominated by small indirect dictionaries (multi-page documents, annotations, AcroForm widgets, structure-tree elements, Optional Content layers) the saving typically amounts to 20-40% of the post-FlateDecode file size. A 30-page graphics-only smoke test goes down from 14502 bytes to 8488 bytes (-41.5%).
See Also UseXRefStream, Compression, Version, PDF Filter Support
|