DynaPDF Manual - Page 644

Previous Page 643   Index   Next Page 645

Function Reference
Page 644 of 839
// no alpha channel.
rfCompositeWhite
= 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
rfExclButtons
= 0x00004000, // Exclude push buttons
rfExclCheckBoxes
= 0x00008000, // Exclude check boxes
rfExclComboBoxes
= 0x00010000, // Exclude combo boxes
rfExclListBoxes
= 0x00020000, // Exclude list boxes
rfExclTextFields
= 0x00040000, // Exclude text fields
rfExclSigFields
= 0x00080000, // Exclude signature fields
// ---------------------------------
rfScaleToBBox
= 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.
rfDisableAAClipping
= 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.
rfDisableAAText
= 0x00400000, // Disable Anti-Aliasing for text.
rfDisableAAVector
= 0x00800000, // Disable Anti-Aliasing for vector graphics.
// Fully disable Anti-Aliasing.
rfDisableAntiAliasing
= rfDisableAAClipping | rfDisableAAText | rfDisableAAVector,
rfDisableBiLinearFilter = 0x01000000, // Disable the BiLevel filter for images. Sometimes useful
// if sharp images are needed, e.g. for barcodes.
rfClipBoxMask
= rfClipToArtBox | rfClipToBleedBox | rfClipToTrimBox // Internal flags
rfRenderInvisibleText
= 0x02000000, // If set, treat text rendering mode Invisible as Normal.
rfEnableBlendCS
= 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.
rfRenderPrintState
= 0x20000000, // If set, the print state of layers, annotations, and form
// fields will be rendered.
rfForceInterpolation
= 0x40000000
// If set, image interpolation will be applied.
}TRasterFlags;
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);
img.Matrix.a
= 1.0; // Identity matrix
 

Previous topic: RenderPage (Rendering Engine)

Next topic: Basics, Pixel Formats