THotPDF.RenderLoadedPageToBitmap Method

 

THotPDF.RenderLoadedPageToBitmap

THotPDF

 

Top

Renders a loaded page to a 24-bit RGB GDI bitmap at the specified DPI resolution, including colored and uncoloured tiling patterns and axial or radial shading patterns. The caller is responsible for freeing the bitmap. Returns nil on failure

The bitmap covers the visible part of the page, its /CropBox clipped to its /MediaBox (see GetLoadedPageVisibleBox); content outside it is not drawn

 

Delphi syntax:

function RenderLoadedPageToBitmap(PageIndex, DPI: Integer): TBitmap;

 

Description

Renders a loaded page to a 24-bit RGB GDI bitmap at the specified DPI resolution. Pattern color spaces are resolved through page or Form XObject resources, scn and SCN preserve colored pattern names or uncoloured base tints, and pattern paint is clipped to the active fill or widened stroke path

Tiling pattern streams are tokenized once per paint and reused across visible cells. Pattern matrices, cell bounding boxes, nested resources, graphics-state isolation, and color suppression for uncoloured cells are honored. Rendering rejects zero or near-zero steps, more than 16,384 cells per paint, and pattern nesting deeper than four levels

Type 2 axial and Type 3 radial shadings evaluate their function objects through the declared color space, honor the shading domain and extension flags, and work for bitmap and direct device-context rendering. Radial shadings use batched Gouraud triangles with transformed circle chord error bounded to 0.35 device pixels and adaptive color subdivision bounded to two RGB levels, with a 262,144-triangle ceiling. The caller owns and must free a non-nil bitmap result

For bounded recognition and atomic invisible-text publication, see Searchable OCR Text Layers