ExportObjectJSON
Object model, document inspection
Description
Streams the trailer and every indirect object in ascending object-number order to a versioned JSON object graph without building the complete output in memory. Every PDF value carries an explicit type. Names, dictionary keys, and strings use hexadecimal byte encoding, streams use Base64, and references retain both object and generation numbers, so the representation is reversible and safe for audit or batch editing
Syntax
Delphi
Function TPDFlib.ExportObjectJSON(Const OutputFileName: WideString; Options: Integer): Integer;ActiveX
Function PDFlib::ExportObjectJSON(OutputFileName As String, Options As Long) As LongDLL
int DLExportObjectJSON(int InstanceID, const wchar_t* OutputFileName, int Options);Parameters
| OutputFileName | Destination JSON file written through a same-directory temporary file and atomically replaced on success |
|---|---|
| Options | Bit 1 formats readable indented JSON; bit 2 writes stream data as null for inspection-only output that cannot be imported |
Return values
| 1 | The complete graph was written |
|---|---|
| 0 | The graph could not be decoded or the output could not be written; LastErrorCode is 304 |