DynaPDF Manual - Page 659

Previous Page 658   Index   Next Page 660

Function Reference
Page 659 of 787
SetCompressionFilter
Syntax:
LBOOL pdfSetCompressionFilter(
const PPDF* IPDF,
// Instance pointer
TCompressionFilter Filter) // see below
typedef enum
{
cfFlate
= 0,
cfJPEG
= 1,
cfCCITT3
= 2, // PDF or TIFF output
cfCCITT4
= 3, // PDF or TIFF output
cfLZW
= 4, // TIFF or GIF output
cfReserved = 5, // Reserved for future extensions.
cfFlateBW
= 6, // TIFF, PNG, or BMP output
cfJP2K
= 7, // PDF or JPEG2000 output
cfJBIG2
= 8, // PDF output only
// Special flags for AddRasImage(), RenderPageToImage(), and RenderPDFFile().
cfDitherFloydSteinberg = 0x00001000,
cfConvGrayToOtsu
= 0x00002000
}TCompressionFilter;
The function sets the compression filter that should be used to compress images. The filters are
described in detail at InsertImageEx().
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
SetCompressionLevel
Syntax:
LBOOL pdfSetCompressionLevel(
const PPDF* IPDF,
// Instance pointer
TCompressionLevel CompressLevel) // see below
typedef enum
{
clNone
= 0, // No compression (ignored for images)
clDefault = 1, // Normal compression ratio
clFastest = 2, // Less compression ratio but faster
clMax
= 3
// Maximum compression ratio but slower
}TCompressionLevel;
The function sets the current compression level. If the compression level is clNone, content streams
will be left uncompressed. This value is useful if a content stream must be debugged, the value will
be ignored for image streams. The compression level is also used by certain image compression
filters, see InsertImage() for further information.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
 

Previous topic: SetColors, SetColorSpace

Next topic: SetContent, SetDateTimeFormat

Start Chat