| Components | All | New | MacOS | Windows | Linux | iOS | ||||
| Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old | |
DynaPDF.SetCompressionFilter
The function sets the compression filter which is used to compress images.
| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
| DynaPDF | 3.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
MBS( "DynaPDF.SetCompressionFilter"; PDF; Filter ) More
Parameters
| Parameter | Description | Example |
|---|---|---|
| The PDF reference returned from DynaPDF.New. | ||
| Filter | The compression filter to use: Flate, JPEG, JP2K, CCITT3, CCITT4, LZW, LZWBW, FlateBW, JBIG2. Since version 16.6 possible: MRC |
"JPEG" |
Result
Returns OK on success.
Description
The function sets the compression filter which is used to compress images.1 bit and 4 bit images are always compressed with Flate independent of the current compression filter. The filters are described in detail at InsertImage in DynaPDF help file.
See also SetCompressionFilter function in DynaPDF manual.
Examples
Compress images with 75% JPEG compression:
Disable compression for best results:
MBS( "DynaPDF.SetCompressionFilter"; $PDF; "flate" )
See also
- DynaPDF.ClipPath
- DynaPDF.DrawCircle
- DynaPDF.GetCompressionFilter
- DynaPDF.GetCompressionLevel
- DynaPDF.InsertImage
- DynaPDF.InsertImageFile
- DynaPDF.New
- DynaPDF.SetCompressionLevel
- DynaPDF.SetJPEGQuality
- DynaPDF.SetSaveNewImageFormat
Release notes
- Version 16.6
- Added MRC as possible filter for DynaPDF.SetCompressionFilter function.
Example Databases
Blog Entries
This function checks for a license.
Created 18th August 2014, last changed 26th November 2026
MarkDown version: DynaPDFSetCompressionFilter.md