hpdf_document_compare_json_v1
Compares two borrowed loaded documents using the unchanged ABI v1 operation record
hpdf_status HPDF_CDECL hpdf_document_compare_json_v1(
hpdf_document handle_a, hpdf_document handle_b,
const hpdf_operation_v1 *operation);
Declared in hotpdf_abi.h and exported by HotPDFABI.dll with the C calling convention
Both handles must be valid and loaded; self comparison may pass the same handle twice
The operation requires schemaVersion 1, type compare or compare.contract, NULL input_io and a writable result_io; output_io optionally receives JSON, HTML or a review PDF
File input and output keys are rejected; both source contexts remain referenced throughout the call and their cancellation callbacks are independently polled
Returns 0 for a result, including explicitly incomplete generic comparisons, 1 for invalid arguments, 2 for invalid handles, 3 for incompatible records, 4 for cancellation, 5 for I/O failure, 6 for JSON parsing failure, 7 for an internal error, or 8 for a budget failure
Callers must serialise operations on each handle and retain source callbacks for the handle lifetime and active calls; callback publication failure may retain accepted output bytes whilst source object graphs remain unchanged