WPCubed Product Support

Textcompression in Delphi 10.1

wpsupport

The wPDF VCL has these properties which affect the size of the PDF - recommended in bold style

property CompressStreamMethod: TWPCompressStreamMethod

wpCompressNone, wpCompressFlate, wpCompressRunlength, wpCompressFastFlate

property JPEGQuality: TWPJPEGQuality

wpNoJPEG, wpJPEG_10, wpJPEG_25, wpJPEG_50, wpJPEG_75, wpJPEG_100

property FontMode: TWPPDFFontMode

pUseTrueTypeFonts, wpEmbedTrueTypeFonts, wpEmbedSymbolTrueTypeFonts, wpUseBase14Type1Fonts, wpEmbedSubsetTrueType_Charsets, wpEmbedSubsetTrueType_UsedChar

,wpEmbedType3 // Build Type3 Subset Fonts

,wpEmbedCIDFonts // Shortcut for CID Mode, change everyhing in Fontmode !

The equivalent for TextCompression is CompressStreamMethod.

#2 ♥ 0
2.3k Views 2 users read 1 min

Hi,

There is a property in the ActiveX documentation.

Property TextCompression
By modifying this property you can let the PDF engine compress text. By using compression the
file will be reasonable smaller. On the other had compression will create binary data rather than
ASCII data. Please note that bitmaps and embedded fonts will be always compressed, either using
Deflate or JPEG compression.

With this setting, the size of the pdf document produced in our projects written under .net was reduced by 40%. Is there a way to use this setting from Delphi? I couldn't find any reference to it in the official documentation, neither parameter, nor definition.

Thanks for the answer!

#1 ♥ 0