THotPDF.RegisterFormXObject

THotPDF

 

返回頂部

Registers reusable page-content as a PDF Form XObject and returns the resource name used by 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,請使用此方法