|
Kopplar eller tar bort en sidminiatyrbild (PDF-sidans /Thumb-post, ISO 32000-1 §12.3.4). PDF-visare (Adobe Acrobat, Foxit, webbläsarvisare) visar den refererade bilden i sin navigeringspanel utan att själva rastrera sidinnehållet, vilket gör det märkbart snabbare att öppna bildtunga arkiv
Delphi syntax:
procedure SetPageThumbnail(ImageIndex: Integer);
procedure ClearPageThumbnail;
Parametrar
ImageIndex är värdet som returneras av ett tidigare anrop till THotPDF.AddImage eller THotPDF.AddImageFromFile. Det underliggande Image XObject refereras indirekt enligt specifikationen, så samma bild kan även ritas på en vanlig sida utan konflikt. Skicka ett negativt index för att ta bort en befintlig /Thumb-post
Beskrivning
Each PDF page can carry an indirect reference to an Image XObject in its /Thumb key. The image is normally a downsampled 8-bit DeviceGray, DeviceRGB, or Indexed bitmap (Acrobat uses roughly one thumbnail point per page point), but HotPDF does not validate the colour space – the caller chooses what to attach. ClearPageThumbnail removes any previously attached thumbnail. SetPageThumbnail(-1) is equivalent to ClearPageThumbnail. Passing an ImageIndex that is not in range of the document’s image list raises a descriptive exception.
Exempel
PDF := THotPDF.Create(nil);
PDF.FileName := 'archive.pdf';
PDF.BeginDoc;
Idx := PDF.AddImageFromFile('preview.jpg', icJpeg);
PDF.CurrentPage.SetPageThumbnail(Idx);
PDF.EndDoc;
Availability
HotPDF v2.119.13. The PDF /Thumb entry is a PDF 1.0 feature and is not gated under PDF/A, PDF/X, or PDF/UA compliance modes. To make the viewer open with the thumbnail panel visible, also set THotPDF.PageMode := pmUseThumbs.
Se även: Supported Image Formats, THPDFPage
|