THotPDF.RegisterExtGState Method
Version 2.1102.2 writes a reconstructed 15-significant-digit k/255 token when an alpha input exactly equals the rounded Single representation of that byte fraction. This applies to fill ca and stroke CA in both overloads; adjacent non-grid inputs keep their ordinary numeric serialisation, and token formatting is independent of the decimal separator
The public numeric value, negative unset sentinel, PDF version gate and compliance checks retain their existing behaviour. Exact membership in the byte-grid Single set is a formatting policy; it does not infer how the caller computed the value
Registers a reusable ext gstate resource for the document creation workflow. Call it before page commands reference the resource name so colour, pattern, font, image, or profile data is available in the PDF resource tree
Declaration
function RegisterExtGState(FillAlpha: Single= - 1; StrokeAlpha: Single= - 1; const BlendMode: AnsiString= ''): AnsiString;
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
FillAlpha | Transparency value used by the graphics state or soft-mask workflow |
StrokeAlpha | Transparency value used by the graphics state or soft-mask workflow |
BlendMode | Input used by RegisterExtGState |
Return value
Returns an AnsiString value
Usage notes
- Use this API in the document creation workflow before the affected page, resource, field, or catalogue object is finalised
- Keep object names, field names, resource names, and returned handles stable until the document is finalised