DynaPDF Manual - Page 676

Previous Page 675   Index   Next Page 677

Function Reference
Page 676 of 860
The OnUpdateWindow() callback function is never excuted when rendering into a device context.
However, the members UpdateOnPathCount and UpdateOnImageCoverage should be initialized as
usual so that the window becomes updated from time to time. See RenderPage() for further
information.
Remarks:
At time of publication the function can be used on Windows only.
Return values:
When the page was fully rendered the return value is 1. When the page was not fully processed, e.g.
due to errors, the return value is 0.
RenderPageToImage (Rendering Engine)
Syntax:
LBOOL pdfRenderPageToImage(
const PPDF* IPDF,
// PDF Instance pointer
UI32 PageNum,
// Page number (numbering starts at 1)
const char* OutFile,
// Output file name or NULL
UI32 Resolution,
// Output resolution or 0
SI32 Width,
// Output width, 0, or -maxWidth
SI32 Height,
// Output height, 0, or -maxHeight
TRasterFlags Flags,
// See RenderPage()
TPDFPixFormat PixFmt,
// Output pixel format
TCompressionFilter Filter,
// See below
TImageFormat Format)
// See below
typedef enum
{
cfFlate
= 0,
// TIFF output
cfJPEG
= 1,
// TIFF or JPEG output
cfCCITT3
= 2,
// TIFF output, see 1 Bit Rendering
cfCCITT4
= 3,
// TIFF output, see 1 Bit Rendering
cfLZW
= 4,
// TIFF output
cfLZWBW
= 5,
// TIFF, see 1 Bit Rendering
cfFlateBW
= 6,
// BMP, PNG, TIFF, see 1 Bit Rendering
cfJP2K
= 7
// JPEG 2000 output
cfNone
= 255, // TIFF output only
// These flags can be combined with cfCCITT3/4, cfFlate, and cfLZW.
cfDitherFloydSteinberg = 0x00001000, // Floyd Steinberg dithering.
cfConvGrayToOtsu
= 0x00002000, // The Otsu filter is a special filter to produce black &
// white images. It is very useful if an OCR scan should be
// applied on the resulting 1 bit image. The flag will be
// considered if the pixel format was set to pxfGray.
cfOrderedDithering
= 0x00004000
// Ordered dithering. The difference in comparison to the
// pixel format pxf1Bit is that we render into a GrayA
// buffer instead of a native 1 bit buffer since this one
// produces incorrect results in certain transparency
// calculations.
}TCompressionFilter;
typedef enum
{
pxf1Bit,
// BMP, PNG, or TIFF output
pxfGray,
// BMP, PNG, JPEG, JPEG 2000, or TIFF output
pxfGrayA, // PNG or TIFF output
 

Previous topic: RenderPageEx (Rendering Engine)

Next topic: 1 Bit Rendering, Dithering