From 69820847af93cce0e400638999fee4d2cbb68db6 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Sat, 30 Jul 2022 20:53:30 -0400 Subject: Change the output of --json to use "qpdf" instead of "objects" --- include/qpdf/QPDF.hh | 5 +++-- include/qpdf/QPDFJob.hh | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/qpdf/QPDF.hh b/include/qpdf/QPDF.hh index 943528bd..f218f87f 100644 --- a/include/qpdf/QPDF.hh +++ b/include/qpdf/QPDF.hh @@ -142,7 +142,8 @@ class QPDF // "complete" is false, the "qpdf" key and its value are written // to the pipeline assuming that a dictionary is already open, and // finish() is not called. The parameter first_key indicates - // whether this is the first key if in-progress dictionary. + // whether this is the first key in an in-progress dictionary. It + // will be set to false by writeJSON. // // The decode_level parameter controls which streams are // uncompressed in the JSON. Use qpdf_dl_none to preserve all @@ -168,7 +169,7 @@ class QPDF int version, Pipeline* p, bool complete, - bool first_key, + bool& first_key, qpdf_stream_decode_level_e decode_level, qpdf_json_stream_data_e json_stream_data, std::string const& file_prefix, diff --git a/include/qpdf/QPDFJob.hh b/include/qpdf/QPDFJob.hh index 96b05768..1d8b07f6 100644 --- a/include/qpdf/QPDFJob.hh +++ b/include/qpdf/QPDFJob.hh @@ -543,7 +543,7 @@ class QPDFJob void setEncryptionOptions(QPDF&, QPDFWriter&); void maybeFixWritePassword(int R, std::string& password); void writeOutfile(QPDF& pdf); - void writeJSON(QPDF& pdf); + void writeJSON(Pipeline* p, QPDF& pdf, bool complete, bool& first_key); // JSON void doJSON(QPDF& pdf, Pipeline*); @@ -700,7 +700,7 @@ class QPDFJob std::shared_ptr infilename; std::shared_ptr outfilename; bool json_input; - int json_output; + bool json_output; std::string update_from_json; }; std::shared_ptr m; -- cgit v1.2.3-54-g00ecf