Since I was tracking down an issue having to to with generating DIB in a compressed PDF: [Archive.is] wPDF 4 Manual: Compression related properties
Property CompressStreamMethod
By modifying this property you can let the PDF engine compress (deflate) text. By using compression the file will be reasonable smaller. On the other had compression will create binary data rather than ASCII data. While “deflate” produces the smallest files, “run-length” compression is compatible even to very old PDF reader programs.
Property JPEGQuality
wPDF can compress bitmaps using JPEG. This will work only for true color bitmaps (24 bits/pixel) and if you have set the desired quality in this property.
Property EncodeStreamMethod
If data in the PDF file is binary it can be encoded to be ASCII again. Binary data can be either compressed text or graphics. You can select HEX encoding or ASCII95 which is more effective then HEX.
Property ConvertJPEGData
Note: Only applies to TWPDFExport.
If this property is true JPEG data found in the TWPRichText editor will not be embedded as JPEG data. Instead the bitmap will be compressed using deflate or run length compression. It is necessary to set this property to TRUE if the PDF files must be compatible to older PDF reader programs which are incapable to read JPEG data.
Note that EncodeStreamMethod
does not do compression, but it does belong here because the encodings result in different PDF sizes.
The settings are not documented in more detail, so here are the enumerations explaining them in a bit more depth:
CompressStreamMethod
is of enumerationTWPCompressStreamMethod = (wpCompressNone, wpCompressFlate, wpCompressRunlength, wpCompressFastFlate);
- No compression
- Deflate
- Run-Length Encoding
- Fast Deflate (I could not find on-line references on this, as zlib only supports deflate and wPDF indicates it is using zlib [Archive.is],
ConvertJpegData
is a Boolean; false means no JPEG post processing; true means convert JPEG to bitmap, then useCompressStreamMethod
for the bitmap compression.JPEGQuality
is of enumerationTWPJPEGQuality = (wpNoJPEG, wpJPEG_10, wpJPEG_25, wpJPEG_50, wpJPEG_75, wpJPEG_100);
wpNoJPEG
means bitmaps are left as is- All others will convert bitmaps to JPEG given a quality factor:
- 10%
- 25%
- 50%
- 100%
- Good examples of JPEG compression results:
–jeroen