aboutsummaryrefslogtreecommitdiffstats
path: root/manual
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-05-04 13:32:30 +0200
committerJay Berkenbilt <ejb@ql.org>2022-05-04 14:32:44 +0200
commit8b25de24c9b1e6acba042ea9ecdee783839e20a6 (patch)
tree5e6b24aab3297cc13aeb4802ab2bc77ad9306288 /manual
parent6b576797cd2d54c8825e1ebf845ab2618ab4c3fd (diff)
downloadqpdf-8b25de24c9b1e6acba042ea9ecdee783839e20a6.tar.zst
Make "objects" and "pages" consistent in JSON output
Diffstat (limited to 'manual')
-rw-r--r--manual/json.rst10
-rw-r--r--manual/release-notes.rst7
2 files changed, 17 insertions, 0 deletions
diff --git a/manual/json.rst b/manual/json.rst
index 358cac90..ef6bed96 100644
--- a/manual/json.rst
+++ b/manual/json.rst
@@ -147,6 +147,16 @@ For the most part, the built-in JSON help tells you everything you need
to know about the JSON format, but there are a few non-obvious things to
be aware of:
+- If a PDF file has certain types of errors in its pages tree (such as
+ page objects that are direct or multiple pages sharing the same
+ object ID), qpdf will automatically repair the pages tree. If you
+ specify ``"objects"`` and/or ``"objectinfo"`` without any other
+ keys, you will see the original pages tree without any corrections.
+ If you specify any of keys that require page tree traversal (for
+ example, ``"pages"``, ``"outlines"``, or ``"pagelabel"``), then
+ ``"objects"`` and ``"objectinfo"`` will show the repaired page tree
+ so that object references will be consistent throughout the file.
+
- While qpdf guarantees that keys present in the help will be present
in the output, those fields may be null or empty if the information
is not known or absent in the file. Also, if you specify
diff --git a/manual/release-notes.rst b/manual/release-notes.rst
index 08e2fd52..f313cd82 100644
--- a/manual/release-notes.rst
+++ b/manual/release-notes.rst
@@ -125,6 +125,13 @@ For a detailed list of changes, please see the file
- Other changes
+ - In JSON v1 mode, the ``"objects"`` key now reflects the repaired
+ pages tree if ``"pages"`` (or any other key that has the side
+ effect of repairing the page tree) is specified. To see the
+ original objects with any unrepaired page tree errors, specify
+ ``"objects"`` and/or ``"objectinfo"`` by themselves. This is
+ consistent with how JSON v2 behaves.
+
- A new chapter on contributing to qpdf has been added to the
documentation. See :ref:`contributing`.