Class CompressionOptimizer
- Namespace
- SoftZenPdf.Optimizer
- Assembly
- SoftZenPdf.Optimizer.dll
Recompresses every stream that is not image-codec data (page content, fonts, forms, ICC profiles, uncompressed images and so on) with Deflate at the strongest setting, and strips encoding filters such as ASCII85 that sit in front of JPEG, CCITT, JBIG2 or JPEG 2000 data. A stream is only replaced when the result is smaller. Metadata streams are left as they are so they stay readable by tools that scan files for XMP. With UseObjectStreams, every other object is packed into compressed object streams as well.
public sealed class CompressionOptimizer : OptimizationHandler
- Inheritance
-
CompressionOptimizer
- Inherited Members
Properties
- Level
The Deflate setting. Defaults to SmallestSize.
- UseObjectStreams
Packs dictionaries, arrays and other non-stream objects into compressed object streams and writes a compressed cross-reference stream (PDF 1.5). This usually saves the most on text-heavy and form-heavy files. Defaults to true; files that declare PDF/A-1 conformance keep a classic cross-reference table, since PDF/A-1 does not allow object streams.