|
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 also true), EndDoc packs every eligible indirect object - dictionaries, arrays, numbers, names, strings, booleans, nulls - into one or more
Pairs naturally with 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 even minimal PDF parsers can still locate document roots and decrypt content.
Default value: false (opt-in). Setting UseObjectStreams to true silently downgrades to false when UseXRefStream is off (type-2 entries are not representable in the textual xref table per 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, while PDF/A-2 and PDF/A-3 (PDF 1.7) leave it available
Code Example
Size reduction On documents dominated by small indirect dictionaries (multi-page documents, annotations, AcroForm widgets, structure-tree elements, Optional Content layers) the saving is typically 20-40% of the post-FlateDecode file size. A 30-page graphics-only smoke test shrinks from 14502 bytes to 8488 bytes (-41.5%).
See Also UseXRefStream, Compression, Version, PDF Filter Support
|