PDFium Component Docs

método RenderPageThumbnail

Componente: TPdf  ·  Unidad: PDFium
Renderiza cualquier página de base uno en un mapa de bits que cabe dentro de los límites solicitados para la miniatura

Syntax

function RenderPageThumbnail(PageIndex, MaxWidth, MaxHeight: Integer): TBitmap;

Parameters

PageIndexInteger - One-based page index to render
MaxWidthInteger - Maximum thumbnail width in pixels
MaxHeightInteger - Maximum thumbnail height in pixels

Return Value

A caller-owned TBitmap, or nil when the document is inactive, the page index is invalid, or the requested size is not positive

Description

The method loads the requested page temporarily, preserves the page aspect ratio, renders the thumbnail on a white background, and closes the temporary page handle before returning

It does not change PageNumber, replace the current loaded page, or fire page-change notifications

Remarks

Example

Bmp := Pdf1.RenderPageThumbnail(3, 180, 240);
try
  if Bmp <> nil then
    Image1.Picture.Assign(Bmp);
finally
  Bmp.Free;
end;

See Also

TPdf.RenderPage, TPdf.Thumbnail, TPdf.PageCount