THotPDF.RegisterFormXObject

Version 2.1102.4 also preserves ordinary fractional Single bounds when saving, including subnormal values, without intermediate decimal-scaling roundoff; existing source tokens and integer handling keep their earlier behaviour

Version 2.1102.3 preserves finite Single coordinates beyond the signed 32-bit integer range when saving the bounding box, using plain decimal PDF numbers independently of the decimal separator

This preserves the supplied Single value rather than arbitrary-precision integer literals; PDF consumers retain their own coordinate and rendering limits

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.