PDFium Delphi Component Docs

Método ExtractThumbnail

Componente: TPdf  ·  Unidade: PDFium
Lê a imagem em miniatura que uma página armazena no ficheiro, sem renderizar a página

Syntax

function ExtractThumbnail(PageNumber: Integer): TBitmap;

PageNumberInteger. One-based page number. A number outside the document returns nil.
ResultTBitmap. The embedded thumbnail as a bitmap the caller owns and must free, or nil when the page stores none.

Description

PDF pages may carry a /Thumb image so a viewer can show a page preview without rasterising the page. This decodes that image and hands it back as a bitmap

It works on any page, not only the current one, and does not change PageNumber: the page is taken from the internal page cache when it is not already loaded

A nil result means the page has no embedded thumbnail. To get a picture in that case, render one with RenderPageThumbnail

See Also

Thumbnail, RenderPageThumbnail, ThumbnailRawData, ThumbnailDecodedData