ImportObjectJSON

Object model, document editing

Description

Parses and validates a versioned object graph before cloning its values into the current document. By default, listed objects are created or updated and a supplied trailer is applied while unlisted objects remain. Option 4 additionally removes unlisted indirect objects, enabling exact graph replacement. Type mismatches, duplicate object numbers, malformed hexadecimal or Base64 data, unavailable stream data, excess nesting, and unsupported schema versions are rejected before normal updates begin

Syntax

Delphi

Function TPDFlib.ImportObjectJSON(Const InputFileName: WideString; Options: Integer): Integer;

ActiveX

Function PDFlib::ImportObjectJSON(InputFileName As String, Options As Long) As Long

DLL

int DLImportObjectJSON(int InstanceID, const wchar_t* InputFileName, int Options);

Parameters

InputFileNameTyped object graph JSON file
Options0 merges listed objects; PDF_OBJECT_JSON_REPLACE_GRAPH (4) replaces the complete indirect object set

Return values

1The graph was applied
0The graph is invalid or cannot be read; LastErrorCode is 105