DynaPDF Manual - Page 647

Previous Page 646   Index   Next Page 648

Function Reference
Page 647 of 839
Blending color spaces can be enabled with the flag rfEnableBlendCS. They are not enabled by default
because much more memory and processing time is required to render a page in this way since the
page must first be rendered in the blending color space and finally converted back to the destination
color space.
Rendering PDF Pages
Most members of the structure TPDFRasterImage are meaningful when pages are rendered in a
viewer application. For other purposes most members can be set to their defaults.
RenderPage() renders a PDF page according to the page's orientation and bounding boxes. When a
crop box is present the page is scaled and clipped into the crop box. When no crop box is present the
media box is used instead. This is the default behaviour in viewer applications.
DefScale specifies how the page should be scaled into the image buffer. If the width and height of the
image buffer corresponds with the scaled width and height of the page, psFitWidth, psFitHeight,
and psFitBest produce all the same result (see enum TPDFPageScale). If the width or height are
different, the page is scaled into the image according to DefScale.
The mode psFitZoom should be used when zooming into a page since it avoids adjustments on the
transformation matrix.
When a page is scaled into the destination image it is usually best to draw the page into a frame
rectangle. The frame rectangle represents the area outside the page's bounding box but inside the
optional clipping rectangle.
Example:
Frame rectangle filled with an
Without the frame rectangle there
arbitrary color.
is no way to determine where the
page contents starts or ends.
Page area
Page area
 

Previous topic: Blending Color Spaces

Next topic: The Transformation Matrix