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 behavior, 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 behavior. |
| Color | TColor. Background fill color 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 behavior. |
| Color | TColor. Background fill color applied to the bitmap before rendering. Defaults to clWhite. |
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.).
var Bmp: TBitmap;
Bmp := Pdf.RenderPage(0, 0, 800, 1000);
try
Image1.Picture.Assign(Bmp);
finally
Bmp.Free;
end;