aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/qpdf/JSON.hh5
-rw-r--r--include/qpdf/QPDF.hh13
-rw-r--r--include/qpdf/QPDFFormFieldObjectHelper.hh4
-rw-r--r--include/qpdf/QPDFJob.hh1
-rw-r--r--include/qpdf/QPDFObjectHandle.hh9
5 files changed, 16 insertions, 16 deletions
diff --git a/include/qpdf/JSON.hh b/include/qpdf/JSON.hh
index e3c8a7dc..3272800d 100644
--- a/include/qpdf/JSON.hh
+++ b/include/qpdf/JSON.hh
@@ -290,8 +290,11 @@ class JSON
QPDF_DLL
qpdf_offset_t getEnd() const;
+ // The following class does not form part of the public API and is for internal use only.
+
+ class Writer;
+
private:
- static std::string encode_string(std::string const& utf8);
static void writeClose(Pipeline* p, bool first, size_t depth, char const* delimeter);
enum value_type_e {
diff --git a/include/qpdf/QPDF.hh b/include/qpdf/QPDF.hh
index a836c3c9..04b11cba 100644
--- a/include/qpdf/QPDF.hh
+++ b/include/qpdf/QPDF.hh
@@ -1411,19 +1411,6 @@ class QPDF
// JSON import
void importJSON(std::shared_ptr<InputSource>, bool must_be_complete);
- // JSON write
- void writeJSONStream(
- int version,
- Pipeline* p,
- bool& first,
- std::string const& key,
- QPDFObjectHandle&,
- qpdf_stream_decode_level_e,
- qpdf_json_stream_data_e,
- std::string const& file_prefix);
- void writeJSONObject(
- int version, Pipeline* p, bool& first, std::string const& key, QPDFObjectHandle&);
-
// Type conversion helper methods
template <typename T>
static qpdf_offset_t
diff --git a/include/qpdf/QPDFFormFieldObjectHelper.hh b/include/qpdf/QPDFFormFieldObjectHelper.hh
index f31bb7bd..881a7db4 100644
--- a/include/qpdf/QPDFFormFieldObjectHelper.hh
+++ b/include/qpdf/QPDFFormFieldObjectHelper.hh
@@ -166,7 +166,9 @@ class QPDFFormFieldObjectHelper: public QPDFObjectHelper
// either /Tx (text) or /Ch (choice), set /NeedAppearances to true. You can explicitly tell this
// method not to set /NeedAppearances if you are going to generate an appearance stream
// yourself. Starting with qpdf 8.3.0, this method handles fields of type /Btn (checkboxes,
- // radio buttons, pushbuttons) specially.
+ // radio buttons, pushbuttons) specially. When setting a checkbox value, any value other than
+ // /Off will be treated as on, and the actual value set will be based on the appearance stream's
+ // /N dictionary, so the value that ends up in /V may not exactly match the value you pass in.
QPDF_DLL
void setV(QPDFObjectHandle value, bool need_appearances = true);
diff --git a/include/qpdf/QPDFJob.hh b/include/qpdf/QPDFJob.hh
index c291d1e8..b26a9dcf 100644
--- a/include/qpdf/QPDFJob.hh
+++ b/include/qpdf/QPDFJob.hh
@@ -551,7 +551,6 @@ class QPDFJob
// JSON
void doJSON(QPDF& pdf, Pipeline*);
QPDFObjGen::set getWantedJSONObjects();
- void doJSONObject(Pipeline* p, bool& first, std::string const& key, QPDFObjectHandle&);
void doJSONObjects(Pipeline* p, bool& first, QPDF& pdf);
void doJSONObjectinfo(Pipeline* p, bool& first, QPDF& pdf);
void doJSONPages(Pipeline* p, bool& first, QPDF& pdf);
diff --git a/include/qpdf/QPDFObjectHandle.hh b/include/qpdf/QPDFObjectHandle.hh
index b2835495..9ea329ff 100644
--- a/include/qpdf/QPDFObjectHandle.hh
+++ b/include/qpdf/QPDFObjectHandle.hh
@@ -1197,6 +1197,13 @@ class QPDFObjectHandle
QPDF_DLL
JSON getJSON(int json_version, bool dereference_indirect = false);
+ // Write the object encoded as JSON to a pipeline. This is equivalent to, but more efficient
+ // than, calling getJSON(json_version, dereference_indirect).write(p, depth). See the
+ // documentation for getJSON and JSON::write for further detail.
+ QPDF_DLL
+ void
+ writeJSON(int json_version, Pipeline* p, bool dereference_indirect = false, size_t depth = 0);
+
// Deprecated version uses v1 for backward compatibility.
// ABI: remove for qpdf 12
[[deprecated("Use getJSON(int version)")]] QPDF_DLL JSON
@@ -1353,6 +1360,8 @@ class QPDFObjectHandle
return obj.get();
}
+ void writeJSON(int json_version, JSON::Writer& p, bool dereference_indirect = false);
+
private:
QPDF_Array* asArray();
QPDF_Bool* asBool();