PDFium Delphi Component Docs

ThumbnailRawData method

Component: TPdf  ·  Unit: PDFium
Read the embedded thumbnail of the current page as its raw, still-encoded stream bytes.

Syntax

function ThumbnailRawData: TBytes;

ResultTBytes. The thumbnail stream exactly as stored, with its filters still applied. Empty when the page carries no thumbnail.

Description

Returns the bytes as the file holds them, so a JPEG-compressed thumbnail comes back as JPEG. That is what a caller wants when the thumbnail is to be copied into another file or handed to an image decoder untouched

For pixels rather than encoded bytes, use ThumbnailDecodedData, or ExtractThumbnail for a ready-made bitmap

An empty result means no thumbnail is stored for the current page

See Also

ThumbnailDecodedData, ExtractThumbnail, Thumbnail