function RenderTile(Left, Top, Width, Height, PageWidth, PageHeight: Integer; Rotation: TRotation = ro0; Options: TRenderOptions = []; Color: TColor = clWhite): TBitmap;
| Left, Top | Integer. Top-left corner of the tile region to render, in pixels, relative to the full page at the given zoom level. |
| Width, Height | Integer. Size of the tile in pixels. The returned bitmap will have these dimensions. |
| PageWidth, PageHeight | Integer. The full page dimensions in pixels at the desired zoom level. These determine the scale at which the page is rendered. |
| 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 RenderTile(Bitmap: TBitmap; Left, Top, Width, Height, PageWidth, PageHeight: Integer; Rotation: TRotation = ro0; Options: TRenderOptions = []; Color: TColor = clWhite);
| Bitmap | TBitmap. An existing TBitmap to render the tile into. The caller is responsible for creating and freeing this bitmap. |
| Left, Top | Integer. Top-left corner of the tile region to render, in pixels, relative to the full page at the given zoom level. |
| Width, Height | Integer. Size of the tile in pixels. |
| PageWidth, PageHeight | Integer. The full page dimensions in pixels at the desired zoom level. |
| 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 a rectangular tile of the current page. Unlike RenderPage,
which renders the full page at a given size, RenderTile renders only
a cropped region. This is ideal for high-resolution display of large pages where
rendering the full page at once would consume too much memory.
PageWidth / PageHeight define the total rendered
size of the page (the "zoom level"), and Left / Top /
Width / Height define the output window within that
total size.
// Render top-left 800x600 tile of a page scaled to 2000x2828
var Bmp: TBitmap;
Bmp := Pdf.RenderTile(0, 0, 800, 600, 2000, 2828);
try
Image1.Picture.Assign(Bmp);
finally
Bmp.Free;
end;