PDFPAGE_Thumbnail
IPDFDocument3 :: PDF page methods

See Also Example
Collapse All

This property gets or sets a thumbnail preview of the current page.

Syntax

LONG PDFPAGE_Thumbnail { get; set; }
Value
Index of the thumbnail

Remarks

A PDF document may define thumbnail images representing the contents of its pages in miniature form. A viewer application can then display these images on the screen, allowing the user to navigate to a page by clicking a thumbnail image with the mouse. This property indicates which image appears as a thumbnail. The value for this property is returned from a method such asAddImageFromFileName.

Equivalent in new interface: IPDFDocument4::Thumbnail.

Example

How to Set a Custom Thumbnail for a PDF Page

Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
PDF.PageMode := pmUseThumbs;
PDF.BeginDoc;
th1 := PDF.AddImageFromFile('thumb1.jpg');
th2 := PDF.AddImageFromFile('thumb2.jpg');
PDF.PDFPAGE_Thumbnail := th1; { set thumbnail for 1st page }
PDF.NewPage;
PDF.PDFPAGE_Thumbnail := th2; { set thumbnail for 2nd page }
PDF.EndDoc;
C/C++
[copy to clipboard]
// PDF object is supposed to be created
PDF->PageMode = TxPageMode.pmUseThumbs;
PDF->BeginDoc();
LONG th1 = PDF->AddImageFromFile("thumb1.jpg");
LONG th2 = PDF->AddImageFromFile("thumb2.jpg");
PDF->PDFPAGE_Thumbnail = th1; // set thumbnail for 1st page
PDF->NewPage();
PDF->PDFPAGE_Thumbnail = th2; // set thumbnail for 2nd page
PDF->EndDoc();
C#
[copy to clipboard]
// PDF object is supposed to be created
PDF.PageMode = TxPageMode.pmUseThumbs;
PDF.BeginDoc();
long th1 = PDF.AddImageFromFile("thumb1.jpg");
long th2 = PDF.AddImageFromFile("thumb2.jpg");
PDF.PDFPAGE_Thumbnail = th1; // set thumbnail for 1st page
PDF.NewPage();
PDF.PDFPAGE_Thumbnail = th2; // set thumbnail for 2nd page
PDF.EndDoc();
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created
PDF.PageMode = 2 ' pmUseThumbs
PDF.BeginDoc
th1 = PDF.AddImageFromFile("thumb1.jpg")
th2 = PDF.AddImageFromFile("thumb2.jpg")
PDF.PDFPAGE_Thumbnail = th1 ' set thumbnail for 1st page
PDF.NewPage
PDF.PDFPAGE_Thumbnail = th2 ' set thumbnail for 2nd page
PDF.EndDoc

See Also

Reference