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 flter to use: Flate, JPEG, JP2K, CCITT3, CCITT4, LZW, LZWBW, FlateBW, JBIG2. | "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:
MBS( "DynaPDF.SetCompressionFilter"; $PDF; "jpeg" )
MBS( "DynaPDF.SetJPEGQuality"; $PDF; 75 )
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
Example Databases
Blog Entries
This function checks for a license.
Created 18th August 2014, last changed 31st August 2018
