DynaPDF Manual - Page 628

Previous Page 627   Index   Next Page 629

Function Reference
Page 628 of 821
// no alpha channel.
= 0x00001000, // Composite the image with a white
// background after rendering. This
// flag is meaningful only for pixel
// formats with an alpha channel.
rfExclPageContent = 0x00002000, // If set, only annotations and form fields will be rendered
= 0x00004000, // Exclude push buttons
= 0x00008000, // Exclude check boxes
= 0x00010000, // Exclude combo boxes
= 0x00020000, // Exclude list boxes
= 0x00040000, // Exclude text fields
= 0x00080000, // Exclude signature fields
// ---------------------------------
= 0x00100000, // Meaningful only, if rfClipToArtBox, rfClipToBleedBox, or
// rfClipToTrimBox is set. If set, the picture size is set to the
// size of the wished bounding box.
= 0x00200000, // Disable Anti-Aliasing for clipping paths. This flag is
// the most important one since clipping paths cause often
// visible artefacts in PDF files with flattened
// transparency.
= 0x00400000, // Disable Anti-Aliasing for text.
= 0x00800000, // Disable Anti-Aliasing for vector graphics.
// Fully disable Anti-Aliasing.
= rfDisableAAClipping | rfDisableAAText | rfDisableAAVector,
rfDisableBiLinearFilter = 0x01000000, // Disable the BiLevel filter for images. Sometimes useful
// if sharp images are needed, e.g. for barcodes.
= rfClipToArtBox | rfClipToBleedBox | rfClipToTrimBox // Internal flags
= 0x02000000, // If set, treat text rendering mode Invisible as Normal.
= 0x10000000
// If set, the page is rendered in the color space of the
// page group, soft proof color space, or output intent (if
// set), and finally converted to the destination color
// space.
typedef SI32 PDF_CALL TOnUpdateWindow(const void* Data, TIntRect Area);
The function renders a PDF page into an image buffer. This function was mainly designed to render
PDF pages in a viewer application but it can also be used for other purposes where fast rendering
into an image buffer is required. It is also possible to render pages into a device context, see
RenderPageEx() for further information.
Before rendering the first page the application should set the path from which external CMaps can
be loaded (see SetCMapDir()). Set the path with the flag lcmDelayed so that the files will only be
loaded if necessary.
It is also strongly recommended to initialize color management before rendering the first page (see
InitColorManagement()) and to set the screen resolution (see SetScreenRes()). The output intent (if
any) is loaded automatically before the page will be rendered if color management is enabled.
Minimal initialization
A few members of the the structure TPDFRasterImage must be correctly initialized, otherwise
nothing can be rendered:
TPDFRasterImage img;
memset(&img, 0, sizeof(img));
img.StructSize = sizeof(img);
= 1.0; // Identity matrix
= 1.0; // Identity matrix (1.0, 0.0, 0.0, 1.0, 0.0, 0.0)

Previous topic: RenderPage (Rendering Engine)

Next topic: Basics, Pixel Formats