|
AddThumbnailImage method (TgtCustomPDFEngine) |
Top |
|
procedure AddThumbnailImage (AGraphic: TGraphic; PageNo: Integer); overload; procedure AddThumbnailImage (Index, PageNo: Integer); overload;
Description
Call AddThumbnailImage with a TGraphic and PageNo to add an image to the thumbnail for the page specified by PageNo.
Call AddThumbnailImage with an Index and PageNo to add an image to the thumbnail for the page specified by PageNo. Index is a value returned by AddImageAsResource.
Example:
Delphi:
with gtPDFEngine1 do begin MeasurementUnit := muPixels; ViewerPreferences.PageMode := pmUseThumbs;
FileName := 'C:\Thumbnails'; BeginDoc; TextOut(200, 100, 'Gnostice Information Technologies Pvt. Ltd. (www.gnostice.com)');
NewPage; TextOut(300, 100, 'Gnostice eDocEngine');
Bitmap.LoadFromFile('C:\Page1Thumb.bmp');
(* Note: Page No. is 1 based.*) (*Set Thumbnail Image for 1st Page.*) AddThumbnailImage(Bitmap, 1); Bitmap.LoadFromFile('C:\Page2Thumb.bmp');
(* Set Thumbnail Image for 2nd Page. *) AddThumbnailImage(Bitmap, 2);
EndDoc; end;
C++Builder:
gtPDFEngine1->MeasurementUnit = muPixels; gtPDFEngine1->ViewerPreferences->PageMode = pmUseThumbs; gtPDFEngine1->FileName = "C:\\Thumbnails"; gtPDFEngine1->BeginDoc(); gtPDFEngine1->TextOut(200, 100, "Gnostice Information Technologies Pvt. Ltd. (www.gnostice.com)"); gtPDFEngine1->NewPage(); gtPDFEngine1->TextOut(300, 100, "Gnostice eDocEngine");
Bitmap->LoadFromFile("C:\\Page1Thumb.bmp");
/* Note: Page No. is 1 based.*/ /*Set Thumbnail Image for 1st Page.*/ gtPDFEngine1->AddThumbnailImage(Bitmap, 1); Bitmap->LoadFromFile("C:\\Page2Thumb.bmp");
/* Set Thumbnail Image for 2nd Page. */ gtPDFEngine1->AddThumbnailImage(Bitmap, 2);
gtPDFEngine1->EndDoc(); |