Xojo Conferences
MBSOct2019CologneDE

DynaPDF Manual - Page 347

Previous Page 346   Index   Next Page 348

Function Reference
Page 347 of 770
GetCompressionFilter
Syntax:
SI32 pdfGetCompressionFilter(
const PPDF* IPDF) // Instance pointer
typedef enum
{
cfFlate = 0,
cfJPEG
= 1,
cfJP2K
= 7
}TCompressionFilter;
The function returns the standard compression filter for images. Note that 1 bit images are always
compressed with Flate.
GetCompressionLevel
Syntax:
SI32 pdfGetCompressionLevel(
const PPDF* IPDF) // Instance pointer
typedef enum
{
clNone
= 0,
clDefault = 1,
clFastest = 2,
clMax
= 3
}TCompressionLevel;
The function returns the active compression level. JPEG images are compressed with optimized
Huffmann tables if the compression level is clMax. This results in 5% to 10% better compression ratio
without losing quality. The compression level can also be used to switch the compression mode to
real or integer when using the JPEG2000 compression filter (see also InsertImage()).
GetContent
Syntax:
SI32 pdfGetContent(
const PPDF* IPDF,
// Instance pointer
char* ADDR BufSize) // Buffer
This function returns a pointer to the content stream of the currently open page or template. The
parameter BufSize gets the buffer size in bytes; this parameter must not be set to NULL.
The page or template must be open with EditPage() or EditTemplate() beforehand.
When no further objects must be added it is possible to edit the buffer directly to improve processing
speed. However, when changing the buffer size it is highly recommended to update the content
stream with the function SetContent().
 

Previous topic: GetColorSpaceObjEx

Next topic: GetDefBitsPerPixel, GetDescent