SetSignProcessAppearanceTemplate

Security and signatures

Description

Configures a visible text appearance template for a digital signature process

The template is expanded once when the signature is produced, so the same layout can be reused with different signing metadata and application values

Syntax

Delphi

Function TPDFlib.SetSignProcessAppearanceTemplate(SignProcessID: Integer; Const TemplateText, SignerName, DateFormat: WideString; FontSize, FontRed, FontGreen, FontBlue: Double): Integer;

ActiveX

Function PDFlib::SetSignProcessAppearanceTemplate(SignProcessID As Long, TemplateText As String, SignerName As String, DateFormat As String, FontSize As Double, FontRed As Double, FontGreen As Double, FontBlue As Double) As Long

DLL

int DLSetSignProcessAppearanceTemplate(int InstanceID, int SignProcessID, const wchar_t * TemplateText, const wchar_t * SignerName, const wchar_t * DateFormat, double FontSize, double FontRed, double FontGreen, double FontBlue);

Parameters

SignProcessIDValue returned by a NewSignProcessFrom* function
TemplateTextText and line breaks containing any of the built-in placeholders {signer}, {reason}, {location}, {contact}, {date}, {field}, and {page}, plus custom names registered with SetSignProcessAppearanceVariable
SignerNameValue substituted for {signer}
DateFormatDelphi date and time format used by {date}, or an empty string for yyyy-mm-dd hh:nn:ss
FontSizeFont size in points, or 0 to fit the text block automatically
FontRed, FontGreen, FontBlueText colour components in the range 0..1

Return values

1The template was accepted
0The process id, brace syntax, placeholder name, template length, placeholder count, or date format was invalid

Remarks

Use {{ and }} to emit literal braces

A template can contain up to 32,768 characters and 256 placeholder occurrences

Missing custom variables expand to empty text, while built-in variables always reflect the current sign process

Calling SetSignProcessAppearanceText later selects the legacy line-based appearance again

A field image still takes precedence, and document time-stamp processes do not render a text appearance

See also

SetSignProcessAppearanceVariable, SetSignProcessAppearanceText, SetSignProcessFieldBounds