|
page thumbnail image (PDF page /Thumb entry、ISO 32000-1 §12.3.4) を attach または remove します。PDF viewers (Adobe Acrobat、Foxit、browser viewers) は page content を自分で rasterise せず navigation panel に referenced image を表示するため、image-heavy archives を開く処理が目に見えて速くなります
Delphi 構文:
procedure SetPageThumbnail(ImageIndex: Integer);
procedure ClearPageThumbnail;
パラメーター
ImageIndex は、事前の THotPDF.AddImage または THotPDF.AddImageFromFile 呼び出しによって返される値です。基礎となる Image XObject は仕様に従って間接的に参照されるため、競合することなく通常のページに同じ画像を描画することもできます。既存の /Thumb エントリを削除するには、負のインデックスを渡します。
説明
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 color 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.
例
PDF := THotPDF.Create(nil);
PDF.File名前 := 'archive.pdf';
PDF.BeginDoc;
Idx := PDF.AddImageFromFile('preview.jpg', icJpeg);
PDF.CurrentPage.SetPageThumbnail(Idx);
PDF.EndDoc;
可用性
HotPDF v2.119.13。PDF /Thumb エントリは PDF 1.0 の機能であり、PDF/A、PDF/X、または PDF/UA コンプライアンスモードに制限されません。サムネイルパネルを表示した状態でビューアーを開くには、THotPDF.PageMode := pmUseThumbs も設定します。
See also: サポートされている画像フォーマット, THPDFPage
|