PDFium Component Docs

Thumbnail property

Component: TPdf  ·  Unit: PDFium
Decodes an embedded page thumbnail as a TBitmap for the current page or any requested page

Syntax

property Thumbnail: TBitmap; // read only
function ExtractThumbnail(PageNumber: Integer): TBitmap;

Description

Thumbnail decodes the current page’s optional /Thumb image into an owned TBitmap

ExtractThumbnail performs the same operation for any valid one-based page number without changing PageNumber or invalidating current-page caches

Both APIs return nil when the page has no embedded thumbnail; the caller owns and must free a returned bitmap

Remarks

Example

var Preview: TBitmap;
begin
  Preview := Pdf1.ExtractThumbnail(3);
  try
    if Preview <> nil then
      Image1.Picture.Assign(Preview);
  finally
    Preview.Free;
  end;
end;

See Also

Page, Bitmap, Image