|
THotPDF.CompressDocument
|
Properties CompactFontSubsetting EnableFontSubsetting |
|
Switches on every writer option that shrinks the document, using a single property
Delphi syntax: property CompressDocument: Boolean;
C++ syntax: __property bool CompressDocument;
Description Set CompressDocument to true before BeginDoc and the next document is written as small as HotPDF can manage without altering its appearance. For that document, BeginDoc switches on:
Object streams require PDF 1.5. If Version is older it moves up to PDF 1.5 unless the version is locked; PDF/A-1 output retains its classic cross-reference table, exactly as the standard demands
CompressDocument leaves the settings you chose untouched. Once the document has been written, EndDoc puts
The property is off by default. A three-page document mixing English and Chinese text in Arial and SimSun falls from roughly 10 MB to about 20 KB, with font subsetting doing most of that work. The trade-off is output that is harder to edit afterwards: subset fonts cannot display characters the document never uses, and compressed object streams cannot be read in a text editor
Example:
See also: CompactFontSubsetting, EnableFontSubsetting, CompressLoadedDocument |