|
THotPDF.CompressDocument
|
Properties CompactFontSubsetting EnableFontSubsetting |
|
Turns on every writer option that makes the document smaller, with one switch.
Delphi syntax: property CompressDocument: Boolean;
C++ syntax: __property bool CompressDocument;
Description Set CompressDocument to true before BeginDoc to write the next document as small as HotPDF can make it without changing how it looks. For that document, BeginDoc turns on:
Object streams need PDF 1.5. When Version is older, it is raised to PDF 1.5 unless the version is locked; PDF/A-1 output keeps its classic cross-reference table, as the standard requires
CompressDocument does not change the settings you chose. EndDoc restores the values of
The property is off by default. A three-page document of mixed English and Chinese text in Arial and SimSun drops from about 10 MB to about 20 KB, most of it from font subsetting. The trade-off is that the output is harder to edit later: subset fonts cannot show characters the document does not use, and compressed object streams are not readable in a text editor
Example:
See also: CompactFontSubsetting, EnableFontSubsetting, CompressLoadedDocument |