diff options
-rw-r--r-- | job.sums | 4 | ||||
-rw-r--r-- | libqpdf/qpdf/auto_job_help.hh | 38 | ||||
-rw-r--r-- | manual/cli.rst | 6 |
3 files changed, 29 insertions, 19 deletions
@@ -2,7 +2,7 @@ generate_auto_job b70f64314f1ae1f100fa6a11975dee5f7669038e2a619b6c9da1e5230db1dd1b job.yml 8177cadf41096efdc174f04daadfe5d98c592ad44ad10cb96537521fd79a801a libqpdf/qpdf/auto_job_decl.hh 97395ecbe590b23ae04d6cce2080dbd0e998917ff5eeaa5c6aafa91041d3cd6a -libqpdf/qpdf/auto_job_help.hh 9f4bd3e42510446a714771143e6a1db599a614818329d6c7126bb9fbcccd1f36 +libqpdf/qpdf/auto_job_help.hh 3a56e34d54dd3a7ea9e248d0fbc9ed6923c30f3c4bb455e2f0894b2f7fb14c72 libqpdf/qpdf/auto_job_init.hh 465bf46769559ceb77110d1b9d3293ba9b3595850b49848c31aeabd10aadb4ad manual/_ext/qpdf.py 855fe12de5af7a10bb24be6ecc4d5dff4c84ac58cf388a13be6bbb394346a67d -manual/cli.rst a1d5a72677eed46cfc91dba7cde8163107594adecb7f7362f0d402dea59833bd +manual/cli.rst ce761433f0f84c379d9509c9fc4cb8ed08556ecf8f2fe22bb4a6146f3041439d diff --git a/libqpdf/qpdf/auto_job_help.hh b/libqpdf/qpdf/auto_job_help.hh index f5d7a14c..348e9ad9 100644 --- a/libqpdf/qpdf/auto_job_help.hh +++ b/libqpdf/qpdf/auto_job_help.hh @@ -700,7 +700,11 @@ Prepend a prefix to each key; may be needed if there are duplicate attachment keys. This affects the key only, not the file name. )"); -ap.addOptionHelp("--is-encrypted", "copy-attachments", "silently test whether a file is encrypted", R"(Silently exit with a code indicating the file's encryption status: +ap.addHelpTopic("inspection", "inspect PDF files", R"(These options provide tools for inspecting PDF files. When any of +the options in this section are specified, no output file should be +given. +)"); +ap.addOptionHelp("--is-encrypted", "inspection", "silently test whether a file is encrypted", R"(Silently exit with a code indicating the file's encryption status: 0: the file is encrypted 1: not used @@ -709,64 +713,64 @@ ap.addOptionHelp("--is-encrypted", "copy-attachments", "silently test whether a This can be used with password-protected files even if you don't know the password. )"); -ap.addOptionHelp("--requires-password", "copy-attachments", "silently test a file's password", R"(Silently exit with a code indicating the file's password status: +ap.addOptionHelp("--requires-password", "inspection", "silently test a file's password", R"(Silently exit with a code indicating the file's password status: 0: a password, other than as supplied, is required 1: not used 2: the file is not encrypted 3: the file is encrypted, and correct password (if any) has been supplied )"); -ap.addOptionHelp("--check", "copy-attachments", "partially check whether PDF is valid", R"(Check the structure of the PDF file as well as a number of other +ap.addOptionHelp("--check", "inspection", "partially check whether PDF is valid", R"(Check the structure of the PDF file as well as a number of other aspects of the file, and write information about the file to standard output. Note that qpdf does not perform any validation of the actual PDF page content or semantic correctness of the PDF file. It merely checks that the PDF file is syntactically valid. See also qpdf --help=exit-status. )"); -ap.addOptionHelp("--show-encryption", "copy-attachments", "information about encrypted files", R"(Show document encryption parameters. Also show the document's +ap.addOptionHelp("--show-encryption", "inspection", "information about encrypted files", R"(Show document encryption parameters. Also show the document's user password if the owner password is given and the file was encrypted using older encryption formats that allow user password recovery. )"); -ap.addOptionHelp("--show-encryption-key", "copy-attachments", "show key with --show-encryption", R"(When used with --show-encryption, causes the underlying +ap.addOptionHelp("--show-encryption-key", "inspection", "show key with --show-encryption", R"(When used with --show-encryption, causes the underlying encryption key to be displayed. )"); -ap.addOptionHelp("--check-linearization", "copy-attachments", "check linearization tables", R"(Check to see whether a file is linearized and, if so, whether +ap.addOptionHelp("--check-linearization", "inspection", "check linearization tables", R"(Check to see whether a file is linearized and, if so, whether the linearization hint tables are correct. )"); -ap.addOptionHelp("--show-linearization", "copy-attachments", "show linearization hint tables", R"(Check and display all data in the linearization hint tables. +ap.addOptionHelp("--show-linearization", "inspection", "show linearization hint tables", R"(Check and display all data in the linearization hint tables. )"); -ap.addOptionHelp("--show-xref", "copy-attachments", "show cross reference data", R"(Show the contents of the cross-reference table or stream (object +} +static void add_help_7(QPDFArgParser& ap) +{ +ap.addOptionHelp("--show-xref", "inspection", "show cross reference data", R"(Show the contents of the cross-reference table or stream (object locations in the file) in a human-readable form. This is especially useful for files with cross-reference streams, which are stored in a binary format. )"); -} -static void add_help_7(QPDFArgParser& ap) -{ -ap.addOptionHelp("--show-object", "copy-attachments", "show contents of an object", R"(--show-object=trailer|obj[,gen] +ap.addOptionHelp("--show-object", "inspection", "show contents of an object", R"(--show-object=trailer|obj[,gen] Show the contents of the given object. This is especially useful for inspecting objects that are inside of object streams (also known as "compressed objects"). )"); -ap.addOptionHelp("--raw-stream-data", "copy-attachments", "show raw stream data", R"(When used with --show-object, if the object is a stream, write +ap.addOptionHelp("--raw-stream-data", "inspection", "show raw stream data", R"(When used with --show-object, if the object is a stream, write the raw (compressed) binary stream data to standard output instead of the object's contents. See also --filtered-stream-data. )"); -ap.addOptionHelp("--filtered-stream-data", "copy-attachments", "show filtered stream data", R"(When used with --show-object, if the object is a stream, write +ap.addOptionHelp("--filtered-stream-data", "inspection", "show filtered stream data", R"(When used with --show-object, if the object is a stream, write the filtered (uncompressed, potentially binary) stream data to standard output instead of the object's contents. See also --raw-stream-data. )"); -ap.addOptionHelp("--show-npages", "copy-attachments", "show number of pages", R"(Print the number of pages in the input file on a line by itself. +ap.addOptionHelp("--show-npages", "inspection", "show number of pages", R"(Print the number of pages in the input file on a line by itself. Useful for scripts. )"); -ap.addOptionHelp("--show-pages", "copy-attachments", "display page dictionary information", R"(Show the object and generation number for each page dictionary +ap.addOptionHelp("--show-pages", "inspection", "display page dictionary information", R"(Show the object and generation number for each page dictionary object and for each content stream associated with the page. )"); -ap.addOptionHelp("--with-images", "copy-attachments", "include image details with --show-pages", R"(When used with --show-pages, also shows the object and +ap.addOptionHelp("--with-images", "inspection", "include image details with --show-pages", R"(When used with --show-pages, also shows the object and generation numbers for the image objects on each page. )"); ap.addHelpTopic("json", "JSON output for PDF information", R"(Show information about the PDF file in JSON format. Please see the diff --git a/manual/cli.rst b/manual/cli.rst index 10c8829e..f8c1091f 100644 --- a/manual/cli.rst +++ b/manual/cli.rst @@ -2782,6 +2782,12 @@ Options in this section are valid between PDF Inspection -------------- +.. help-topic inspection: inspect PDF files + + These options provide tools for inspecting PDF files. When any of + the options in this section are specified, no output file should be + given. + These options provide tools for inspecting PDF files. When any of the options in this section are specified, no output file should be given. |