ExecuteVCRDataMergeCurrentA

Integration and compatibility

Requires the Small Business edition — in Delphi, C++Builder and Lazarus code create the library as TPDFlibSmallBusiness (unit PDFlibSmallBusiness) or TPDFlibEnterprise; the Small Business and Enterprise DLL and ActiveX builds provide it unchanged; the Single edition keeps the method, which returns 0 and sets LastErrorCode to 901 (PDFLIB_ERROR_SMALLBUSINESS_REQUIRED)

Description

The trailing A denotes the ANSI (char) DLL entry point; the ActiveX/COM surface exposes only the Unicode form. Behaviour is identical to ExecuteVCRDataMergeCurrent and string arguments are interpreted using the current SetAnsiMode code page

Merges field values into the selected PDF/VCR template document and loads the result as a new selected document, keeping the original template open

JSON field names and values use standard JSON string escapes, including Unicode escapes; an explicit empty string clears its placeholder, while an absent field leaves its placeholder unchanged

Syntax

Delphi

Function DLExecuteVCRDataMergeCurrentA(InstanceID: Integer; FieldValues: PAnsiChar; Options: Integer): Integer;

DLL

int DLExecuteVCRDataMergeCurrentA(int InstanceID, const char* FieldValues, int Options);

DLExecuteVCRDataMerge and DLExecuteVCRDataMergeA are legacy export aliases of the Current pair with identical parameters and behaviour

Parameters

FieldValuesA JSON object or semicolon-delimited name=value list of placeholder values
OptionsMust be 0

Return values

Returns 1 when the merged copy is selected, or 0 on failure; unsupported Options or a template or merge failure report LastErrorCode 608

Remarks

The selected template is saved and validated in memory, merged and loaded only on success; a failure does not select a partial document. The original template remains available through its earlier SelectedDocument handle

The DLL and ActiveX ExecuteVCRDataMerge entry points use this route; see Automation extensions

See also

ExecuteVCRDataMerge, ExecuteVCRDataMergeEx