aboutsummaryrefslogtreecommitdiffstats
path: root/manual/index.rst
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2021-12-12 01:01:40 +0100
committerJay Berkenbilt <ejb@ql.org>2021-12-13 17:20:14 +0100
commit15b87d769e256046bd22227bdc6fb874484f2d53 (patch)
treedd84f1611f99481556f9fdf6f14a5fd4a5184411 /manual/index.rst
parentcf3b9a778396cc336fd5772dd18762f04dc08134 (diff)
downloadqpdf-15b87d769e256046bd22227bdc6fb874484f2d53.tar.zst
Replace command|application with :command:`...`
Replace @1@...@2@ stuff from prior to the conversion with new representation.
Diffstat (limited to 'manual/index.rst')
-rw-r--r--manual/index.rst282
1 files changed, 141 insertions, 141 deletions
diff --git a/manual/index.rst b/manual/index.rst
index 6be6a35e..1837f7ff 100644
--- a/manual/index.rst
+++ b/manual/index.rst
@@ -116,7 +116,7 @@ the following packages are required:
- GNU diffutils (any version): http://www.gnu.org/software/diffutils/
is required to run the test suite. Note that this is the version of
diff present on virtually all GNU/Linux systems. This is required
- because the test suite uses @1@command@1@diff -u@2@command@2@.
+ because the test suite uses :command:`diff -u`.
Part of qpdf's test suite does comparisons of the contents PDF files by
converting them images and comparing the images. The image comparison
@@ -130,7 +130,7 @@ off by default and are only provided to help developers look into the
contents of PDF files. If you are making deep changes to the library
that cause changes in the contents of the files that qpdf generates,
then you should enable the image comparison tests. Enable them by
-running @1@command@1@configure@2@command@2@ with the
+running :command:`configure` with the
@1@option@1@--enable-test-compare-images@2@option@2@ flag. If you enable
this, the following additional requirements are required by the test
suite. Note that in no case are these items required to use qpdf.
@@ -161,9 +161,9 @@ Building qpdf on UNIX is generally just a matter of running
./configure
make
-You can also run @1@command@1@make check@2@command@2@ to run the test
-suite and @1@command@1@make install@2@command@2@ to install. Please run
-@1@command@1@./configure --help@2@command@2@ for options on what can be
+You can also run :command:`make check` to run the test
+suite and :command:`make install` to install. Please run
+:command:`./configure --help` for options on what can be
configured. You can also set the value of ``DESTDIR`` during
installation to install to a temporary location, as is common with many
open source packages. Please see also the
@@ -187,8 +187,8 @@ very unusual situation. For a detailed discussion, please see the
top-level README.md file in qpdf's source distribution.
There are some other things you can do with the build. Although qpdf
-uses @1@application@1@autoconf@2@application@2@, it does not use
-@1@application@1@automake@2@application@2@ but instead uses a
+uses :command:`autoconf`, it does not use
+:command:`automake` but instead uses a
hand-crafted non-recursive Makefile that requires gnu make. If you're
really interested, please read the comments in the top-level
@1@filename@1@Makefile@2@filename@2@.
@@ -218,13 +218,13 @@ Build Support For Crypto Providers
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When building with qpdf's build system, crypto providers can be enabled
-at build time using various @1@command@1@./configure@2@command@2@
+at build time using various :command:`./configure`
options. The default behavior is for
-@1@command@1@./configure@2@command@2@ to discover which crypto providers
+:command:`./configure` to discover which crypto providers
can be supported based on available external libraries, to build all
available crypto providers, and to use an external provider as the
default over the native one. This behavior can be changed with the
-following flags to @1@command@1@./configure@2@command@2@:
+following flags to :command:`./configure`:
- @1@option@1@--enable-crypto-@1@replaceable@1@x@2@replaceable@2@@2@option@2@
(where @1@replaceable@1@x@2@replaceable@2@ is a supported crypto
@@ -246,8 +246,8 @@ following flags to @1@command@1@./configure@2@command@2@:
For example, if you want to guarantee that the gnutls crypto provider is
used and that the native provider is not built, you could run
-@1@command@1@./configure --enable-crypto-gnutls
---disable-implicit-crypto@2@command@2@.
+:command:`./configure --enable-crypto-gnutls
+--disable-implicit-crypto`.
If you build qpdf using your own build system, in order for qpdf to work
at all, you need to enable at least one crypto provider. The file
@@ -279,7 +279,7 @@ Runtime Crypto Provider Selection
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can use the @1@option@1@--show-crypto@2@option@2@ option to
-@1@command@1@qpdf@2@command@2@ to get a list of available crypto
+:command:`qpdf` to get a list of available crypto
providers. The default provider is always listed first, and the rest are
listed in lexical order. Each crypto provider is listed on a line by
itself with no other text, enabling the output of this command to be
@@ -396,7 +396,7 @@ some things you may want to keep in mind:
Providers <#ref.crypto.build>`__ for details.
- Passing @1@option@1@--enable-show-failed-test-output@2@option@2@ to
- @1@command@1@./configure@2@command@2@ will cause any failed test
+ :command:`./configure` will cause any failed test
output to be written to the console. This can be very useful for
seeing test failures generated by autobuilders where you can't access
qtest.log after the fact.
@@ -409,11 +409,11 @@ some things you may want to keep in mind:
their sources. If your packaging environment automatically refreshes
automatic files, it can cause this check to fail. Suppress qpdf's
checks by passing @1@option@1@--disable-check-autofiles@2@option@2@
- to @1@command@1@/.configure@2@command@2@. This is safe since qpdf's
- @1@command@1@autogen.sh@2@command@2@ just runs autotools in the
+ to :command:`/.configure`. This is safe since qpdf's
+ :command:`autogen.sh` just runs autotools in the
normal way.
-- QPDF's @1@command@1@make install@2@command@2@ does not install
+- QPDF's :command:`make install` does not install
completion files by default, but as a packager, it's good if you
install them wherever your distribution expects such files to go. You
can find completion files to install in the
@@ -440,7 +440,7 @@ When running qpdf, the basic invocation is as follows:
::
- @1@command@1@qpdf@2@command@2@@1@option@1@ [ @1@replaceable@1@options@2@replaceable@2@ ] { @1@replaceable@1@infilename@2@replaceable@2@ | @1@option@1@--empty@2@option@2@ } [ @1@replaceable@1@page_selection_options@2@replaceable@2@ ] @1@replaceable@1@outfilename@2@replaceable@2@@2@option@2@
+ :command:`qpdf`@1@option@1@ [ @1@replaceable@1@options@2@replaceable@2@ ] { @1@replaceable@1@infilename@2@replaceable@2@ | @1@option@1@--empty@2@option@2@ } [ @1@replaceable@1@page_selection_options@2@replaceable@2@ ] @1@replaceable@1@outfilename@2@replaceable@2@@2@option@2@
This converts PDF file @1@option@1@infilename@2@option@2@ to PDF file
@1@option@1@outfilename@2@option@2@. The output file is functionally
@@ -484,7 +484,7 @@ commands do not. These are specifically noted.
Exit Status
~~~~~~~~~~~
-The exit status of @1@command@1@qpdf@2@command@2@ may be interpreted as
+The exit status of :command:`qpdf` may be interpreted as
follows:
- ``0``: no errors or warnings were found. The file may still have
@@ -502,9 +502,9 @@ follows:
@1@option@1@--warning-exit-0@2@option@2@, warnings without errors
exit with status 0 instead of 3.
-Note that @1@command@1@qpdf@2@command@2@ never exists with status ``1``.
+Note that :command:`qpdf` never exists with status ``1``.
If you get an exit status of ``1``, it was something else, like the
-shell not being able to find or execute @1@command@1@qpdf@2@command@2@.
+shell not being able to find or execute :command:`qpdf`.
.. _ref.shell-completion:
@@ -512,10 +512,10 @@ Shell Completion
----------------
Starting in qpdf version 8.3.0, qpdf provides its own completion support
-for zsh and bash. You can enable bash completion with @1@command@1@eval
-$(qpdf --completion-bash)@2@command@2@ and zsh completion with
-@1@command@1@eval $(qpdf --completion-zsh)@2@command@2@. If
-@1@command@1@qpdf@2@command@2@ is not in your path, you should invoke it
+for zsh and bash. You can enable bash completion with :command:`eval
+$(qpdf --completion-bash)` and zsh completion with
+:command:`eval $(qpdf --completion-zsh)`. If
+:command:`qpdf` is not in your path, you should invoke it
above with an absolute path. If you invoke it with a relative path, it
will warn you, and the completion won't work if you're in a different
directory.
@@ -610,13 +610,13 @@ needed transformations.
@1@option@1@--no-warn@2@option@2@
Suppress writing of warnings to stderr. If warnings were detected and
- suppressed, @1@command@1@qpdf@2@command@2@ will still exit with exit
+ suppressed, :command:`qpdf` will still exit with exit
code 3. See also @1@option@1@--warning-exit-0@2@option@2@.
@1@option@1@--warning-exit-0@2@option@2@
If warnings are found but no errors, exit with exit code 0 instead 3.
When combined with @1@option@1@--no-warn@2@option@2@, the effect is
- for @1@command@1@qpdf@2@command@2@ to completely ignore warnings.
+ for :command:`qpdf` to completely ignore warnings.
@1@option@1@--linearize@2@option@2@
Causes generation of a linearized (web-optimized) output file.
@@ -749,12 +749,12 @@ needed transformations.
original rotations. This is almost always what you want. Otherwise
the pages' rotations are set to the exact value, which may cause the
appearances of the pages to be inconsistent, especially for scans.
- For example, the command @1@command@1@qpdf in.pdf out.pdf
- --rotate=+90:2,4,6 --rotate=180:7-8@2@command@2@ would rotate pages
+ For example, the command :command:`qpdf in.pdf out.pdf
+ --rotate=+90:2,4,6 --rotate=180:7-8` would rotate pages
2, 4, and 6 90 degrees clockwise from their original rotation and
force the rotation of pages 7 through 8 to 180 degrees regardless of
- their original rotation, and the command @1@command@1@qpdf in.pdf
- out.pdf --rotate=+180@2@command@2@ would rotate all pages by 180
+ their original rotation, and the command :command:`qpdf in.pdf
+ out.pdf --rotate=+180` would rotate all pages by 180
degrees.
@1@option@1@--keep-files-open=@1@replaceable@1@[yn]@2@replaceable@2@@2@option@2@
@@ -826,17 +826,17 @@ needed transformations.
two numbers separated by a dash otherwise. For example, if
@1@filename@1@infile.pdf@2@filename@2@ has 12 pages
- - @1@command@1@qpdf --split-pages infile.pdf %d-out@2@command@2@
+ - :command:`qpdf --split-pages infile.pdf %d-out`
would generate files @1@filename@1@01-out@2@filename@2@ through
@1@filename@1@12-out@2@filename@2@
- - @1@command@1@qpdf --split-pages=2 infile.pdf
- outfile.pdf@2@command@2@ would generate files
+ - :command:`qpdf --split-pages=2 infile.pdf
+ outfile.pdf` would generate files
@1@filename@1@outfile-01-02.pdf@2@filename@2@ through
@1@filename@1@outfile-11-12.pdf@2@filename@2@
- - @1@command@1@qpdf --split-pages infile.pdf
- something.else@2@command@2@ would generate files
+ - :command:`qpdf --split-pages infile.pdf
+ something.else` would generate files
@1@filename@1@something.else-01@2@filename@2@ through
@1@filename@1@something.else-12@2@filename@2@
@@ -844,7 +844,7 @@ needed transformations.
original PDF file are not preserved. For each page of output, this
option creates an empty PDF and copies a single page from the output
into it. If you require the global data, you will have to run
- @1@command@1@qpdf@2@command@2@ with the
+ :command:`qpdf` with the
@1@option@1@--pages@2@option@2@ option once for each file. Using
@1@option@1@--split-pages@2@option@2@ is much faster if you don't
require the global data.
@@ -878,7 +878,7 @@ properly encoded encryption and decryption passwords to the user.
Starting in qpdf 8.4.0, qpdf does this automatically in most cases. For
an in-depth discussion, please see `Unicode
Passwords <#ref.unicode-passwords>`__. Previous versions of this manual
-described workarounds using the @1@command@1@iconv@2@command@2@ command.
+described workarounds using the :command:`iconv` command.
Such workarounds are no longer required or recommended with qpdf 8.4.0.
However, for backward compatibility, qpdf attempts to detect those
workarounds and do the right thing in most cases.
@@ -1084,8 +1084,8 @@ sees a value in the place where it expects a page range and that value
is not a valid range but is a valid file name, qpdf will implicitly use
the range ``1-z``, meaning that it will include all pages in the file.
This makes it possible to easily combine all pages in a set of files
-with a command like @1@command@1@qpdf --empty out.pdf --pages \*.pdf
---@2@command@2@.
+with a command like :command:`qpdf --empty out.pdf --pages \*.pdf
+--`.
The page range is a set of numbers separated by commas, ranges of
numbers separated dashes, or combinations of those. The character "z"
@@ -1124,14 +1124,14 @@ of @1@option@1@--pages@2@option@2@ so that the specified files, as
modified by page ranges, are collated rather than concatenated. For
example, if you add the files @1@filename@1@odd.pdf@2@filename@2@ and
@1@filename@1@even.pdf@2@filename@2@ containing odd and even pages of a
-document respectively, you could run @1@command@1@qpdf --collate odd.pdf
---pages odd.pdf even.pdf -- all.pdf@2@command@2@ to collate the pages.
+document respectively, you could run :command:`qpdf --collate odd.pdf
+--pages odd.pdf even.pdf -- all.pdf` to collate the pages.
This would pick page 1 from odd, page 1 from even, page 2 from odd, page
2 from even, etc. until all pages have been included. Any number of
files and page ranges can be specified. If any file has fewer pages,
that file is just skipped when its pages have all been included. For
-example, if you ran @1@command@1@qpdf --collate --empty --pages a.pdf
-1-5 b.pdf 6-4 c.pdf r1 -- out.pdf@2@command@2@, you would get the
+example, if you ran :command:`qpdf --collate --empty --pages a.pdf
+1-5 b.pdf 6-4 c.pdf r1 -- out.pdf`, you would get the
following pages in this order:
- a.pdf page 1
@@ -1157,8 +1157,8 @@ Starting in qpdf version 10.2, you may specify a numeric argument to
@1@option@1@--collate=@1@replaceable@1@n@2@replaceable@2@@2@option@2@,
pull groups of @1@replaceable@1@n@2@replaceable@2@ pages from each file,
again, stopping when there are no more pages. For example, if you ran
-@1@command@1@qpdf --collate=2 --empty --pages a.pdf 1-5 b.pdf 6-4 c.pdf
-r1 -- out.pdf@2@command@2@, you would get the following pages in this
+:command:`qpdf --collate=2 --empty --pages a.pdf 1-5 b.pdf 6-4 c.pdf
+r1 -- out.pdf`, you would get the following pages in this
order:
- a.pdf page 1
@@ -1187,7 +1187,7 @@ features. For example, the document's outlines (bookmarks) point to
actual page objects, so if you select some pages and not others,
bookmarks that point to pages that are in the output file will work, and
remaining bookmarks will not work. A future version of
-@1@command@1@qpdf@2@command@2@ may do a better job at handling these
+:command:`qpdf` may do a better job at handling these
issues. (Note that the qpdf library already contains all of the APIs
required in order to implement this in your own application if you need
it.) In the mean time, you can always use
@@ -1198,7 +1198,7 @@ all metadata associated with that file, you could use
::
- @1@command@1@qpdf@2@command@2@ @1@option@1@infile.pdf --pages . 1-5 -- outfile.pdf@2@option@2@
+ :command:`qpdf` @1@option@1@infile.pdf --pages . 1-5 -- outfile.pdf@2@option@2@
If you wanted pages 1 through 5 from
@1@filename@1@infile.pdf@2@filename@2@ but you wanted the rest of the
@@ -1206,7 +1206,7 @@ metadata to be dropped, you could instead run
::
- @1@command@1@qpdf@2@command@2@ @1@option@1@--empty --pages infile.pdf 1-5 -- outfile.pdf@2@option@2@
+ :command:`qpdf` @1@option@1@--empty --pages infile.pdf 1-5 -- outfile.pdf@2@option@2@
If you wanted to take pages 1 through 5 from
@1@filename@1@file1.pdf@2@filename@2@ and pages 11 through 15 from
@@ -1215,7 +1215,7 @@ metadata from @1@filename@1@file2.pdf@2@filename@2@, you would run
::
- @1@command@1@qpdf@2@command@2@ @1@option@1@file2.pdf --pages file1.pdf 1-5 . 15-11 -- outfile.pdf@2@option@2@
+ :command:`qpdf` @1@option@1@file2.pdf --pages file1.pdf 1-5 . 15-11 -- outfile.pdf@2@option@2@
If, for some reason, you wanted to take the first page of an encrypted
file called @1@filename@1@encrypted.pdf@2@filename@2@ with password
@@ -1224,7 +1224,7 @@ drop document-level metadata but preserve encryption, you would use
::
- @1@command@1@qpdf@2@command@2@ @1@option@1@--empty --copy-encryption=encrypted.pdf --encryption-file-password=pass
+ :command:`qpdf` @1@option@1@--empty --copy-encryption=encrypted.pdf --encryption-file-password=pass
--pages encrypted.pdf --password=pass 1 ./encrypted.pdf --password=pass 1 --
outfile.pdf@2@option@2@
@@ -1244,7 +1244,7 @@ the same page from the same file more than once, qpdf will share objects
between the pages. If you are going to do further manipulation on the
file and need the two instances of the same original page to be deep
copies, then you can specify the file in two different ways. For example
-@1@command@1@qpdf in.pdf --pages . 1 ./in.pdf 1 -- out.pdf@2@command@2@
+:command:`qpdf in.pdf --pages . 1 ./in.pdf 1 -- out.pdf`
would create a file with two copies of the first page of the input, and
the two copies would share any objects in common. This includes fonts,
images, and anything else the page references.
@@ -1302,15 +1302,15 @@ between the @1@option@1@--overlay@2@option@2@ or
Here are some examples.
-- @1@command@1@--overlay o.pdf --to=1-5 --from=1-3 --repeat=4
- --@2@command@2@: overlay the first three pages from file
+- :command:`--overlay o.pdf --to=1-5 --from=1-3 --repeat=4
+ --`: overlay the first three pages from file
@1@filename@1@o.pdf@2@filename@2@ onto the first three pages of the
output, then overlay page 4 from @1@filename@1@o.pdf@2@filename@2@
onto pages 4 and 5 of the output. Leave remaining output pages
untouched.
-- @1@command@1@--underlay footer.pdf --from= --repeat=1,2
- --@2@command@2@: Underlay page 1 of
+- :command:`--underlay footer.pdf --from= --repeat=1,2
+ --`: Underlay page 1 of
@1@filename@1@footer.pdf@2@filename@2@ on all odd output pages, and
underlay page 2 of @1@filename@1@footer.pdf@2@filename@2@ on all even
output pages.
@@ -1374,7 +1374,7 @@ from the command line. The following options are available:
@1@option@1@--replace@2@option@2@
Indicates that any existing attachment with the same key should be
replaced by the new attachment. Otherwise,
- @1@command@1@qpdf@2@command@2@ gives an error if an attachment
+ :command:`qpdf` gives an error if an attachment
with that key is already present.
@1@option@1@--remove-attachment=@1@replaceable@1@key@2@replaceable@2@@2@option@2@
@@ -1848,7 +1848,7 @@ QDF mode, stream lengths are stored as indirect objects, objects are
laid out in a less efficient but more readable fashion, and the
documents are interspersed with comments that make it easier for the
user to find things and also make it possible for
-@1@command@1@fix-qdf@2@command@2@ to work properly. QDF mode is intended
+:command:`fix-qdf` to work properly. QDF mode is intended
for people, mostly developers, who wish to inspect or modify PDF files
in a text editor. For details, please see `QDF Mode <#ref.qdf>`__.
@@ -2047,7 +2047,7 @@ If a file is being encrypted with 40-bit or 128-bit encryption and the
supplied password is not a valid UTF-8 string, qpdf will fall back to
the behavior of interpreting the password as a string of bytes. If you
have old scripts that encrypt files by passing the output of
-@1@command@1@iconv@2@command@2@ to qpdf, you no longer need to do that,
+:command:`iconv` to qpdf, you no longer need to do that,
but if you do, qpdf should still work. The only exception would be for
the extremely unlikely case of a password that is encoded with a
single-byte encoding but also happens to be valid UTF-8. Such a password
@@ -2079,7 +2079,7 @@ by attempting to interpret the password as each of a handful of
different coding systems and then transcode them to the required format.
This helps to compensate for the supplied password being given in the
wrong coding system, such as would happen if you used the
-@1@command@1@iconv@2@command@2@ workaround that was previously needed.
+:command:`iconv` workaround that was previously needed.
It also generates passwords by doing the reverse operation: translating
from correct in incorrect encoding of the password. This would enable
qpdf to decrypt files using passwords that were improperly encoded by
@@ -2133,9 +2133,9 @@ two reasons: most meaningful data in PDF files is compressed, and PDF
files are full of offset and length information that makes it hard to
add or remove data. A QDF file is organized in a manner such that, if
edits are kept within certain constraints, the
-@1@command@1@fix-qdf@2@command@2@ program, distributed with qpdf, is
+:command:`fix-qdf` program, distributed with qpdf, is
able to restore edited files to a correct state. The
-@1@command@1@fix-qdf@2@command@2@ program takes no command-line
+:command:`fix-qdf` program takes no command-line
arguments. It reads a possibly edited QDF file from standard input and
writes a repaired file to standard output.
@@ -2189,10 +2189,10 @@ nothing generally ever references it by number.
It is not generally practical to remove objects from QDF files without
messing up object numbering, but if you remove all references to an
object, you can run qpdf on the file (after running
-@1@command@1@fix-qdf@2@command@2@), and qpdf will omit the now-orphaned
+:command:`fix-qdf`), and qpdf will omit the now-orphaned
object.
-When @1@command@1@fix-qdf@2@command@2@ is run, it goes through the file
+When :command:`fix-qdf` is run, it goes through the file
and recomputes the following parts of the file:
- the ``/N``, ``/W``, and ``/First`` keys of all object stream
@@ -2271,7 +2271,7 @@ Python
rich standard library and available modules.
Other Languages
- Starting with version 8.3.0, the @1@command@1@qpdf@2@command@2@
+ Starting with version 8.3.0, the :command:`qpdf`
command-line tool can produce a JSON representation of the PDF file's
non-content data. This can facilitate interacting programmatically
with PDF files through qpdf's command line interface. For more
@@ -2344,7 +2344,7 @@ QPDF JSON
Overview
--------
-Beginning with qpdf version 8.3.0, the @1@command@1@qpdf@2@command@2@
+Beginning with qpdf version 8.3.0, the :command:`qpdf`
command-line program can produce a JSON representation of the
non-content data in a PDF file. It includes a dump in JSON format of all
objects in the PDF file excluding the content of streams. This JSON
@@ -2386,7 +2386,7 @@ Compatibility
strong effort will be made to avoid breaking compatibility.
Documentation
- The @1@command@1@qpdf@2@command@2@ command can be invoked with the
+ The :command:`qpdf` command can be invoked with the
@1@option@1@--json-help@2@option@2@ option. This will output a JSON
structure that has the same structure as the JSON output that qpdf
generates, except that each field in the help output is a description
@@ -2509,8 +2509,8 @@ be aware of:
"``parameters``" that indicates the decode level used for computing
whether a stream was filterable. For example, jpeg images will be
shown as not filterable by default, but they will be shown as
- filterable if you run @1@command@1@qpdf --json
- --decode-level=all@2@command@2@.
+ filterable if you run :command:`qpdf --json
+ --decode-level=all`.
.. _ref.design:
@@ -3050,7 +3050,7 @@ Version 3.0 of qpdf introduced the ability to copy objects into a
@1@firstterm@1@foreign objects@2@firstterm@2@. This allows arbitrary
merging of PDF files. The "from" ``QPDF`` object must remain valid after
the copy as discussed in the note below. The
-@1@command@1@qpdf@2@command@2@ command-line tool provides limited
+:command:`qpdf` command-line tool provides limited
support for basic page selection, including merging in pages from other
files, but the library's API makes it possible to implement arbitrarily
complex merging operations. The main method for copying foreign objects
@@ -3277,9 +3277,9 @@ Basic Strategy for Linearization
To avoid the incestuous problem of having the qpdf library validate its
own linearized files, we have a special linearized file checking mode
-which can be invoked via @1@command@1@qpdf
---check-linearization@2@command@2@ (or @1@command@1@qpdf
---check@2@command@2@). This mode reads the linearization parameter
+which can be invoked via :command:`qpdf
+--check-linearization` (or :command:`qpdf
+--check`). This mode reads the linearization parameter
dictionary and the hint streams and validates that object ordering,
parameters, and hint stream contents are correct. The validation code
was first tested against linearized files created by external tools
@@ -3441,11 +3441,11 @@ linearization appendix of the PDF specification.
Debugging Note
--------------
-The @1@command@1@qpdf --show-linearization@2@command@2@ command can show
+The :command:`qpdf --show-linearization` command can show
the complete contents of linearization hint streams. To look at the raw
data, you can extract the filtered contents of the linearization hint
-tables using @1@command@1@qpdf --show-object=n
---filtered-stream-data@2@command@2@. Then, to convert this into a bit
+tables using :command:`qpdf --show-object=n
+--filtered-stream-data`. Then, to convert this into a bit
stream (since linearization tables are bit streams written without
regard to byte boundaries), you can pipe the resulting data through the
following perl code:
@@ -3818,7 +3818,7 @@ For a detailed list of changes, please see the file
the original input file, unused form fields are removed, which
prevents lots of unused annotations from being retained.
- - By default, @1@command@1@qpdf@2@command@2@ no longer allows
+ - By default, :command:`qpdf` no longer allows
creation of encrypted PDF files whose user password is
non-empty and owner password is empty when a 256-bit key is in
use. The @1@option@1@--allow-insecure@2@option@2@ option,
@@ -4082,7 +4082,7 @@ For a detailed list of changes, please see the file
performance while allowing indirect objects to appear in
``/DecodeParms``.
- - When extracting pages, the @1@command@1@qpdf@2@command@2@ CLI
+ - When extracting pages, the :command:`qpdf` CLI
only removes unreferenced resources from the pages that are
being kept, resulting in a significant performance improvement
when extracting small numbers of pages from large, complex
@@ -4164,7 +4164,7 @@ For a detailed list of changes, please see the file
- Build Changes
- The option @1@option@1@--disable-rpath@2@option@2@ is now
- supported by qpdf's @1@command@1@./configure@2@command@2@
+ supported by qpdf's :command:`./configure`
script. Some distributions' packaging standards recommended the
use of this option.
@@ -4262,7 +4262,7 @@ For a detailed list of changes, please see the file
and, if so, what its length and filters are. Without this, it
was not possible to tell conclusively from the JSON output
alone whether or not an object was a stream. Run
- @1@command@1@qpdf --json-help@2@command@2@ for details.
+ :command:`qpdf --json-help` for details.
- Add new option
@1@option@1@--remove-unreferenced-resources@2@option@2@ which
@@ -4281,12 +4281,12 @@ For a detailed list of changes, please see the file
@1@option@1@--remove-unreferenced-resources=no@2@option@2@.
- If the ``QPDF_EXECUTABLE`` environment variable is set when
- invoking @1@command@1@qpdf --bash-completion@2@command@2@ or
- @1@command@1@qpdf --zsh-completion@2@command@2@, the completion
+ invoking :command:`qpdf --bash-completion` or
+ :command:`qpdf --zsh-completion`, the completion
command that it outputs will refer to qpdf using the value of
- that variable rather than what @1@command@1@qpdf@2@command@2@
+ that variable rather than what :command:`qpdf`
determines its executable path to be. This can be useful when
- wrapping @1@command@1@qpdf@2@command@2@ with a script, working
+ wrapping :command:`qpdf` with a script, working
with a version in the source tree, using an AppImage, or other
situations where there is some indirection.
@@ -4381,15 +4381,15 @@ For a detailed list of changes, please see the file
the reconstructed user password for older encryption formats,
this provides the same information as
@1@option@1@--show-encryption@2@option@2@ but in a consistent,
- parseable format. See output of @1@command@1@qpdf
- --json-help@2@command@2@ for details.
+ parseable format. See output of :command:`qpdf
+ --json-help` for details.
- Bug Fixes
- In QDF mode, be sure not to write more than one XRef stream to
a file, even when
@1@option@1@--preserve-unreferenced@2@option@2@ is used.
- @1@command@1@fix-qdf@2@command@2@ assumes that there is only
+ :command:`fix-qdf` assumes that there is only
one XRef stream, and that it appears at the end of the file.
- When externalizing inline images, properly handle images whose
@@ -4446,7 +4446,7 @@ For a detailed list of changes, please see the file
specified in the range.
- Fix shell wildcard expansion behavior (``*`` and ``?``) of the
- @1@command@1@qpdf.exe@2@command@2@ as built my MSVC.
+ :command:`qpdf.exe` as built my MSVC.
9.0.2: October 12, 2019
- Bug Fix
@@ -4512,7 +4512,7 @@ For a detailed list of changes, please see the file
Options <#ref.basic-options>`__ for more details.
- The @1@option@1@--recompress-flate@2@option@2@ instructs
- @1@command@1@qpdf@2@command@2@ to recompress streams that are
+ :command:`qpdf` to recompress streams that are
already compressed with ``/FlateDecode``. Useful with
@1@option@1@--compression-level@2@option@2@.
@@ -4570,8 +4570,8 @@ For a detailed list of changes, please see the file
``QPDF::ownerPasswordMatched`` have been added to enable a
caller to determine whether the supplied password was the user
password, the owner password, or both. This information is also
- displayed by @1@command@1@qpdf --show-encryption@2@command@2@
- and @1@command@1@qpdf --check@2@command@2@.
+ displayed by :command:`qpdf --show-encryption`
+ and :command:`qpdf --check`.
- Static method ``Pl_Flate::setCompressionLevel`` can be called
to set the zlib compression level globally used by all
@@ -4609,8 +4609,8 @@ For a detailed list of changes, please see the file
files have been fixed. Most of these problems were found by
Google's OSS-Fuzz project.
- - When @1@command@1@qpdf --check@2@command@2@ or
- @1@command@1@qpdf --check-linearization@2@command@2@ encounters
+ - When :command:`qpdf --check` or
+ :command:`qpdf --check-linearization` encounters
a file with linearization warnings but not errors, it now
properly exits with exit code 3 instead of 2.
@@ -4648,12 +4648,12 @@ For a detailed list of changes, please see the file
conversion warnings enabled. Numerous changes were made to the
library to make this safe.
- - QPDF's @1@command@1@make install@2@command@2@ target explicitly
+ - QPDF's :command:`make install` target explicitly
specifies the mode to use when installing files instead of
relying the user's umask. It was previously doing this for some
files but not others.
- - If @1@command@1@pkg-config@2@command@2@ is available, use it to
+ - If :command:`pkg-config` is available, use it to
locate @1@filename@1@libjpeg@2@filename@2@ and
@1@filename@1@zlib@2@filename@2@ dependencies, falling back on
old behavior if unsuccessful.
@@ -4674,15 +4674,15 @@ For a detailed list of changes, please see the file
8.4.1: April 27, 2019
- Enhancements
- - When @1@command@1@qpdf --version@2@command@2@ is run, it will
+ - When :command:`qpdf --version` is run, it will
detect if the qpdf CLI was built with a different version of
qpdf than the library, which may indicate a problem with the
installation.
- New option @1@option@1@--remove-page-labels@2@option@2@ will
remove page labels before generating output. This used to
- happen if you ran @1@command@1@qpdf --empty --pages ..
- --@2@command@2@, but the behavior changed in qpdf 8.3.0. This
+ happen if you ran :command:`qpdf --empty --pages ..
+ --`, but the behavior changed in qpdf 8.3.0. This
option enables people who were relying on the old behavior to
get it again.
@@ -4795,7 +4795,7 @@ For a detailed list of changes, please see the file
- In the @1@option@1@--pages@2@option@2@ option, allow use of "."
as a shortcut for the primary input file. That way, you can do
- @1@command@1@qpdf in.pdf --pages . 1-2 -- out.pdf@2@command@2@
+ :command:`qpdf in.pdf --pages . 1-2 -- out.pdf`
instead of having to repeat @1@filename@1@in.pdf@2@filename@2@
in the command.
@@ -4868,7 +4868,7 @@ For a detailed list of changes, please see the file
resulting object is an indirect object ready to be passed to
``QPDFPageDocumentHelper::addPage()`` for either the original
``QPDF`` object or a different one. This is what the
- @1@command@1@qpdf@2@command@2@ command-line tool uses to copy
+ :command:`qpdf` command-line tool uses to copy
the same page multiple times from the same file during
splitting and merging operations.
@@ -4931,15 +4931,15 @@ For a detailed list of changes, please see the file
``WINDOWS_WMAIN`` to be defined. If you do your own builds with
other compilers, you can define this symbol to cause ``wmain``
to be used. This is needed to allow the Windows
- @1@command@1@qpdf@2@command@2@ command to receive Unicode
+ :command:`qpdf` command to receive Unicode
command-line options.
8.3.0: January 7, 2019
- Command-line Enhancements
- - Shell completion: you can now use eval @1@command@1@$(qpdf
- --completion-bash)@2@command@2@ and eval @1@command@1@$(qpdf
- --completion-zsh)@2@command@2@ to enable shell completion for
+ - Shell completion: you can now use eval :command:`$(qpdf
+ --completion-bash)` and eval :command:`$(qpdf
+ --completion-zsh)` to enable shell completion for
bash and zsh.
- Page numbers (also known as page labels) are now preserved when
@@ -4968,8 +4968,8 @@ For a detailed list of changes, please see the file
options @1@option@1@--json@2@option@2@,
@1@option@1@--json-key@2@option@2@, and
@1@option@1@--json-object@2@option@2@ to generate a JSON
- representation of the PDF file. Run @1@command@1@qpdf
- --json-help@2@command@2@ to get a description of the JSON
+ representation of the PDF file. Run :command:`qpdf
+ --json-help` to get a description of the JSON
format. For more information, see `QPDF JSON <#ref.json>`__.
- The @1@option@1@--generate-appearances@2@option@2@ flag will
@@ -5109,11 +5109,11 @@ For a detailed list of changes, please see the file
- Build Improvements
- It is no longer necessary to run
- @1@command@1@autogen.sh@2@command@2@ to build from a pristine
+ :command:`autogen.sh` to build from a pristine
checkout. Automatically generated files are now committed so
that it is possible to build on platforms without autoconf
directly from a clean checkout of the repository. The
- @1@command@1@configure@2@command@2@ script detects if the files
+ :command:`configure` script detects if the files
are out of date when it also determines that the tools are
present to regenerate them.
@@ -5136,7 +5136,7 @@ For a detailed list of changes, please see the file
autoconf files, it could cause this check to fail. To avoid
this problem, pass
@1@option@1@--disable-check-autofiles@2@option@2@ to
- @1@command@1@configure@2@command@2@.
+ :command:`configure`.
- If you would like to have qpdf completion enabled
automatically, you can install completion files in the
@@ -5293,7 +5293,7 @@ For a detailed list of changes, please see the file
called by ``QPDFWriter`` to update your idea of the percentage
it thinks it is through writing its output. Client programs can
use this to implement reasonably accurate progress meters. The
- @1@command@1@qpdf@2@command@2@ command line tool uses this to
+ :command:`qpdf` command line tool uses this to
implement its @1@option@1@--progress@2@option@2@ option.
- New methods ``QPDFObjectHandle::newUnicodeString`` and
@@ -5347,7 +5347,7 @@ For a detailed list of changes, please see the file
type". This situation should be mostly or entirely eliminated
now.
- - Enhancements to the @1@command@1@qpdf@2@command@2@ Command-line
+ - Enhancements to the :command:`qpdf` Command-line
Tool. All new options listed here are documented in more detail in
`Running QPDF <#ref.using>`__.
@@ -5364,8 +5364,8 @@ For a detailed list of changes, please see the file
changes to the API.
- Add function ``qpdf_check_pdf`` to the C API. This function
- does basic checking that is a subset of what @1@command@1@qpdf
- --check@2@command@2@ performs.
+ does basic checking that is a subset of what :command:`qpdf
+ --check` performs.
- Major enhancements to the lexical layer of qpdf. For a complete
list of enhancements, please refer to the
@@ -5461,7 +5461,7 @@ For a detailed list of changes, please see the file
specialized and is only useful to applications that already
know how to create PCLm files.
- - Enhancements to the @1@command@1@qpdf@2@command@2@ Command-line
+ - Enhancements to the :command:`qpdf` Command-line
Tool. All new options listed here are documented in more detail in
`Running QPDF <#ref.using>`__.
@@ -5492,14 +5492,14 @@ For a detailed list of changes, please see the file
The @1@option@1@--stream-data@2@option@2@ option will remain
available.
- - When running @1@command@1@qpdf --check@2@command@2@ with other
+ - When running :command:`qpdf --check` with other
options, checks are always run first. This enables qpdf to
perform its full recovery logic before outputting other
information. This can be especially useful when manually
recovering broken files, looking at qpdf's regenerated cross
reference table, or other similar operations.
- - Process @1@command@1@--pages@2@command@2@ earlier so that other
+ - Process :command:`--pages` earlier so that other
options like @1@option@1@--show-pages@2@option@2@ or
@1@option@1@--split-pages@2@option@2@ can operate on the file
after page splitting/merging has occurred.
@@ -5573,10 +5573,10 @@ For a detailed list of changes, please see the file
- Bug fix: qpdf would fail to write files that had streams with
decode parameters referencing other streams.
- - New example program: @1@command@1@pdf-split-pages@2@command@2@:
+ - New example program: :command:`pdf-split-pages`:
efficiently split PDF files into individual pages. The example
- program does this more efficiently than using @1@command@1@qpdf
- --pages@2@command@2@ to do it.
+ program does this more efficiently than using :command:`qpdf
+ --pages` to do it.
- Packaging fix: Visual C++ binaries did not support Windows XP.
This has been rectified by updating the compilers used to generate
@@ -5619,9 +5619,9 @@ For a detailed list of changes, please see the file
cryptography API. To disable the OS-specific cryptography and use
the old version, pass the
@1@option@1@--enable-insecure-random@2@option@2@ option to
- @1@command@1@./configure@2@command@2@.
+ :command:`./configure`.
- - The @1@command@1@qpdf@2@command@2@ command-line tool now issues a
+ - The :command:`qpdf` command-line tool now issues a
warning when @1@option@1@-accessibility=n@2@option@2@ is specified
for newer encryption versions stating that the option is ignored.
qpdf, per the spec, has always ignored this flag, but it
@@ -5648,12 +5648,12 @@ For a detailed list of changes, please see the file
notes.
- Add @1@option@1@--show-npages@2@option@2@ command-line option to
- the @1@command@1@qpdf@2@command@2@ command to show the number of
+ the :command:`qpdf` command to show the number of
pages in a file.
- Allow omission of the page range within
@1@option@1@--pages@2@option@2@ for the
- @1@command@1@qpdf@2@command@2@ command. When omitted, the page
+ :command:`qpdf` command. When omitted, the page
range is implicitly taken to be all the pages in the file.
- Various enhancements were made to support different types of
@@ -5663,7 +5663,7 @@ For a detailed list of changes, please see the file
4.1.0: April 14, 2013
- Note to people including qpdf in distributions: the
@1@filename@1@.la@2@filename@2@ files generated by libtool are now
- installed by qpdf's @1@command@1@make install@2@command@2@ target.
+ installed by qpdf's :command:`make install` target.
Before, they were not installed. This means that if your
distribution does not want to include
@1@filename@1@.la@2@filename@2@ files, you must remove them as
@@ -5689,7 +5689,7 @@ For a detailed list of changes, please see the file
``QPDFObjectHandle`` object. These methods can be used for more
efficient parsing and debugging/diagnostic messages.
- - @1@command@1@qpdf --check@2@command@2@ now parses all pages'
+ - :command:`qpdf --check` now parses all pages'
content streams in addition to doing other checks. While there are
still many types of errors that cannot be detected, syntactic
errors in content streams will now be reported.
@@ -5735,7 +5735,7 @@ For a detailed list of changes, please see the file
was loss of filled in form values for certain files.
- Installation no longer uses GNU/Linux-specific versions of some
- commands, so @1@command@1@make install@2@command@2@ works on
+ commands, so :command:`make install` works on
Solaris with native tools.
- The 64-bit mingw Windows binary package no longer includes a
@@ -5838,7 +5838,7 @@ For a detailed list of changes, please see the file
- Removed the method ``decodeStreams``. This method was used by
the @1@option@1@--check@2@option@2@ option of the
- @1@command@1@qpdf@2@command@2@ command-line tool to force all
+ :command:`qpdf` command-line tool to force all
streams in the file to be decoded, but it also suffered from
the problem of opening otherwise unreferenced streams and thus
could report false positive. The
@@ -5859,9 +5859,9 @@ For a detailed list of changes, please see the file
- Allow the PDF header to appear anywhere in the first 1024 bytes of
the file. This is consistent with what other readers do.
- - Fix the @1@command@1@pkg-config@2@command@2@ files to list zlib
+ - Fix the :command:`pkg-config` files to list zlib
and pcre in ``Requires.private`` to better support static linking
- using @1@command@1@pkg-config@2@command@2@.
+ using :command:`pkg-config`.
3.0.2: September 6, 2012
- Bug fix: ``QPDFWriter::setOutputMemory`` did not work when not
@@ -5875,7 +5875,7 @@ For a detailed list of changes, please see the file
3.0.1: August 11, 2012
- Version 3.0.0 included addition of files for
- @1@command@1@pkg-config@2@command@2@, but this was not mentioned
+ :command:`pkg-config`, but this was not mentioned
in the release notes. The release notes for 3.0.0 were updated to
mention this.
@@ -5909,10 +5909,10 @@ For a detailed list of changes, please see the file
as the compiler and underlying platforms support it.
- Support for page selection (splitting and merging PDF files) has
- been added to the @1@command@1@qpdf@2@command@2@ command-line
+ been added to the :command:`qpdf` command-line
tool. See `Page Selection Options <#ref.page-selection>`__.
- - Options have been added to the @1@command@1@qpdf@2@command@2@
+ - Options have been added to the :command:`qpdf`
command-line tool for copying encryption parameters from another
file. See `Basic Options <#ref.basic-options>`__.
@@ -5952,10 +5952,10 @@ For a detailed list of changes, please see the file
(such as Linux), symbol versions are enabled by default. They can
be disabled by passing
@1@option@1@--disable-ld-version-script@2@option@2@ to
- @1@command@1@./configure@2@command@2@.
+ :command:`./configure`.
- The file @1@filename@1@libqpdf.pc@2@filename@2@ is now installed
- to support @1@command@1@pkg-config@2@command@2@.
+ to support :command:`pkg-config`.
- Image comparison tests are off by default now since they are not
needed to verify a correct build or port of qpdf. They are needed
@@ -5964,7 +5964,7 @@ For a detailed list of changes, please see the file
See @1@filename@1@README.md@2@filename@2@ for details.
- Large file tests are off by default but can be turned on with
- @1@command@1@./configure@2@command@2@ or by setting an environment
+ :command:`./configure` or by setting an environment
variable before running the test suite. See
@1@filename@1@README.md@2@filename@2@ for details.
@@ -5973,7 +5973,7 @@ For a detailed list of changes, please see the file
@1@filename@1@build/qtest.log@2@filename@2@. For packagers who are
building with an autobuilder, you can add the
@1@option@1@--enable-show-failed-test-output@2@option@2@ option to
- @1@command@1@./configure@2@command@2@ to restore the old behavior.
+ :command:`./configure` to restore the old behavior.
2.3.1: December 28, 2011
- Fix thread-safety problem resulting from non-thread-safe use of
@@ -6090,8 +6090,8 @@ For a detailed list of changes, please see the file
stream's data is filterable.
- Provide two new examples:
- @1@command@1@pdf-double-page-size@2@command@2@ and
- @1@command@1@pdf-invert-images@2@command@2@ that illustrate the
+ :command:`pdf-double-page-size` and
+ :command:`pdf-invert-images` that illustrate the
newly added interfaces.
- Fix a memory leak that would cause loss of a few bytes for every
@@ -6109,7 +6109,7 @@ For a detailed list of changes, please see the file
- Apply the same padding calculation fix from version 2.1.2 to the
main cross reference stream as well.
- - Since @1@command@1@qpdf --check@2@command@2@ only performs limited
+ - Since :command:`qpdf --check` only performs limited
checks, clarify the output to make it clear that there still may
be errors that qpdf can't check. This should make it less
surprising to people when another PDF reader is unable to read a
@@ -6181,7 +6181,7 @@ For a detailed list of changes, please see the file
use qpdf can enforce permissions.
- The @1@option@1@--check@2@option@2@ option to
- @1@command@1@qpdf@2@command@2@ has been extended to include some
+ :command:`qpdf` has been extended to include some
additional information.
- There have been a handful of non-compatible API changes. For
@@ -6213,7 +6213,7 @@ For a detailed list of changes, please see the file
2.0.2: June 30, 2008
- Update test suite to work properly with a
- non-@1@command@1@bash@2@command@2@
+ non-:command:`bash`
@1@filename@1@/bin/sh@2@filename@2@ and with Perl 5.10. No changes
were made to the actual qpdf source code itself for this release.