Commit 9106a5e308be94a012c631a6ebf5bb21a702150b

Authored by Jay Berkenbilt
Committed by GitHub
2 parents c03ee7aa 08acf8d0

Merge pull request #1208 from m-holger/manual

Standardize on "qpdf"
README-appimage.md
1 -# Using the QPDF AppImage bundle (for Linux x86_64 systems only) 1 +# Using the qpdf AppImage bundle (for Linux x86_64 systems only)
2 2
3 Tips: 3 Tips:
4 4
5 -* After downloading, you have to set the executable bit for any AppImage (for security reasons this is disabled by default): `chmod +x <name-of-application>.AppImage` 5 +* After downloading, you have to set the executable bit for any AppImage (for security reasons this is disabled by
  6 + default): `chmod +x <name-of-application>.AppImage`
6 7
7 -* Run the QPDF AppImage with the `--ai-usage` parameter to start learning some useful details about built-in features of this specific AppImage. 8 +* Run the qpdf AppImage with the `--ai-usage` parameter to start learning some useful details about built-in features of
  9 + this specific AppImage.
8 10
9 -* You can rename the AppImage to any name allowed for file names on Linux. The `.AppImage` suffix is not required for it to function. It will also work as expected if you invoke it from a symlink. Using `qpdf` as its filename or symlink name is OK. However, you may want to continue using the QPDF package provided by your system's package manager side by side with the AppImage bundle: in this case it is recommended to use `qpdf.ai` as a short name for (or as the symlink name to) the qpdf-<version>.AppImage. 11 +* You can rename the AppImage to any name allowed for file names on Linux. The `.AppImage` suffix is not required for it
  12 + to function. It will also work as expected if you invoke it from a symlink. Using `qpdf` as its filename or symlink
  13 + name is OK. However, you may want to continue using the qpdf package provided by your system's package manager side by
  14 + side with the AppImage bundle: in this case it is recommended to use `qpdf.ai` as a short name for (or as the symlink
  15 + name to) the qpdf-<version>.AppImage.
README-doc.txt
1 -WHERE TO FIND THE QPDF DOCUMENTATION 1 +WHERE TO FIND THE qpdf DOCUMENTATION
2 2
3 Complete documentation for qpdf can be found online here: 3 Complete documentation for qpdf can be found online here:
4 https://qpdf.readthedocs.io 4 https://qpdf.readthedocs.io
README-what-to-download.md
1 -To build from source for Linux or other UNIX/UNIX-like systems, it is generally sufficient to download just the source `qpdf-<version>.tar.gz` file. 1 +To build from source for Linux or other UNIX/UNIX-like systems, it is generally sufficient to download just the
  2 +source `qpdf-<version>.tar.gz` file.
2 3
3 Windows Binaries 4 Windows Binaries
4 5
5 -You can download Windows binaries that are statically linked with qpdf's external dependencies and use the OpenSSL crypto provider. There are several options: 6 +You can download Windows binaries that are statically linked with qpdf's external dependencies and use the OpenSSL
  7 +crypto provider. There are several options:
6 8
7 -* For Windows installers, you can download the `.exe` file for a traditional installer that allows relocation, or you can download the `.zip` file which you can unzip to any location. Note that the `msvc` executables perform slightly better than the `mingw` executables. 9 +* For Windows installers, you can download the `.exe` file for a traditional installer that allows relocation, or you
  10 + can download the `.zip` file which you can unzip to any location. Note that the `msvc` executables perform slightly
  11 + better than the `mingw` executables.
8 12
9 -* `qpdf-<version>-bin-msvc64.exe` - Use this for 64-bit Windows systems. This is the highest performance Windows release. It is usually the best choice for using qpdf from the command line. It is also the right choice if you are building non-Debug code for 64-bit systems using a recent version of Microsoft Visual C++. 13 +* `qpdf-<version>-bin-msvc64.exe` - Use this for 64-bit Windows systems. This is the highest performance Windows
  14 + release. It is usually the best choice for using qpdf from the command line. It is also the right choice if you are
  15 + building non-Debug code for 64-bit systems using a recent version of Microsoft Visual C++.
10 16
11 -* `qpdf-<version>-bin-mingw64.exe` - This is a 64-bit version built with mingw. Use this for 64-bit Windows systems if you want development libraries that work with the 64-bit version of mingw. If you are dynamically loading qpdf from the DLL, this version has fewer DLLs than the msvc version and does not require a Visual C++ runtime DLL. Unlike with the MSVC releases, it is possible to link a debugging build with mingw against non-debugging libraries built with mingw. 17 +* `qpdf-<version>-bin-mingw64.exe` - This is a 64-bit version built with mingw. Use this for 64-bit Windows systems if
  18 + you want development libraries that work with the 64-bit version of mingw. If you are dynamically loading qpdf from
  19 + the DLL, this version has fewer DLLs than the msvc version and does not require a Visual C++ runtime DLL. Unlike with
  20 + the MSVC releases, it is possible to link a debugging build with mingw against non-debugging libraries built with
  21 + mingw.
12 22
13 -* `qpdf-<version>-bin-msvc32.exe` - This is a 32-bit version built with MSVC. Use this if you need to run qpdf on a 32-bit system or if you are building 32-bit executables in non-Debug mode with Microsoft Visual C++. The 32-bit executables will work on 64-bit systems as well and are capable of working with files larger than 2 GB. 23 +* `qpdf-<version>-bin-msvc32.exe` - This is a 32-bit version built with MSVC. Use this if you need to run qpdf on a
  24 + 32-bit system or if you are building 32-bit executables in non-Debug mode with Microsoft Visual C++. The 32-bit
  25 + executables will work on 64-bit systems as well and are capable of working with files larger than 2 GB.
14 26
15 -* `qpdf-<version>-bin-mingw32.exe` - This is a 32-bit version built with mingw. It will work on 32-bit or 64-bit systems and can handle files larger than 2 GB. 27 +* `qpdf-<version>-bin-mingw32.exe` - This is a 32-bit version built with mingw. It will work on 32-bit or 64-bit systems
  28 + and can handle files larger than 2 GB.
16 29
17 Linux Binaries 30 Linux Binaries
18 31
19 -Virtually all Linux distributions include packages for qpdf. There is also a PPA for Ubuntu at https://launchpad.net/~qpdf/+archive/ubuntu/qpdf that includes the latest version of qpdf for recent versions of Ubuntu. However, there are some downloads available for Linux as well. 32 +Virtually all Linux distributions include packages for qpdf. There is also a PPA for Ubuntu
  33 +at https://launchpad.net/~qpdf/+archive/ubuntu/qpdf that includes the latest version of qpdf for recent versions of
  34 +Ubuntu. However, there are some downloads available for Linux as well.
