procedure RenderPage(DeviceContext: HDC; Left, Top, Width, Height: Integer; Rotation: TRotation = ro0; Options: TRenderOptions = []);
| DeviceContext | HDC. The target Windows device context to render into (screen canvas, printer DC or bitmap DC) |
| Left, Top | Integer. Top-left corner of the destination rectangle within the device context, in device pixels |
| Width, Height | Integer. Size of the destination rectangle in device pixels. The page is scaled to fill this area |
| Rotation | TRotation. Display rotation applied to the page: ro0 (default), ro90, ro180 or ro270 |
| Options | TRenderOptions. A set of TRenderOption flags controlling rendering quality and behaviour, such as reAnnotations, reLcd, reGrayscale and rePrinting |
function RenderPage(Left, Top, Width, Height: Integer; Rotation: TRotation = ro0; Options: TRenderOptions = []; Color: TColor = clWhite): TBitmap;
| Left, Top | Integer. Top-left offset within the output bitmap where rendering begins, in pixels |
| Width, Height | Integer. Size of the destination area in pixels. The page is scaled to fill this area |
| Rotation | TRotation. Display rotation applied to the page: ro0 (default), ro90, ro180 or ro270 |
| Options | TRenderOptions. A set of TRenderOption flags controlling rendering quality and behaviour |
| Color | TColor. Background fill colour for the bitmap before rendering. Defaults to clWhite |
procedure RenderPage(Bitmap: TBitmap; Left, Top, Width, Height: Integer; Rotation: TRotation = ro0; Options: TRenderOptions = []; Color: TColor = clWhite);
| Bitmap | TBitmap. An existing TBitmap to render into. The caller is responsible for creating and freeing this bitmap |
| Left, Top | Integer. Top-left offset within the bitmap where rendering begins, in pixels |
| Width, Height | Integer. Size of the destination area in pixels. The page is scaled to fill this area |
| Rotation | TRotation. Display rotation applied to the page: ro0 (default), ro90, ro180 or ro270 |
| Options | TRenderOptions. A set of TRenderOption flags controlling rendering quality and behaviour |
| Color | TColor. Background fill colour applied to the bitmap before rendering. Defaults to clWhite |
For the bitmap overloads, Color = clNone or Color = clDefault requests a transparent background and a PDFium bitmap with alpha support. Uncovered pixels keep zero alpha even if the native page background-transparency query returns false; clWhite remains the default opaque background
Renders the current page to a device context or bitmap. Three overloads are available:
(1) renders directly to an HDC (suitable for printing or on-screen painting);
(2) returns a newly created TBitmap that the caller must free;
(3) renders into an existing TBitmap passed as parameter
The Left, Top, Width, Height
parameters define the output rectangle. Rotation applies a display
rotation (use PageRotation to match the stored page rotation)
Flags control rendering quality (antialiasing, LCD text, etc.)
The bundled Windows native modules in internal v3.414.2 resolve the font dictionary referenced by an ExtGState Font array, as specified by ISO 32000-1 Table 58, including fonts that have no entry in the page Font resource map
Type3 selection initialises the same resource context and font metrics as explicit Tf selection, preserving inherited glyph resources; this rendering correction does not add general Type3 text regeneration or editing support
var Bmp: TBitmap;
Bmp := Pdf.RenderPage(0, 0, 800, 1000);
try
Image1.Picture.Assign(Bmp);
finally
Bmp.Free;
end;