ExecuteVCRDataMergeBatch

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, Dylib and ActiveX builds provide it unchanged; the Single edition keeps the method, which returns an empty string and sets LastErrorCode to 901 (PDFLIB_ERROR_SMALLBUSINESS_REQUIRED)

Description

Executes an ISO 16613-1 (PDF/VCR-1) multi-record variable content replacement batch merge from a JSON request, preflights up to 64 records against one bounded template snapshot, and writes each verified candidate PDF exclusively to record-<id>.pdf

Syntax

Delphi

Function TPDFlib.ExecuteVCRDataMergeBatch(Const RequestJSON: WideString): WideString; Virtual;

ActiveX

Function PDFlib::ExecuteVCRDataMergeBatch(RequestJSON As String) As String

DLL

const wchar_t* DLExecuteVCRDataMergeBatch(int InstanceID, const wchar_t* RequestJSON);
const char* DLExecuteVCRDataMergeBatchA(int InstanceID, const char* RequestJSON);

Parameters

RequestJSONA JSON request object specifying schemaVersion, templateFile, outputDirectory, optional password, optional preflightOnly, optional maxRecordBytes, and records (up to 64 objects with id and fields)

Return values

Returns a JSON manifest containing the template SHA-256, aggregate batch status (ok, partial, or failed), and per-record destination paths, byte counts, SHA-256 digests, and outcome reasons; invalid batch requests return an error manifest and set LastErrorCode 905

Remarks

ActiveX exposes the method on IPDFlibrary20 with dispatch ID 73011698 and retains the earlier interfaces. The macOS and Linux Dylib uses the same export names, with UTF-16 code units for the wide export. Copy the returned C ABI string before the next call on the instance

See ExecuteVCRDataMerge for the JSON request schema, record ID rules, and size limits

See also

ExecuteVCRDataMerge, ExecuteVCRDataMergeCurrent, ExecuteVCRDataMergeEx