20 35
21 -* `qpdf-<version>-x86_64.AppImage` - If you'd like to run the latest version of qpdf as an [AppImage](https://appimage.org/), you can download this. This is a self-contained executable that you make symlink `qpdf` to and run on most reasonably recent Linux distributions. See README-appimage.md in the qpdf source distribution for additional details, or run the AppImage with the `--ai-usage` argument to get help specific to the AppImage. 36 +* `qpdf-<version>-x86_64.AppImage` - If you'd like to run the latest version of qpdf as
  37 + an [AppImage](https://appimage.org/), you can download this. This is a self-contained executable that you make
  38 + symlink `qpdf` to and run on most reasonably recent Linux distributions. See README-appimage.md in the qpdf source
  39 + distribution for additional details, or run the AppImage with the `--ai-usage` argument to get help specific to the
  40 + AppImage.
22 41
23 -* `qpdf-<version>-bin-linux-x86_64.zip` - This is not intended to be an end-user distribution. It is a (nearly) stand-alone Linux binary, built using an Ubuntu LTS release. It contains the qpdf executables and shared libraries as well as dependent shared libraries that would not typically be present on a minimal system. This can be used to include qpdf in a minimal environment such as a docker container. It is also known to work as a layer in AWS Lambda and was initially created for that purpose. The executables have their runpath set to looks for the qpdf library in `../lib` relative to the location of the executables, which makes this distribution relocatable. 42 +* `qpdf-<version>-bin-linux-x86_64.zip` - This is not intended to be an end-user distribution. It is a (nearly)
  43 + stand-alone Linux binary, built using an Ubuntu LTS release. It contains the qpdf executables and shared libraries as
  44 + well as dependent shared libraries that would not typically be present on a minimal system. This can be used to
  45 + include qpdf in a minimal environment such as a docker container. It is also known to work as a layer in AWS Lambda
  46 + and was initially created for that purpose. The executables have their runpath set to looks for the qpdf library
  47 + in `../lib` relative to the location of the executables, which makes this distribution relocatable.
24 48
25 Windows Build Support 49 Windows Build Support
26 50
27 -If you are building on Windows and want to use pre-built external static libraries, you should obtain current versions from https://github.com/qpdf/external-libs/releases. The `external-libs` directory contains older versions that will not work with qpdf versions >= 10.0.2. Please see README-windows.md in the qpdf source distribution. The libraries from this distribution will not work with a Debug build with MSVC. 51 +If you are building on Windows and want to use pre-built external static libraries, you should obtain current versions
  52 +from https://github.com/qpdf/external-libs/releases. The `external-libs` directory contains older versions that will not
  53 +work with qpdf versions >= 10.0.2. Please see README-windows.md in the qpdf source distribution. The libraries from this
  54 +distribution will not work with a Debug build with MSVC.
28 55
29 Documentation 56 Documentation
30 57
31 -* `qpdf-<version>-doc.zip` - This is a downloadable version of the QPDF manual. An online version is hosted at https://qpdf.readthedocs.io. 58 +* `qpdf-<version>-doc.zip` - This is a downloadable version of the qpdf manual. An online version is hosted
  59 + at https://qpdf.readthedocs.io.
README.md
1 -# QPDF 1 +[![qpdf](logo/qpdf.svg)](https://qpdf.sourceforge.io)
2 2
3 -[![QPDF](logo/qpdf.svg)](https://qpdf.sourceforge.io)  
4 -  
5 -[![QPDF Build](https://github.com/qpdf/qpdf/workflows/QPDF%20Build/badge.svg)](https://github.com/qpdf/qpdf/actions) 3 +[![qpdf Build](https://github.com/qpdf/qpdf/workflows/QPDF%20Build/badge.svg)](https://github.com/qpdf/qpdf/actions)
6 [![Documentation Status](https://readthedocs.org/projects/qpdf/badge/?version=latest)](https://qpdf.readthedocs.io/en/latest/?badge=latest) 4 [![Documentation Status](https://readthedocs.org/projects/qpdf/badge/?version=latest)](https://qpdf.readthedocs.io/en/latest/?badge=latest)
7 5
8 -QPDF is a command-line tool and C++ library that performs content-preserving transformations on PDF files. It supports linearization, encryption, and numerous other features. It can also be used for splitting and merging files, creating PDF files (but you have to supply all the content yourself), and inspecting files for study or analysis. QPDF does not render PDFs or perform text extraction, and it does not contain higher-level interfaces for working with page contents. It is a low-level tool for working with the structure of PDF files and can be a valuable tool for anyone who wants to do programmatic or command-line-based manipulation of PDF files. 6 +qpdf is a command-line tool and C++ library that performs content-preserving transformations on PDF files. It supports
  7 +linearization, encryption, and numerous other features. It can also be used for splitting and merging files, creating
  8 +PDF files (but you have to supply all the content yourself), and inspecting files for study or analysis. qpdf does not
  9 +render PDFs or perform text extraction, and it does not contain higher-level interfaces for working with page contents.
  10 +It is a low-level tool for working with the structure of PDF files and can be a valuable tool for anyone who wants to do
  11 +programmatic or command-line-based manipulation of PDF files.
9 12
10 -The [QPDF Manual](https://qpdf.readthedocs.io) is hosted online at https://qpdf.readthedocs.io. The project website is https://qpdf.sourceforge.io. The source code repository is hosted at GitHub: https://github.com/qpdf/qpdf. 13 +The [qpdf Manual](https://qpdf.readthedocs.io) is hosted online at https://qpdf.readthedocs.io. The project website
  14 +is https://qpdf.sourceforge.io. The source code repository is hosted at GitHub: https://github.com/qpdf/qpdf.
11 15
12 # Verifying Distributions 16 # Verifying Distributions
13 17
14 -The public key used to sign qpdf source distributions has fingerprint `C2C9 6B10 011F E009 E6D1 DF82 8A75 D109 9801 2C7E` and can be found at https://q.ql.org/pubkey.asc or downloaded from a public key server. 18 +The public key used to sign qpdf source distributions has
  19 +fingerprint `C2C9 6B10 011F E009 E6D1 DF82 8A75 D109 9801 2C7E` and can be found at https://q.ql.org/pubkey.asc or
  20 +downloaded from a public key server.
15 21
16 # Copyright, License 22 # Copyright, License
17 23
18 -QPDF is copyright (c) 2005-2024 Jay Berkenbilt 24 +qpdf is copyright (c) 2005-2024 Jay Berkenbilt
19 25
20 -Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at 26 +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
  27 +License. You may obtain a copy of the License at
21 28
22 - https://www.apache.org/licenses/LICENSE-2.0 29 +https://www.apache.org/licenses/LICENSE-2.0
23 30
24 -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 31 +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "
  32 +AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
  33 +language governing permissions and limitations under the License.
25 34
26 You may also see the license in the file [LICENSE.txt](LICENSE.txt) in the source distribution. 35 You may also see the license in the file [LICENSE.txt](LICENSE.txt) in the source distribution.
27 36
28 -Versions of qpdf prior to version 7 were released under the terms of version 2.0 of the Artistic License. At your option, you may continue to consider qpdf to be licensed under those terms. Please see the manual for additional information. The Artistic License appears in the file [Artistic-2.0](Artistic-2.0) in the source distribution. 37 +Versions of qpdf prior to version 7 were released under the terms of version 2.0 of the Artistic License. At your
  38 +option, you may continue to consider qpdf to be licensed under those terms. Please see the manual for additional
  39 +information. The Artistic License appears in the file [Artistic-2.0](Artistic-2.0) in the source distribution.
29 40
30 # Prerequisites 41 # Prerequisites
31 42
32 -QPDF requires a C++ compiler that supports C++-17. 43 +qpdf requires a C++ compiler that supports C++-17.
33 44
34 -To compile and link something with qpdf, you can use `pkg-config` with package name `libqpdf` or `cmake` with package name `qpdf`. Here's an example of a `CMakeLists.txt` file that builds a program with the qpdf library: 45 +To compile and link something with qpdf, you can use `pkg-config` with package name `libqpdf` or `cmake` with package
  46 +name `qpdf`. Here's an example of a `CMakeLists.txt` file that builds a program with the qpdf library:
35 47
36 ``` 48 ```
37 cmake_minimum_required(VERSION 3.16) 49 cmake_minimum_required(VERSION 3.16)
@@ -41,50 +53,76 @@ add_executable(some-application some-application.cc) @@ -41,50 +53,76 @@ add_executable(some-application some-application.cc)
41 target_link_libraries(some-application qpdf::libqpdf) 53 target_link_libraries(some-application qpdf::libqpdf)
42 ``` 54 ```
43 55
44 -QPDF depends on the external libraries [zlib](https://www.zlib.net/) and [jpeg](https://www.ijg.org/files/). The [libjpeg-turbo](https://libjpeg-turbo.org/) library is also known to work since it is compatible with the regular jpeg library, and QPDF doesn't use any interfaces that aren't present in the straight jpeg8 API. These are part of every Linux distribution and are readily available. Download information appears in the documentation. For Windows, you can download pre-built binary versions of these libraries for some compilers; see [README-windows.md](README-windows.md) for additional details. 56 +qpdf depends on the external libraries [zlib](https://www.zlib.net/) and [jpeg](https://www.ijg.org/files/).
  57 +The [libjpeg-turbo](https://libjpeg-turbo.org/) library is also known to work since it is compatible with the regular
  58 +jpeg library, and qpdf doesn't use any interfaces that aren't present in the straight jpeg8 API. These are part of every
  59 +Linux distribution and are readily available. Download information appears in the documentation. For Windows, you can
  60 +download pre-built binary versions of these libraries for some compilers; see [README-windows.md](README-windows.md) for
  61 +additional details.
45 62
46 -Depending on which crypto providers are enabled, then [GnuTLS](https://www.gnutls.org/) and [OpenSSL](https://openssl.org) may also be required. This is discussed more in [Crypto providers](#crypto-providers) below. 63 +Depending on which crypto providers are enabled, then [GnuTLS](https://www.gnutls.org/)
  64 +and [OpenSSL](https://openssl.org) may also be required. This is discussed more in [Crypto providers](#crypto-providers)
  65 +below.
47 66
48 Detailed information appears in the [manual](https://qpdf.readthedocs.io/en/latest/installation.html). 67 Detailed information appears in the [manual](https://qpdf.readthedocs.io/en/latest/installation.html).
49 68
50 # Licensing terms of embedded software 69 # Licensing terms of embedded software
51 70
52 -QPDF makes use of zlib and jpeg libraries for its functionality. These packages can be downloaded separately from their own download locations. If the optional GnuTLS or OpenSSL crypto providers are enabled, then GnuTLS and/or OpenSSL are also required. 71 +qpdf makes use of zlib and jpeg libraries for its functionality. These packages can be downloaded separately from their
  72 +own download locations. If the optional GnuTLS or OpenSSL crypto providers are enabled, then GnuTLS and/or OpenSSL are
  73 +also required.
53 74
54 Please see the [NOTICE](NOTICE.md) file for information on licenses of embedded software. 75 Please see the [NOTICE](NOTICE.md) file for information on licenses of embedded software.
55 76
56 # Crypto providers 77 # Crypto providers
57 78
58 -qpdf can use different crypto implementations. These can be selected at compile time or at runtime. The native crypto implementations that were used in all versions prior to 9.1.0 are still present, but they are not built into qpdf by default if any external providers are available at build time. 79 +qpdf can use different crypto implementations. These can be selected at compile time or at runtime. The native crypto
  80 +implementations that were used in all versions prior to 9.1.0 are still present, but they are not built into qpdf by
  81 +default if any external providers are available at build time.
59 82
60 The following providers are available: 83 The following providers are available:
61 -* `gnutls`: an implementation that uses the GnuTLS library to provide crypto; causes libqpdf to link with the GnuTLS library  
62 -* `openssl`: an implementation that can use the OpenSSL (or BoringSSL) libraries to provide crypto; causes libqpdf to link with the OpenSSL library 84 +
  85 +* `gnutls`: an implementation that uses the GnuTLS library to provide crypto; causes libqpdf to link with the GnuTLS
  86 + library
  87 +* `openssl`: an implementation that can use the OpenSSL (or BoringSSL) libraries to provide crypto; causes libqpdf to
  88 + link with the OpenSSL library
63 * `native`: a native implementation where all the source is embedded in qpdf and no external dependencies are required 89 * `native`: a native implementation where all the source is embedded in qpdf and no external dependencies are required
64 90
65 -The default behavior is for cmake to discover which other crypto providers can be supported based on available external libraries, to build all available external crypto providers, and to use an external provider as the default over the native one. By default, the native crypto provider will be used only if no external providers are available. This behavior can be changed with various cmake options as [described in the manual](https://qpdf.readthedocs.io/en/latest/installation.html#build-time-crypto-selection). 91 +The default behavior is for cmake to discover which other crypto providers can be supported based on available external
  92 +libraries, to build all available external crypto providers, and to use an external provider as the default over the
  93 +native one. By default, the native crypto provider will be used only if no external providers are available. This
  94 +behavior can be changed with various cmake options
  95 +as [described in the manual](https://qpdf.readthedocs.io/en/latest/installation.html#build-time-crypto-selection).
66 96
67 ## Note about weak cryptographic algorithms 97 ## Note about weak cryptographic algorithms
68 98
69 -The PDF file format used to rely on RC4 for encryption. Using 256-bit keys always uses AES instead, and with 128-bit keys, you can elect to use AES. qpdf does its best to warn when someone is writing a file with weak cryptographic algorithms, but qpdf must always retain support for being able to read and even write files with weak encryption to be able to fully support older PDF files and older PDF readers. 99 +The PDF file format used to rely on RC4 for encryption. Using 256-bit keys always uses AES instead, and with 128-bit
  100 +keys, you can elect to use AES. qpdf does its best to warn when someone is writing a file with weak cryptographic
  101 +algorithms, but qpdf must always retain support for being able to read and even write files with weak encryption to be
  102 +able to fully support older PDF files and older PDF readers.
70 103
71 # Building from source distribution on UNIX/Linux 104 # Building from source distribution on UNIX/Linux
72 105
73 -Starting with version 11, qpdf builds with cmake. The default configuration with cmake works on most systems. On Windows, you can build qpdf with Visual Studio using cmake without having any additional tools installed. However, to run the test suite, you need MSYS2, and you also need MSYS2 to build with mingw. 106 +Starting with version 11, qpdf builds with cmake. The default configuration with cmake works on most systems. On
  107 +Windows, you can build qpdf with Visual Studio using cmake without having any additional tools installed. However, to
  108 +run the test suite, you need MSYS2, and you also need MSYS2 to build with mingw.
74 109
75 Example UNIX/Linux build: 110 Example UNIX/Linux build:
  111 +
76 ``` 112 ```
77 cmake -S . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo 113 cmake -S . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo
78 cmake --build build 114 cmake --build build
79 ``` 115 ```
80 116
81 Example mingw build from an MSYS2 mingw shell: 117 Example mingw build from an MSYS2 mingw shell:
  118 +
82 ``` 119 ```
83 cmake -S . -B build -G 'MSYS Makefiles' -DCMAKE_BUILD_TYPE=RelWithDebInfo 120 cmake -S . -B build -G 'MSYS Makefiles' -DCMAKE_BUILD_TYPE=RelWithDebInfo
84 cmake --build build 121 cmake --build build
85 ``` 122 ```
86 123
87 Example MSVC build from an MSYS shell or from a Windows command shell with Visual Studio command-line tools in the path: 124 Example MSVC build from an MSYS shell or from a Windows command shell with Visual Studio command-line tools in the path:
  125 +
88 ``` 126 ```
89 cmake -S . -B build 127 cmake -S . -B build
90 cmake --build build --config Release 128 cmake --build build --config Release
@@ -92,40 +130,85 @@ cmake --build build --config Release @@ -92,40 +130,85 @@ cmake --build build --config Release
92 130
93 Installation can be done with `cmake --install`. Packages can be made with `cpack`. 131 Installation can be done with `cmake --install`. Packages can be made with `cpack`.
94 132
95 -The tests use `qtest`, and the test driver is invoked by `ctest`. To see the real underlying tests, run `ctest --verbose` so that you can see `qtest`'s output. If you need to turn off qtest's color output, pass `-DQTEST_COLOR=0` to cmake. 133 +The tests use `qtest`, and the test driver is invoked by `ctest`. To see the real underlying tests,
  134 +run `ctest --verbose` so that you can see `qtest`'s output. If you need to turn off qtest's color output,
  135 +pass `-DQTEST_COLOR=0` to cmake.
96 136
97 For additional information, please refer to the [manual](https://qpdf.readthedocs.io/en/latest/installation.html). 137 For additional information, please refer to the [manual](https://qpdf.readthedocs.io/en/latest/installation.html).
98 138
99 # Building on Windows 139 # Building on Windows
100 140
101 -qpdf is known to build and pass its test suite with mingw and Microsoft Visual C++. Both 32-bit and 64-bit versions work. In addition to the manual, see [README-windows.md](README-windows.md) for more details on how to build under Windows. 141 +qpdf is known to build and pass its test suite with mingw and Microsoft Visual C++. Both 32-bit and 64-bit versions
  142 +work. In addition to the manual, see [README-windows.md](README-windows.md) for more details on how to build under
  143 +Windows.
102 144
103 # Building Documentation 145 # Building Documentation
104 146
105 -The QPDF manual is written in reStructured Text format and is build with [sphinx](https://www.sphinx-doc.org). The sources to the user manual can be found in the `manual` directory. For more detailed information, consult the [Building and Installing QPDF section of the manual](https://qpdf.readthedocs.io/en/latest/installation.html) or consult the [build-doc script](build-scripts/build-doc). 147 +The qpdf manual is written in reStructured Text format and is build with [sphinx](https://www.sphinx-doc.org). The
  148 +sources to the user manual can be found in the `manual` directory. For more detailed information, consult
  149 +the [Building and Installing qpdf section of the manual](https://qpdf.readthedocs.io/en/latest/installation.html) or
  150 +consult the [build-doc script](build-scripts/build-doc).
106 151
107 # Additional Notes on Build 152 # Additional Notes on Build
108 153
109 -qpdf provides cmake configuration files and pkg-config files. They support static and dynamic linking. In general, you do not need the header files from qpdf's dependencies to be available to builds that _use_ qpdf. The only exception to this is that, if you include `Pl_DCT.hh`, you need header files from `libjpeg`. Since this is a rare case, qpdf's cmake and pkg-config files do not automatically add a JPEG include path to the build. If you are using `Pl_DCT` explicitly, you probably already have that configured in your build. 154 +qpdf provides cmake configuration files and pkg-config files. They support static and dynamic linking. In general, you
  155 +do not need the header files from qpdf's dependencies to be available to builds that _use_ qpdf. The only exception to
  156 +this is that, if you include `Pl_DCT.hh`, you need header files from `libjpeg`. Since this is a rare case, qpdf's cmake
  157 +and pkg-config files do not automatically add a JPEG include path to the build. If you are using `Pl_DCT` explicitly,
  158 +you probably already have that configured in your build.
110 159
111 -To learn about using the library, please read comments in the header files in [include/qpdf](include/qpdf/), especially [QPDF.hh](include/qpdf/QPDF.hh), [QPDFObjectHandle.hh](include/qpdf/QPDFObjectHandle.hh), and  
112 -[QPDFWriter.hh](include/qpdf/QPDFWriter.hh). These are the best sources of documentation on the API. You can also study the code of [QPDFJob.cc](libqpdf/QPDFJob.cc), which exercises most of the public interface. There are additional example programs in the [examples](examples/) directory. 160 +To learn about using the library, please read comments in the header files in [include/qpdf](include/qpdf/),
  161 +especially [QPDF.hh](include/qpdf/QPDF.hh), [QPDFObjectHandle.hh](include/qpdf/QPDFObjectHandle.hh), and
  162 +[QPDFWriter.hh](include/qpdf/QPDFWriter.hh). These are the best sources of documentation on the API. You can also study
  163 +the code of [QPDFJob.cc](libqpdf/QPDFJob.cc), which exercises most of the public interface. There are additional example
  164 +programs in the [examples](examples/) directory.
113 165
114 # Additional Notes on Test Suite 166 # Additional Notes on Test Suite
115 167
116 -By default, slow tests and tests that require dependencies beyond those needed to build qpdf are disabled. Slow tests include image comparison tests and large file tests. Image comparison tests can be enabled by setting the `QPDF_TEST_COMPARE_IMAGES` environment variable to `1`. Large file tests can be enabled setting the `QPDF_LARGE_FILE_TEST_PATH` environment variable to the absolute path of a directory with at least 11 GB of free space that can handle files over 4 GB in size. On Windows, this should be a Windows path (e.g. `C:\LargeFileTemp` even if the build is being run from an MSYS2 environment. The test suite provides nearly full coverage even without these tests. Unless you are making deep changes to the library that would impact the contents of the generated PDF files or testing this on a new platform for the first time, there is no real reason to run these tests. If you're just running the test suite to make sure that qpdf works for your build, the default tests are adequate.  
117 -  
118 -If you are packaging qpdf for a distribution and preparing a build that is run by an autobuilder, you may want to pass `-DSHOW_FAILED_TEST_OUTPUT=1` to `cmake` and run `ctest` with the `--verbose` or `--output-on-failure` option. This way, if the test suite fails, test failure detail will be included in the build output. Otherwise, you will have to have access to the `qtest.log` file from the build to view test failures. The Debian packages for qpdf enable this option. More notes for packagers can be found in [the manual](https://qpdf.readthedocs.io/en/latest/packaging.html). 168 +By default, slow tests and tests that require dependencies beyond those needed to build qpdf are disabled. Slow tests
  169 +include image comparison tests and large file tests. Image comparison tests can be enabled by setting
  170 +the `QPDF_TEST_COMPARE_IMAGES` environment variable to `1`. Large file tests can be enabled setting
  171 +the `QPDF_LARGE_FILE_TEST_PATH` environment variable to the absolute path of a directory with at least 11 GB of free
  172 +space that can handle files over 4 GB in size. On Windows, this should be a Windows path (e.g. `C:\LargeFileTemp` even
  173 +if the build is being run from an MSYS2 environment. The test suite provides nearly full coverage even without these
  174 +tests. Unless you are making deep changes to the library that would impact the contents of the generated PDF files or
  175 +testing this on a new platform for the first time, there is no real reason to run these tests. If you're just running
  176 +the test suite to make sure that qpdf works for your build, the default tests are adequate.
  177 +
  178 +If you are packaging qpdf for a distribution and preparing a build that is run by an autobuilder, you may want to
  179 +pass `-DSHOW_FAILED_TEST_OUTPUT=1` to `cmake` and run `ctest` with the `--verbose` or `--output-on-failure` option. This
  180 +way, if the test suite fails, test failure detail will be included in the build output. Otherwise, you will have to have
  181 +access to the `qtest.log` file from the build to view test failures. The Debian packages for qpdf enable this option.
  182 +More notes for packagers can be found in [the manual](https://qpdf.readthedocs.io/en/latest/packaging.html).
119 183
120 # Random Number Generation 184 # Random Number Generation
121 185
122 -By default, qpdf uses the crypto provider for generating random numbers. The rest of this applies only if you are using the native crypto provider.  
123 -  
124 -If the native crypto provider is in use, then, when `qpdf` detects either the Windows cryptography API or the existence of `/dev/urandom`, `/dev/arandom`, or `/dev/random`, it uses them to generate cryptographically secure random numbers. If none of these conditions are true, the build will fail with an error. This behavior can be modified in several ways:  
125 -* If you use the cmake option `SKIP_OS_SECURE_RANDOM` or define the `SKIP_OS_SECURE_RANDOM` preprocessor symbol, qpdf will not attempt to use Windows cryptography or the random device. You must either supply your own random data provider or allow use of insecure random numbers.  
126 -* If you turn on the cmake option `USE_INSECURE_RANDOM` or define the `USE_INSECURE_RANDOM` preprocessor symbol, qpdf will try insecure random numbers if OS-provided secure random numbers are disabled. This is not a fallback. In order for insecure random numbers to be used, you must also disable OS secure random numbers since, otherwise, failure to find OS secure random numbers is a compile error. The insecure random number source is stdlib's `random()` or `rand()` calls. These random numbers are not cryptography secure, but the qpdf library is fully functional using them. Using non-secure random numbers means that it's easier in some cases to guess encryption keys.  
127 -* In all cases, you may supply your own random data provider. To do this, derive a class from `qpdf/RandomDataProvider` (since version 5.1.0) and call `QUtil::setRandomDataProvider` before you create any `QPDF` objects. If you supply your own random data provider, it will always be used even if support for one of the other random data providers is compiled in. If you wish to avoid any possibility of your build of qpdf from using anything but a user-supplied random data provider, you can define `SKIP_OS_SECURE_RANDOM` and not `USE_INSECURE_RANDOM`. In this case, qpdf will throw a runtime error if any attempt is made to generate random numbers and no random data provider has been supplied. 186 +By default, qpdf uses the crypto provider for generating random numbers. The rest of this applies only if you are using
  187 +the native crypto provider.
  188 +
  189 +If the native crypto provider is in use, then, when `qpdf` detects either the Windows cryptography API or the existence
  190 +of `/dev/urandom`, `/dev/arandom`, or `/dev/random`, it uses them to generate cryptographically secure random numbers.
  191 +If none of these conditions are true, the build will fail with an error. This behavior can be modified in several ways:
  192 +
  193 +* If you use the cmake option `SKIP_OS_SECURE_RANDOM` or define the `SKIP_OS_SECURE_RANDOM` preprocessor symbol, qpdf
  194 + will not attempt to use Windows cryptography or the random device. You must either supply your own random data
  195 + provider or allow use of insecure random numbers.
  196 +* If you turn on the cmake option `USE_INSECURE_RANDOM` or define the `USE_INSECURE_RANDOM` preprocessor symbol, qpdf
  197 + will try insecure random numbers if OS-provided secure random numbers are disabled. This is not a fallback. In order
  198 + for insecure random numbers to be used, you must also disable OS secure random numbers since, otherwise, failure to
  199 + find OS secure random numbers is a compile error. The insecure random number source is stdlib's `random()` or `rand()`
  200 + calls. These random numbers are not cryptography secure, but the qpdf library is fully functional using them. Using
  201 + non-secure random numbers means that it's easier in some cases to guess encryption keys.
  202 +* In all cases, you may supply your own random data provider. To do this, derive a class
  203 + from `qpdf/RandomDataProvider` (since version 5.1.0) and call `QUtil::setRandomDataProvider` before you create
  204 + any `QPDF` objects. If you supply your own random data provider, it will always be used even if support for one of the
  205 + other random data providers is compiled in. If you wish to avoid any possibility of your build of qpdf from using
  206 + anything but a user-supplied random data provider, you can define `SKIP_OS_SECURE_RANDOM` and
  207 + not `USE_INSECURE_RANDOM`. In this case, qpdf will throw a runtime error if any attempt is made to generate random
  208 + numbers and no random data provider has been supplied.
128 209
129 # Acknowledgments 210 # Acknowledgments
130 211
131 -The qpdf project has a JetBrains license through their [Open Source Program](https://www.jetbrains.com/community/opensource/#support). We are grateful for this program and have been enjoying the benefits of their high-quality products. 212 +The qpdf project has a JetBrains license through
  213 +their [Open Source Program](https://www.jetbrains.com/community/opensource/#support). We are grateful for this program
  214 +and have been enjoying the benefits of their high-quality products.
TODO-pages.md
@@ -6,7 +6,7 @@ to another (or back to the same PDF). A secondary goal is to add more flexibilit @@ -6,7 +6,7 @@ to another (or back to the same PDF). A secondary goal is to add more flexibilit
6 which documents can be split and combined (flexible assembly). 6 which documents can be split and combined (flexible assembly).
7 7
8 This is a work in progress. As implementation proceeds, details will become more solid. Comments are 8 This is a work in progress. As implementation proceeds, details will become more solid. Comments are
9 -encouraged. Please make comments in the [QPDF pages epic 9 +encouraged. Please make comments in the [qpdf pages epic
10 discussion](https://github.com/qpdf/qpdf/discussions/1104). As ideas are refined, they will be 10 discussion](https://github.com/qpdf/qpdf/discussions/1104). As ideas are refined, they will be
11 updated in this document. 11 updated in this document.
12 12
@@ -99,7 +99,7 @@ Documentation @@ -99,7 +99,7 @@ Documentation
99 99
100 * Do a full pass through the documentation. 100 * Do a full pass through the documentation.
101 101
102 - * Make sure `qpdf` is consistent. Use QPDF when just referring to the package. 102 + * Make sure `qpdf` is consistent. Use qpdf when just referring to the package.
103 * Make sure markup is consistent 103 * Make sure markup is consistent
104 * Autogenerate where possible 104 * Autogenerate where possible
105 * Consider which parts might be good candidates for moving to the wiki. 105 * Consider which parts might be good candidates for moving to the wiki.
@@ -337,7 +337,7 @@ so, I find it useful to make reference to them in this list. @@ -337,7 +337,7 @@ so, I find it useful to make reference to them in this list.
337 an object. I think qpdf must handle generations correctly, but make sure to test this carefully. 337 an object. I think qpdf must handle generations correctly, but make sure to test this carefully.
338 338
339 Note that there's nothing that says an indirect object in one update can't refer to an object that 339 Note that there's nothing that says an indirect object in one update can't refer to an object that
340 - doesn't appear until a later update. This means that QPDF has to hang onto indirect nulls, 340 + doesn't appear until a later update. This means that qpdf has to hang onto indirect nulls,
341 including when they appear as dictionary values. In this case, QPDF_Dictionary::getKeys() ignores 341 including when they appear as dictionary values. In this case, QPDF_Dictionary::getKeys() ignores
342 all keys with null values, and hasKey() returns false for keys that have null values. QPDF_Dictionary 342 all keys with null values, and hasKey() returns false for keys that have null values. QPDF_Dictionary
343 already handles the special case of keys that are indirect nulls, which is used to reserve foreign 343 already handles the special case of keys that are indirect nulls, which is used to reserve foreign
@@ -431,7 +431,7 @@ so, I find it useful to make reference to them in this list. @@ -431,7 +431,7 @@ so, I find it useful to make reference to them in this list.
431 431
432 * Support for handling file names with Unicode characters in Windows is incomplete. qpdf seems to 432 * Support for handling file names with Unicode characters in Windows is incomplete. qpdf seems to
433 support them okay from a functionality standpoint, and the right thing happens if you pass in 433 support them okay from a functionality standpoint, and the right thing happens if you pass in
434 - UTF-8 encoded filenames to QPDF library routines in Windows (they are converted internally to 434 + UTF-8 encoded filenames to qpdf library routines in Windows (they are converted internally to
435 wchar_t*), but file names are encoded in UTF-8 on output, which doesn't produce nice error 435 wchar_t*), but file names are encoded in UTF-8 on output, which doesn't produce nice error
436 messages or output on Windows in some cases. 436 messages or output on Windows in some cases.
437 437
@@ -658,7 +658,7 @@ Rejected Ideas @@ -658,7 +658,7 @@ Rejected Ideas
658 QPDFObjectHandle::getOwningQPDF() return a std::weak_ptr<QPDF>. Prior to #726 ( 658 QPDFObjectHandle::getOwningQPDF() return a std::weak_ptr<QPDF>. Prior to #726 (
659 QPDFObject/QPDFValue split, released in qpdf 11.0.0), getOwningQPDF() could return an invalid 659 QPDFObject/QPDFValue split, released in qpdf 11.0.0), getOwningQPDF() could return an invalid
660 pointer if the owning QPDF disappeared, but this is no longer the case, which removes the main 660 pointer if the owning QPDF disappeared, but this is no longer the case, which removes the main
661 - motivation. QPDF 11 added QPDF::create() anyway though. 661 + motivation. qpdf 11 added QPDF::create() anyway though.
662 662
663 Removing raw QPDF* would look something like this. Note that you can't use std::make_shared<T> 663 Removing raw QPDF* would look something like this. Note that you can't use std::make_shared<T>
664 unless T has a public constructor. 664 unless T has a public constructor.
manual/acknowledgement.rst
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 Acknowledgments 3 Acknowledgments
4 =============== 4 ===============
5 5
6 -QPDF was originally created in 2001 and modified periodically between 6 +qpdf was originally created in 2001 and modified periodically between
7 2001 and 2005 during my employment at `Apex CoVantage 7 2001 and 2005 during my employment at `Apex CoVantage
8 <https://apexcovantage.com/>`__. Upon my departure from Apex, the 8 <https://apexcovantage.com/>`__. Upon my departure from Apex, the
9 company graciously allowed me to take ownership of the software and 9 company graciously allowed me to take ownership of the software and
@@ -14,5 +14,5 @@ such a decision. This work would not have been possible without their @@ -14,5 +14,5 @@ such a decision. This work would not have been possible without their
14 support. 14 support.
15 15
16 In 2020, I joined `Advent Health Partners <https://adventhp.com/>`__, 16 In 2020, I joined `Advent Health Partners <https://adventhp.com/>`__,
17 -which has sponsored some previous QPDF work and generously allows me  
18 -to spend some "company time" maintaining QPDF. 17 +which has sponsored some previous qpdf work and generously allows me
  18 +to spend some "company time" maintaining qpdf.
manual/contributing.rst
@@ -154,7 +154,7 @@ request as submitted. @@ -154,7 +154,7 @@ request as submitted.
154 Personal Comments 154 Personal Comments
155 ----------------- 155 -----------------
156 156
157 -QPDF started as a work project in 2002. The first open source release 157 +qpdf started as a work project in 2002. The first open source release
158 was in 2008. While there have been a handful of contributors, the vast 158 was in 2008. While there have been a handful of contributors, the vast
159 majority of the code was written by one person over many years as a 159 majority of the code was written by one person over many years as a
160 side project. 160 side project.
manual/design.rst
@@ -133,7 +133,7 @@ certain document constructions. These are discussed in :ref:`helper-classes`. @@ -133,7 +133,7 @@ certain document constructions. These are discussed in :ref:`helper-classes`.
133 Helper Classes 133 Helper Classes
134 -------------- 134 --------------
135 135
136 -QPDF version 8.1 introduced the concept of helper classes. Helper 136 +qpdf version 8.1 introduced the concept of helper classes. Helper
137 classes are intended to contain higher level APIs that allow developers 137 classes are intended to contain higher level APIs that allow developers
138 to work with certain document constructs at an abstraction level above 138 to work with certain document constructs at an abstraction level above
139 that of ``QPDFObjectHandle`` while staying true to qpdf's philosophy of 139 that of ``QPDFObjectHandle`` while staying true to qpdf's philosophy of
@@ -232,7 +232,7 @@ using helper classes. @@ -232,7 +232,7 @@ using helper classes.
232 Implementation Notes 232 Implementation Notes
233 -------------------- 233 --------------------
234 234
235 -This section contains a few notes about QPDF's internal implementation, 235 +This section contains a few notes about qpdf's internal implementation,
236 particularly around what it does when it first processes a file. This 236 particularly around what it does when it first processes a file. This
237 section is a bit of a simplification of what it actually does, but it 237 section is a bit of a simplification of what it actually does, but it
238 could serve as a starting point to someone trying to understand the 238 could serve as a starting point to someone trying to understand the
@@ -281,7 +281,7 @@ object stream contents is discarded. In this way, the first time an @@ -281,7 +281,7 @@ object stream contents is discarded. In this way, the first time an
281 object in an object stream is requested, all objects in the stream are 281 object in an object stream is requested, all objects in the stream are
282 cached. 282 cached.
283 283
284 -The following example should clarify how ``QPDF`` processes a simple 284 +The following example should clarify how ``qpdf`` processes a simple
285 file. 285 file.
286 286
287 - Client constructs ``QPDF`` ``pdf`` and calls 287 - Client constructs ``QPDF`` ``pdf`` and calls
@@ -336,11 +336,11 @@ file. @@ -336,11 +336,11 @@ file.
336 336
337 .. _object_internals: 337 .. _object_internals:
338 338
339 -QPDF Object Internals 339 +qpdf Object Internals
340 --------------------- 340 ---------------------
341 341
342 The internals of ``QPDFObjectHandle`` and how qpdf stores objects were 342 The internals of ``QPDFObjectHandle`` and how qpdf stores objects were
343 -significantly rewritten for QPDF 11. Here are some additional details. 343 +significantly rewritten for qpdf 11. Here are some additional details.
344 344
345 Object Internals 345 Object Internals
346 ~~~~~~~~~~~~~~~~ 346 ~~~~~~~~~~~~~~~~
@@ -456,7 +456,7 @@ move between different integer types because of incompatible integer @@ -456,7 +456,7 @@ move between different integer types because of incompatible integer
456 types used in interoperable interfaces. Some are unavoidable, such as 456 types used in interoperable interfaces. Some are unavoidable, such as
457 moving between sizes and offsets, and others are there because of old 457 moving between sizes and offsets, and others are there because of old
458 code that is too in entrenched to be fixable without breaking source 458 code that is too in entrenched to be fixable without breaking source
459 -compatibility and causing pain for users. QPDF is compiled with extra 459 +compatibility and causing pain for users. qpdf is compiled with extra
460 warnings to detect conversions with potential data loss, and all such 460 warnings to detect conversions with potential data loss, and all such
461 cases should be fixed by either using a function from ``QIntC`` or a 461 cases should be fixed by either using a function from ``QIntC`` or a
462 ``static_cast``. 462 ``static_cast``.
@@ -478,7 +478,7 @@ packed together in some integer type. Also note that ``size_t`` and @@ -478,7 +478,7 @@ packed together in some integer type. Also note that ``size_t`` and
478 so sometimes an explicit cast may not be needed to avoid warnings on one 478 so sometimes an explicit cast may not be needed to avoid warnings on one
479 platform but may be needed on another. A conversion with ``QIntC`` 479 platform but may be needed on another. A conversion with ``QIntC``
480 should always be used when the types are different even if the 480 should always be used when the types are different even if the
481 -underlying size is the same. QPDF's automatic build builds on 32-bit 481 +underlying size is the same. qpdf's automatic build builds on 32-bit
482 and 64-bit platforms, and the test suite is very thorough, so it is 482 and 64-bit platforms, and the test suite is very thorough, so it is
483 hard to make any of the potential errors here without being caught in 483 hard to make any of the potential errors here without being caught in
484 build or test. 484 build or test.
@@ -538,14 +538,14 @@ is opened by an ordinary reader without specification of password, the @@ -538,14 +538,14 @@ is opened by an ordinary reader without specification of password, the
538 restrictions specified in the encryption dictionary can be enforced. 538 restrictions specified in the encryption dictionary can be enforced.
539 Most users wouldn't even realize such a file was encrypted. Since qpdf 539 Most users wouldn't even realize such a file was encrypted. Since qpdf
540 always ignores the restrictions (except for the purpose of reporting 540 always ignores the restrictions (except for the purpose of reporting
541 -what they are), qpdf doesn't care which password you use. QPDF will 541 +what they are), qpdf doesn't care which password you use. qpdf will
542 allow you to create PDF files with non-empty user passwords and empty 542 allow you to create PDF files with non-empty user passwords and empty
543 owner passwords. Some readers will require a password when you open 543 owner passwords. Some readers will require a password when you open
544 these files, and others will open the files without a password and not 544 these files, and others will open the files without a password and not
545 enforce restrictions. Having a non-empty user password and an empty 545 enforce restrictions. Having a non-empty user password and an empty
546 owner password doesn't really make sense because it would mean that 546 owner password doesn't really make sense because it would mean that
547 opening the file with the user password would be more restrictive than 547 opening the file with the user password would be more restrictive than
548 -not supplying a password at all. QPDF also allows you to create PDF 548 +not supplying a password at all. qpdf also allows you to create PDF
549 files with the same password as both the user and owner password. Some 549 files with the same password as both the user and owner password. Some
550 readers will not ever allow such files to be accessed without 550 readers will not ever allow such files to be accessed without
551 restrictions because they never try the password as the owner password 551 restrictions because they never try the password as the owner password
@@ -564,7 +564,7 @@ you do it by mistake. @@ -564,7 +564,7 @@ you do it by mistake.
564 Random Number Generation 564 Random Number Generation
565 ------------------------ 565 ------------------------
566 566
567 -QPDF generates random numbers to support generation of encrypted data. 567 +qpdf generates random numbers to support generation of encrypted data.
568 Starting in qpdf 10.0.0, qpdf uses the crypto provider as its source of 568 Starting in qpdf 10.0.0, qpdf uses the crypto provider as its source of
569 random numbers. Older versions used the OS-provided source of secure 569 random numbers. Older versions used the OS-provided source of secure
570 random numbers or, if allowed at build time, insecure random numbers 570 random numbers or, if allowed at build time, insecure random numbers
@@ -757,7 +757,7 @@ something like store its output to a file or a memory buffer ignoring a @@ -757,7 +757,7 @@ something like store its output to a file or a memory buffer ignoring a
757 successor. For additional details, look at 757 successor. For additional details, look at
758 :file:`Pipeline.hh`. 758 :file:`Pipeline.hh`.
759 759
760 -``QPDF`` can read raw or filtered streams. When reading a filtered 760 +``qpdf`` can read raw or filtered streams. When reading a filtered
761 stream, the ``QPDF`` class creates a ``Pipeline`` object for one of each 761 stream, the ``QPDF`` class creates a ``Pipeline`` object for one of each
762 appropriate filter object and chains them together. The last filter 762 appropriate filter object and chains them together. The last filter
763 should write to whatever type of output is required. The ``QPDF`` class 763 should write to whatever type of output is required. The ``QPDF`` class
manual/download.rst
1 .. _download: 1 .. _download:
2 2
3 -Downloading QPDF 3 +Downloading qpdf
4 ================ 4 ================
5 5
6 -QPDF is included in most Linux distributions. Native packages are 6 +qpdf is included in most Linux distributions. Native packages are
7 available for many other operating systems as well. 7 available for many other operating systems as well.
8 8
9 Other resources: 9 Other resources:
@@ -12,4 +12,4 @@ Other resources: @@ -12,4 +12,4 @@ Other resources:
12 12
13 - `GitHub project <https://github.com/qpdf/qpdf>`__ 13 - `GitHub project <https://github.com/qpdf/qpdf>`__
14 14
15 -- `QPDF project web site <https://qpdf.sourceforge.io>`__ 15 +- `qpdf project web site <https://qpdf.sourceforge.io>`__
manual/index.rst
@@ -2,14 +2,14 @@ @@ -2,14 +2,14 @@
2 Directives documentation: 2 Directives documentation:
3 https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html 3 https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html
4 4
5 -QPDF version |release| 5 +qpdf version |release|
6 ====================== 6 ======================
7 7
8 .. 8 ..
9 Include the actual text of the link to readthedocs so it shows up in 9 Include the actual text of the link to readthedocs so it shows up in
10 the PDF when printed. 10 the PDF when printed.
11 11
12 -Welcome to the QPDF documentation! For the latest version of this 12 +Welcome to the qpdf documentation! For the latest version of this
13 documentation, please visit `https://qpdf.readthedocs.io 13 documentation, please visit `https://qpdf.readthedocs.io
14 <https://qpdf.readthedocs.io>`__. 14 <https://qpdf.readthedocs.io>`__.
15 15
manual/installation.rst
1 .. _installing: 1 .. _installing:
2 2
3 -Building and Installing QPDF 3 +Building and Installing qpdf
4 ============================ 4 ============================
5 5
6 This chapter describes how to build and install qpdf. 6 This chapter describes how to build and install qpdf.
@@ -283,7 +283,7 @@ FUTURE @@ -283,7 +283,7 @@ FUTURE
283 breaking and are subject to change, which means code linked against 283 breaking and are subject to change, which means code linked against
284 a qpdf built with this option may not be binary compatible with 284 a qpdf built with this option may not be binary compatible with
285 installed qpdf libraries. Set this if you want to test your code 285 installed qpdf libraries. Set this if you want to test your code
286 - with proposed QPDF API changes and provide feedback prior to the 286 + with proposed qpdf API changes and provide feedback prior to the
287 inclusion of those changes in a release. Packagers should never 287 inclusion of those changes in a release. Packagers should never
288 distribute packages built with this option. 288 distribute packages built with this option.
289 289
manual/json.rst
@@ -325,7 +325,7 @@ unreferenced objects, encryption, decryption, linearization, QDF @@ -325,7 +325,7 @@ unreferenced objects, encryption, decryption, linearization, QDF
325 mode, etc. See :ref:`rewriting` for a more in-depth discussion. This 325 mode, etc. See :ref:`rewriting` for a more in-depth discussion. This
326 has a few noteworthy implications: 326 has a few noteworthy implications:
327 327
328 -- Decryption is handled transparently by qpdf. As there are no QPDF 328 +- Decryption is handled transparently by qpdf. As there are no qpdf
329 APIs, even internal to the library, that allow retrieval of 329 APIs, even internal to the library, that allow retrieval of
330 encrypted data in its raw, encrypted form, qpdf JSON always includes 330 encrypted data in its raw, encrypted form, qpdf JSON always includes
331 decrypted data. It is possible that a future version of qpdf may 331 decrypted data. It is possible that a future version of qpdf may
@@ -653,7 +653,7 @@ JSON Compatibility Guarantees @@ -653,7 +653,7 @@ JSON Compatibility Guarantees
653 653
654 The qpdf JSON representation includes a JSON serialization of the raw 654 The qpdf JSON representation includes a JSON serialization of the raw
655 objects in the PDF file as well as some computed information in a more 655 objects in the PDF file as well as some computed information in a more
656 -easily extracted format. QPDF provides some guarantees about its JSON 656 +easily extracted format. qpdf provides some guarantees about its JSON
657 format. These guarantees are designed to simplify the experience of a 657 format. These guarantees are designed to simplify the experience of a
658 developer working with the JSON format. 658 developer working with the JSON format.
659 659
manual/library.rst
1 .. _using-library: 1 .. _using-library:
2 2
3 -Using the QPDF Library 3 +Using the qpdf Library
4 ====================== 4 ======================
5 5
6 .. _using.from-cxx: 6 .. _using.from-cxx:
7 7
8 -Using QPDF from C++ 8 +Using qpdf from C++
9 ------------------- 9 -------------------
10 10
11 The source tree for the qpdf package has an 11 The source tree for the qpdf package has an
@@ -39,14 +39,14 @@ single-file executable that links with qpdf: @@ -39,14 +39,14 @@ single-file executable that links with qpdf:
39 39
40 40
41 The qpdf library is safe to use in a multithreaded program, but no 41 The qpdf library is safe to use in a multithreaded program, but no
42 -individual ``QPDF`` object instance (including ``QPDF``, 42 +individual ``qpdf`` object instance (including ``QPDF``,
43 ``QPDFObjectHandle``, or ``QPDFWriter``) can be used in more than one 43 ``QPDFObjectHandle``, or ``QPDFWriter``) can be used in more than one
44 thread at a time. Multiple threads may simultaneously work with 44 thread at a time. Multiple threads may simultaneously work with
45 -different instances of these and all other QPDF objects. 45 +different instances of these and all other qpdf objects.
46 46
47 .. _using.other-languages: 47 .. _using.other-languages:
48 48
49 -Using QPDF from other languages 49 +Using qpdf from other languages
50 ------------------------------- 50 -------------------------------
51 51
52 The qpdf library is implemented in C++, which makes it hard to use 52 The qpdf library is implemented in C++, which makes it hard to use
manual/license.rst
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 License 3 License
4 ======= 4 =======
5 5
6 -QPDF is licensed under `the Apache License, Version 2.0 6 +qpdf is licensed under `the Apache License, Version 2.0
7 <http://www.apache.org/licenses/LICENSE-2.0>`__ (the "License"). 7 <http://www.apache.org/licenses/LICENSE-2.0>`__ (the "License").
8 Unless required by applicable law or agreed to in writing, software 8 Unless required by applicable law or agreed to in writing, software
9 distributed under the License is distributed on an "AS IS" BASIS, 9 distributed under the License is distributed on an "AS IS" BASIS,
manual/overview.rst
1 .. _overview: 1 .. _overview:
2 2
3 -What is QPDF? 3 +What is qpdf?
4 ============= 4 =============
5 5
6 -QPDF is a program and C++ library for structural, content-preserving  
7 -transformations on PDF files. QPDF's website is located at  
8 -https://qpdf.sourceforge.io/. QPDF's source code is hosted on github 6 +qpdf is a program and C++ library for structural, content-preserving
  7 +transformations on PDF files. qpdf's website is located at
  8 +https://qpdf.sourceforge.io/. qpdf's source code is hosted on github
9 at https://github.com/qpdf/qpdf. You can find the latest version of 9 at https://github.com/qpdf/qpdf. You can find the latest version of
10 this documentation at https://qpdf.readthedocs.io/. 10 this documentation at https://qpdf.readthedocs.io/.
11 11
12 -QPDF provides many useful capabilities to developers of PDF-producing 12 +qpdf provides many useful capabilities to developers of PDF-producing
13 software or for people who just want to look at the innards of a PDF 13 software or for people who just want to look at the innards of a PDF
14 -file to learn more about how they work. With QPDF, it is possible to 14 +file to learn more about how they work. With qpdf, it is possible to
15 copy objects from one PDF file into another and to manipulate the list 15 copy objects from one PDF file into another and to manipulate the list
16 of pages in a PDF file. This makes it possible to merge and split PDF 16 of pages in a PDF file. This makes it possible to merge and split PDF
17 -files. The QPDF library also makes it possible for you to create PDF 17 +files. The qpdf library also makes it possible for you to create PDF
18 files from scratch. In this mode, you are responsible for supplying 18 files from scratch. In this mode, you are responsible for supplying
19 -all the contents of the file, while the QPDF library takes care of all 19 +all the contents of the file, while the qpdf library takes care of all
20 the syntactical representation of the objects, creation of cross 20 the syntactical representation of the objects, creation of cross
21 references tables and, if you use them, object streams, encryption, 21 references tables and, if you use them, object streams, encryption,
22 linearization, and other syntactic details. You are still responsible 22 linearization, and other syntactic details. You are still responsible
23 for generating PDF content on your own. 23 for generating PDF content on your own.
24 24
25 -QPDF has been designed with very few external dependencies, and it is  
26 -intentionally very lightweight. QPDF is *not* a PDF content creation 25 +qpdf has been designed with very few external dependencies, and it is
  26 +intentionally very lightweight. qpdf is *not* a PDF content creation
27 library, a PDF viewer, or a program capable of converting PDF into other 27 library, a PDF viewer, or a program capable of converting PDF into other
28 -formats. In particular, QPDF knows nothing about the semantics of PDF 28 +formats. In particular, qpdf knows nothing about the semantics of PDF
29 content streams. If you are looking for something that can do that, you 29 content streams. If you are looking for something that can do that, you
30 -should look elsewhere. However, once you have a valid PDF file, QPDF can 30 +should look elsewhere. However, once you have a valid PDF file, qpdf can
31 be used to transform that file in ways that perhaps your original PDF 31 be used to transform that file in ways that perhaps your original PDF
32 creation tool can't handle. For example, many programs generate simple PDF 32 creation tool can't handle. For example, many programs generate simple PDF
33 files but can't password-protect them, web-optimize them, or perform 33 files but can't password-protect them, web-optimize them, or perform
manual/release-notes.rst
@@ -128,14 +128,14 @@ Planned changes for future 12.x (subject to change): @@ -128,14 +128,14 @@ Planned changes for future 12.x (subject to change):
128 reference streams, linearization hint streams, and object 128 reference streams, linearization hint streams, and object
129 streams. This has been fixed. 129 streams. This has been fixed.
130 130
131 - - Fix to QPDF JSON: the syntax ``"n:/pdf-syntax"`` is now accepted 131 + - Fix to qpdf JSON: the syntax ``"n:/pdf-syntax"`` is now accepted
132 as an alternative way to represent names. This can be used for 132 as an alternative way to represent names. This can be used for
133 any name (e.g. ``"n:/text#2fplain"``), but it is necessary when 133 any name (e.g. ``"n:/text#2fplain"``), but it is necessary when
134 the name contains binary characters. For example, ``/one#a0two`` 134 the name contains binary characters. For example, ``/one#a0two``
135 must be represented as ``"n:/one#a0two"`` since the single byte 135 must be represented as ``"n:/one#a0two"`` since the single byte
136 ``a0`` is not valid in JSON. 136 ``a0`` is not valid in JSON.
137 137
138 - - QPDF JSON will convert floating numbers that appear in the JSON 138 + - qpdf JSON will convert floating numbers that appear in the JSON
139 in scientific notation to fixed-point notation since PDF doesn't 139 in scientific notation to fixed-point notation since PDF doesn't
140 accept scientific notation. 140 accept scientific notation.
141 141
@@ -1531,7 +1531,7 @@ Planned changes for future 12.x (subject to change): @@ -1531,7 +1531,7 @@ Planned changes for future 12.x (subject to change):
1531 environment, such as a docker container. The zip file is also 1531 environment, such as a docker container. The zip file is also
1532 known to work as a layer in AWS Lambda. 1532 known to work as a layer in AWS Lambda.
1533 1533
1534 - - QPDF's automated build has been migrated from Azure Pipelines 1534 + - qpdf's automated build has been migrated from Azure Pipelines
1535 to GitHub Actions. 1535 to GitHub Actions.
1536 1536
1537 - Windows-specific Changes 1537 - Windows-specific Changes
@@ -1916,7 +1916,7 @@ Planned changes for future 12.x (subject to change): @@ -1916,7 +1916,7 @@ Planned changes for future 12.x (subject to change):
1916 tell ``QPDFWriter`` to uncompress and recompress streams 1916 tell ``QPDFWriter`` to uncompress and recompress streams
1917 already compressed with ``/FlateDecode``. 1917 already compressed with ``/FlateDecode``.
1918 1918
1919 - - The underlying implementation of QPDF arrays has been enhanced 1919 + - The underlying implementation of qpdf arrays has been enhanced
1920 to be much more memory efficient when dealing with arrays with 1920 to be much more memory efficient when dealing with arrays with
1921 lots of nulls. This enables qpdf to use drastically less memory 1921 lots of nulls. This enables qpdf to use drastically less memory
1922 for certain types of files. 1922 for certain types of files.
@@ -1979,11 +1979,11 @@ Planned changes for future 12.x (subject to change): @@ -1979,11 +1979,11 @@ Planned changes for future 12.x (subject to change):
1979 If you see this, please report a bug at 1979 If you see this, please report a bug at
1980 https://github.com/qpdf/qpdf/issues/. 1980 https://github.com/qpdf/qpdf/issues/.
1981 1981
1982 - - QPDF is now compiled with integer conversion and sign 1982 + - qpdf is now compiled with integer conversion and sign
1983 conversion warnings enabled. Numerous changes were made to the 1983 conversion warnings enabled. Numerous changes were made to the
1984 library to make this safe. 1984 library to make this safe.
1985 1985
1986 - - QPDF's :command:`make install` target explicitly 1986 + - qpdf's :command:`make install` target explicitly
1987 specifies the mode to use when installing files instead of 1987 specifies the mode to use when installing files instead of
1988 relying the user's umask. It was previously doing this for some 1988 relying the user's umask. It was previously doing this for some
1989 files but not others. 1989 files but not others.
@@ -1995,7 +1995,7 @@ Planned changes for future 12.x (subject to change): @@ -1995,7 +1995,7 @@ Planned changes for future 12.x (subject to change):
1995 1995
1996 - Other Notes 1996 - Other Notes
1997 1997
1998 - - QPDF has been fully integrated into `Google's OSS-Fuzz 1998 + - qpdf has been fully integrated into `Google's OSS-Fuzz
1999 project <https://github.com/google/oss-fuzz>`__. This project 1999 project <https://github.com/google/oss-fuzz>`__. This project
2000 exercises code with randomly mutated inputs and is great for 2000 exercises code with randomly mutated inputs and is great for
2001 discovering hidden security crashes and security issues. 2001 discovering hidden security crashes and security issues.
@@ -2179,7 +2179,7 @@ Planned changes for future 12.x (subject to change): @@ -2179,7 +2179,7 @@ Planned changes for future 12.x (subject to change):
2179 2179
2180 - Add method ``QUtil::possible_repaired_encodings()`` to generate 2180 - Add method ``QUtil::possible_repaired_encodings()`` to generate
2181 a list of strings that represent other ways the given string 2181 a list of strings that represent other ways the given string
2182 - could have been encoded. This is the method the QPDF CLI uses 2182 + could have been encoded. This is the method the qpdf CLI uses
2183 to generate the strings it tries when recovering incorrectly 2183 to generate the strings it tries when recovering incorrectly
2184 encoded Unicode passwords. 2184 encoded Unicode passwords.
2185 2185
@@ -2344,7 +2344,7 @@ Planned changes for future 12.x (subject to change): @@ -2344,7 +2344,7 @@ Planned changes for future 12.x (subject to change):
2344 2344
2345 - Bug Fixes and Enhancements 2345 - Bug Fixes and Enhancements
2346 2346
2347 - - QPDF now automatically detects and recovers from dangling 2347 + - qpdf now automatically detects and recovers from dangling
2348 references. If a PDF file contained an indirect reference to a 2348 references. If a PDF file contained an indirect reference to a
2349 non-existent object, which is valid, when adding a new object 2349 non-existent object, which is valid, when adding a new object
2350 to the file, it was possible for the new object to take the 2350 to the file, it was possible for the new object to take the
@@ -2662,7 +2662,7 @@ Planned changes for future 12.x (subject to change): @@ -2662,7 +2662,7 @@ Planned changes for future 12.x (subject to change):
2662 8.0.0: February 25, 2018 2662 8.0.0: February 25, 2018
2663 - Packaging and Distribution Changes 2663 - Packaging and Distribution Changes
2664 2664
2665 - - QPDF is now distributed as an 2665 + - qpdf is now distributed as an
2666 `AppImage <https://appimage.org/>`__ in addition to all the 2666 `AppImage <https://appimage.org/>`__ in addition to all the
2667 other ways it is distributed. The AppImage can be found in the 2667 other ways it is distributed. The AppImage can be found in the
2668 download area with the other packages. Thanks to Kurt Pfeifle 2668 download area with the other packages. Thanks to Kurt Pfeifle
@@ -2752,14 +2752,14 @@ Planned changes for future 12.x (subject to change): @@ -2752,14 +2752,14 @@ Planned changes for future 12.x (subject to change):
2752 7.0.0: September 15, 2017 2752 7.0.0: September 15, 2017
2753 - Packaging and Distribution Changes 2753 - Packaging and Distribution Changes
2754 2754
2755 - - QPDF's primary license is now `version 2.0 of the Apache 2755 + - qpdf's primary license is now `version 2.0 of the Apache
2756 License <http://www.apache.org/licenses/LICENSE-2.0>`__ rather 2756 License <http://www.apache.org/licenses/LICENSE-2.0>`__ rather
2757 than version 2.0 of the Artistic License. You may still, at 2757 than version 2.0 of the Artistic License. You may still, at
2758 your option, consider qpdf to be licensed with version 2.0 of 2758 your option, consider qpdf to be licensed with version 2.0 of
2759 the Artistic license. 2759 the Artistic license.
2760 2760
2761 - - QPDF no longer has a dependency on the PCRE (Perl-Compatible  
2762 - Regular Expression) library. QPDF now has an added dependency 2761 + - qpdf no longer has a dependency on the PCRE (Perl-Compatible
  2762 + Regular Expression) library. qpdf now has an added dependency
2763 on the JPEG library. 2763 on the JPEG library.
2764 2764
2765 - Bug Fixes 2765 - Bug Fixes
@@ -2771,7 +2771,7 @@ Planned changes for future 12.x (subject to change): @@ -2771,7 +2771,7 @@ Planned changes for future 12.x (subject to change):
2771 2771
2772 - New Features 2772 - New Features
2773 2773
2774 - - QPDF now supports reading and writing streams encoded with JPEG 2774 + - qpdf now supports reading and writing streams encoded with JPEG
2775 or RunLength encoding. Library API enhancements and 2775 or RunLength encoding. Library API enhancements and
2776 command-line options have been added to control this behavior. 2776 command-line options have been added to control this behavior.
2777 See command-line options 2777 See command-line options
@@ -2780,9 +2780,9 @@ Planned changes for future 12.x (subject to change): @@ -2780,9 +2780,9 @@ Planned changes for future 12.x (subject to change):
2780 ``QPDFWriter::setCompressStreams`` and 2780 ``QPDFWriter::setCompressStreams`` and
2781 ``QPDFWriter::setDecodeLevel``. 2781 ``QPDFWriter::setDecodeLevel``.
2782 2782
2783 - - QPDF is much better at recovering from broken files. In most 2783 + - qpdf is much better at recovering from broken files. In most
2784 cases, qpdf will skip invalid objects and will preserve broken 2784 cases, qpdf will skip invalid objects and will preserve broken
2785 - stream data by not attempting to filter broken streams. QPDF is 2785 + stream data by not attempting to filter broken streams. qpdf is
2786 now able to recover or at least not crash on dozens of broken 2786 now able to recover or at least not crash on dozens of broken
2787 test files I have received over the past few years. 2787 test files I have received over the past few years.
2788 2788
@@ -3390,7 +3390,7 @@ Planned changes for future 12.x (subject to change): @@ -3390,7 +3390,7 @@ Planned changes for future 12.x (subject to change):
3390 and ``std::cerr`` with other streams for generation of diagnostic 3390 and ``std::cerr`` with other streams for generation of diagnostic
3391 messages and error messages. This can be useful for GUIs or other 3391 messages and error messages. This can be useful for GUIs or other
3392 applications that want to capture any output generated by the 3392 applications that want to capture any output generated by the
3393 - library to present to the user in some other way. Note that QPDF 3393 + library to present to the user in some other way. Note that qpdf
3394 does not write to ``std::cout`` (or the specified output stream) 3394 does not write to ``std::cout`` (or the specified output stream)
3395 except where explicitly mentioned in 3395 except where explicitly mentioned in
3396 :file:`QPDF.hh`, and that the only use of the 3396 :file:`QPDF.hh`, and that the only use of the
@@ -3533,7 +3533,7 @@ Planned changes for future 12.x (subject to change): @@ -3533,7 +3533,7 @@ Planned changes for future 12.x (subject to change):
3533 3533
3534 - *Non-compatible API changes:* 3534 - *Non-compatible API changes:*
3535 3535
3536 - - QPDF's exception handling mechanism now uses 3536 + - qpdf's exception handling mechanism now uses
3537 ``std::logic_error`` for internal errors and 3537 ``std::logic_error`` for internal errors and
3538 ``std::runtime_error`` for runtime errors in favor of the now 3538 ``std::runtime_error`` for runtime errors in favor of the now
3539 removed ``QEXC`` classes used in previous versions. The ``QEXC`` 3539 removed ``QEXC`` classes used in previous versions. The ``QEXC``
manual/weak-crypto.rst
@@ -105,7 +105,7 @@ original encryption, *if any*. Also, one may have a template used for @@ -105,7 +105,7 @@ original encryption, *if any*. Also, one may have a template used for
105 encryption that one may apply to a variety of output files, and it 105 encryption that one may apply to a variety of output files, and it
106 would be annoying to be warned about it for every output file. 106 would be annoying to be warned about it for every output file.
107 107
108 -Uses of Weak Hashing In QPDF 108 +Uses of Weak Hashing In qpdf
109 ---------------------------- 109 ----------------------------
110 110
111 The PDF specification makes use the weak *MD5* hashing algorithm in 111 The PDF specification makes use the weak *MD5* hashing algorithm in