Xojo Conferences
MBSOct2019CologneDE

DynaPDF Manual - Page 643

Previous Page 642   Index   Next Page 644

Function Reference
Page 643 of 770
which is available in most programming languages. RGB colors can be constructed with the macro
PDF_RGB() or with the function RGB() which is available in most programming languages.
The function requires an open page, template, or pattern.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
SetColorSpace
Syntax:
LBOOL pdfSetColorSpace(
const PPDF* IPDF,
// Instance pointer
TPDFColorSpace ColorSpace) // see below
typedef enum
{
csDeviceRGB
= 0,
csDeviceCMYK = 1,
csDeviceGray = 2
}TPDFColorSpace;
The function activates a device color space in the graphics state. All color values must be defined in
the current color space. Images or EMF graphics are automatically converted to the current color
space. The default color conversion rules can be modified with the function SetGStateFlags().
Extended color spaces can be set with SetExtColorSpace(), SetExtFillColorSpace(), and
SetExtStrokeColorSpace().
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
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;
 

Previous topic: SetColSortField, SetColorMask, SetColors

Next topic: SetCompressionLevel, SetContent