API reference › Import & Output APIs
pdfSetUseObjectStreams
Emit the document with PDF 1.5 object streams and a
Purpose — Emit the document with PDF 1.5 object streams and a cross-reference stream instead of a classic xref table.
Description — When enabled, pdfCloseFile serializes normally and then repacks eligible non-stream objects into /ObjStm compressed object streams with an /XRef stream trailer — a noticeably smaller file for dictionary-heavy documents. Set it any time before close. Readers must support PDF 1.5+ (all modern viewers do).
BOOL32 __stdcall pdfSetUseObjectStreams(PPDF IPDF, BOOL32 Value);
Return value — TRUE unless the instance handle is invalid.
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Setters
pdfSetUseObjectStreams
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.