aboutsummaryrefslogtreecommitdiffstats
path: root/manual
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-05-19 00:22:57 +0200
committerJay Berkenbilt <ejb@ql.org>2022-05-20 15:16:25 +0200
commit6f43bf8de36b08c55b172b4f4133c79657651666 (patch)
treeec17bbf42d9ea78d44ab3b9d2cac363cc6b9bc68 /manual
parent23fc6756f1894e1af35853eb2251f08d5b25cf30 (diff)
downloadqpdf-6f43bf8de36b08c55b172b4f4133c79657651666.tar.zst
Major rework -- see long comments
* Replace --create-from-json=file with --json-input, which causes the regular input to be treated as json. * Eliminate --to-json * In --json=2, bring back "objects" and eliminate "objectinfo". Stream data is never present. * In --json-output=2, write "qpdf-v2" with "objects" and include stream data.
Diffstat (limited to 'manual')
-rw-r--r--manual/cli.rst51
1 files changed, 26 insertions, 25 deletions
diff --git a/manual/cli.rst b/manual/cli.rst
index 57a164cb..6cfae38b 100644
--- a/manual/cli.rst
+++ b/manual/cli.rst
@@ -3174,20 +3174,6 @@ Related Options
:qpdf:ref:`--json-help` option to get a description of the JSON
object.
-.. qpdf:option:: --to-json
-
- .. help: serialize to JSON
-
- Shortcut for options useful for serializing PDF to JSON:
- --json=latest --json-stream-data=inline
- --json-key=qpdf --decode-level=none
-
- This option is a shorthand for
- ``--json=latest --json-stream-data=inline --json-key=qpdf --decode-level=none``.
- These are good options for serializing a PDF to JSON in manner that
- allows qpdf to read it back in. You can override any of these
- options by specifying other options after them.
-
.. qpdf:option:: --json-help
.. help: show format of JSON output
@@ -3253,7 +3239,8 @@ Related Options
inline (base64-encoded) or written to a file. If ``file`` is
chosen, the file will be the name of the input file appended with
:samp:`-{nnn}` where :samp:`{nnn}` is the object number. The prefix
- can be overridden with :qpdf:ref:`--json-stream-prefix`.
+ can be overridden with :qpdf:ref:`--json-stream-prefix`. This
+ option only applies when used with :qpdf:ref:`--json-output`.
.. qpdf:option:: --json-stream-prefix=file-prefix
@@ -3268,20 +3255,34 @@ Related Options
``file``, override the input file name as the prefix for stream
data files. Whatever is given here will be appended with
:samp:`-{nnn}` to create the name of the file that will contain the
- data for the stream stream in object :samp:`{nnn}`.
+ data for the stream stream in object :samp:`{nnn}`. This
+ option only applies when used with :qpdf:ref:`--json-output`.
-.. qpdf:option:: --create-from-json=qpdf-json-file
+.. qpdf:option:: --json-output=version
- .. help: create PDF from qpdf JSON
+ .. help: serialize to JSON
- Create a PDF file from the prior output of qpdf --json. See the
- "QPDF JSON Format" section of the manual for information about
- how to use this option.
+ The output file will be qpdf JSON format at the given version.
+ Only version 2 is supported. See also --json-stream-data
+ and --json-stream-prefix
+
+ The output file will be qpdf JSON format at the given version. Only
+ version 2 is supported. See also :qpdf:ref:`--json-stream-data` and
+ :qpdf:ref:`--json-stream-prefix`.
+
+.. qpdf:option:: --json-input
+
+ .. help: input file is qpdf JSON
+
+ Treat the input file as a JSON file in qpdf JSON format as
+ written by qpdf --json-output. See the "QPDF JSON Format"
+ section of the manual for information about how to use this
+ option.
- This option creates a PDF file from the previous output of ``qpdf
- --json`` that includes stream data and information about all
- objects. For information about converting between PDF and JSON,
- please see :ref:`qpdf-json`.
+ Treat the input file as a JSON file in qpdf JSON format as written
+ by ``qpdf --json-output``. The input file must be complete and
+ include all stream data. For information about converting between
+ PDF and JSON, please see :ref:`qpdf-json`.
.. qpdf:option:: --update-from-json=qpdf-json-file