THotPDF.RegisterFormXObject

THotPDF

 

傳回頂部

將可重複使用的頁面內容登錄為 PDF Form XObject,並傳回供 THPDFPage.DrawFormXObject 使用的資源名稱

 

Delphi 語法:

function RegisterFormXObject(BBoxLLx, BBoxLLy, BBoxURx, BBoxURy: Single; const Content: AnsiString): AnsiString;

function RegisterFormXObject(Width, Height: Single; const Content: AnsiString): AnsiString;

 

說明

此方法會建立 indirect /Type /XObject /Subtype /Form stream,包含 /FormType 1、提供的 /BBox、identity matrix,以及 minimal resource dictionary。傳回的 name 在檔案內穩定,並會在第一次 draw 時加入每個 page 的 Resources/XObject dictionary

對於 stamps、repeated vector groups、logos,以及其他應定義一次並在不同 positions、scales 或 rotations 多次繪製的 content,請使用此方法