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 the standard JSON string escapes, Unicode escapes included; an explicit empty string clears its placeholder, whereas a field that is left out keeps its placeholder as it is
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
| FieldValues | A JSON object or semicolon-delimited name=value list of placeholder values |
|---|---|
| Options | Must 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