THotPDF.RegisterFormXObject

THotPDF

 

Top

Registers reusable page-content as a PDF Form XObject and returns the resource name used by THPDFPage.DrawFormXObject.

 

Delphi syntax:

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

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

 

Description

The method creates an indirect /Type /XObject /Subtype /Form stream with /FormType 1, the supplied /BBox, an identity matrix, and a minimal resource dictionary. The returned name is stable within the document and is added to each page's Resources/XObject dictionary on first draw.

Use this for stamps, repeated vector groups, logos, and other content that should be defined once and painted many times at different positions, scales, or rotations.