Commit ec85e56c3f95179b484baea5a5f796907d443694
1 parent
09e3b86f
Add missing help topic for inspection
Showing
3 changed files
with
29 additions
and
19 deletions
job.sums
| @@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
| 2 | generate_auto_job b70f64314f1ae1f100fa6a11975dee5f7669038e2a619b6c9da1e5230db1dd1b | 2 | generate_auto_job b70f64314f1ae1f100fa6a11975dee5f7669038e2a619b6c9da1e5230db1dd1b |
| 3 | job.yml 8177cadf41096efdc174f04daadfe5d98c592ad44ad10cb96537521fd79a801a | 3 | job.yml 8177cadf41096efdc174f04daadfe5d98c592ad44ad10cb96537521fd79a801a |
| 4 | libqpdf/qpdf/auto_job_decl.hh 97395ecbe590b23ae04d6cce2080dbd0e998917ff5eeaa5c6aafa91041d3cd6a | 4 | libqpdf/qpdf/auto_job_decl.hh 97395ecbe590b23ae04d6cce2080dbd0e998917ff5eeaa5c6aafa91041d3cd6a |
| 5 | -libqpdf/qpdf/auto_job_help.hh 9f4bd3e42510446a714771143e6a1db599a614818329d6c7126bb9fbcccd1f36 | 5 | +libqpdf/qpdf/auto_job_help.hh 3a56e34d54dd3a7ea9e248d0fbc9ed6923c30f3c4bb455e2f0894b2f7fb14c72 |
| 6 | libqpdf/qpdf/auto_job_init.hh 465bf46769559ceb77110d1b9d3293ba9b3595850b49848c31aeabd10aadb4ad | 6 | libqpdf/qpdf/auto_job_init.hh 465bf46769559ceb77110d1b9d3293ba9b3595850b49848c31aeabd10aadb4ad |
| 7 | manual/_ext/qpdf.py 855fe12de5af7a10bb24be6ecc4d5dff4c84ac58cf388a13be6bbb394346a67d | 7 | manual/_ext/qpdf.py 855fe12de5af7a10bb24be6ecc4d5dff4c84ac58cf388a13be6bbb394346a67d |
| 8 | -manual/cli.rst a1d5a72677eed46cfc91dba7cde8163107594adecb7f7362f0d402dea59833bd | 8 | +manual/cli.rst ce761433f0f84c379d9509c9fc4cb8ed08556ecf8f2fe22bb4a6146f3041439d |
libqpdf/qpdf/auto_job_help.hh
| @@ -700,7 +700,11 @@ Prepend a prefix to each key; may be needed if there are | @@ -700,7 +700,11 @@ Prepend a prefix to each key; may be needed if there are | ||
| 700 | duplicate attachment keys. This affects the key only, not the | 700 | duplicate attachment keys. This affects the key only, not the |
| 701 | file name. | 701 | file name. |
| 702 | )"); | 702 | )"); |
| 703 | -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: | 703 | +ap.addHelpTopic("inspection", "inspect PDF files", R"(These options provide tools for inspecting PDF files. When any of |
| 704 | +the options in this section are specified, no output file should be | ||
| 705 | +given. | ||
| 706 | +)"); | ||
| 707 | +ap.addOptionHelp("--is-encrypted", "inspection", "silently test whether a file is encrypted", R"(Silently exit with a code indicating the file's encryption status: | ||
| 704 | 708 | ||
| 705 | 0: the file is encrypted | 709 | 0: the file is encrypted |
| 706 | 1: not used | 710 | 1: not used |
| @@ -709,64 +713,64 @@ ap.addOptionHelp("--is-encrypted", "copy-attachments", "silently test whether a | @@ -709,64 +713,64 @@ ap.addOptionHelp("--is-encrypted", "copy-attachments", "silently test whether a | ||
| 709 | This can be used with password-protected files even if you don't | 713 | This can be used with password-protected files even if you don't |
| 710 | know the password. | 714 | know the password. |
| 711 | )"); | 715 | )"); |
| 712 | -ap.addOptionHelp("--requires-password", "copy-attachments", "silently test a file's password", R"(Silently exit with a code indicating the file's password status: | 716 | +ap.addOptionHelp("--requires-password", "inspection", "silently test a file's password", R"(Silently exit with a code indicating the file's password status: |
| 713 | 717 | ||
| 714 | 0: a password, other than as supplied, is required | 718 | 0: a password, other than as supplied, is required |
| 715 | 1: not used | 719 | 1: not used |
| 716 | 2: the file is not encrypted | 720 | 2: the file is not encrypted |
| 717 | 3: the file is encrypted, and correct password (if any) has been supplied | 721 | 3: the file is encrypted, and correct password (if any) has been supplied |
| 718 | )"); | 722 | )"); |
| 719 | -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 | 723 | +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 |
| 720 | aspects of the file, and write information about the file to | 724 | aspects of the file, and write information about the file to |
| 721 | standard output. Note that qpdf does not perform any validation | 725 | standard output. Note that qpdf does not perform any validation |
| 722 | of the actual PDF page content or semantic correctness of the | 726 | of the actual PDF page content or semantic correctness of the |
| 723 | PDF file. It merely checks that the PDF file is syntactically | 727 | PDF file. It merely checks that the PDF file is syntactically |
| 724 | valid. See also qpdf --help=exit-status. | 728 | valid. See also qpdf --help=exit-status. |
| 725 | )"); | 729 | )"); |
| 726 | -ap.addOptionHelp("--show-encryption", "copy-attachments", "information about encrypted files", R"(Show document encryption parameters. Also show the document's | 730 | +ap.addOptionHelp("--show-encryption", "inspection", "information about encrypted files", R"(Show document encryption parameters. Also show the document's |
| 727 | user password if the owner password is given and the file was | 731 | user password if the owner password is given and the file was |
| 728 | encrypted using older encryption formats that allow user | 732 | encrypted using older encryption formats that allow user |
| 729 | password recovery. | 733 | password recovery. |
| 730 | )"); | 734 | )"); |
| 731 | -ap.addOptionHelp("--show-encryption-key", "copy-attachments", "show key with --show-encryption", R"(When used with --show-encryption, causes the underlying | 735 | +ap.addOptionHelp("--show-encryption-key", "inspection", "show key with --show-encryption", R"(When used with --show-encryption, causes the underlying |
| 732 | encryption key to be displayed. | 736 | encryption key to be displayed. |
| 733 | )"); | 737 | )"); |
| 734 | -ap.addOptionHelp("--check-linearization", "copy-attachments", "check linearization tables", R"(Check to see whether a file is linearized and, if so, whether | 738 | +ap.addOptionHelp("--check-linearization", "inspection", "check linearization tables", R"(Check to see whether a file is linearized and, if so, whether |
| 735 | the linearization hint tables are correct. | 739 | the linearization hint tables are correct. |
| 736 | )"); | 740 | )"); |
| 737 | -ap.addOptionHelp("--show-linearization", "copy-attachments", "show linearization hint tables", R"(Check and display all data in the linearization hint tables. | 741 | +ap.addOptionHelp("--show-linearization", "inspection", "show linearization hint tables", R"(Check and display all data in the linearization hint tables. |
| 738 | )"); | 742 | )"); |
| 739 | -ap.addOptionHelp("--show-xref", "copy-attachments", "show cross reference data", R"(Show the contents of the cross-reference table or stream (object | 743 | +} |
| 744 | +static void add_help_7(QPDFArgParser& ap) | ||
| 745 | +{ | ||
| 746 | +ap.addOptionHelp("--show-xref", "inspection", "show cross reference data", R"(Show the contents of the cross-reference table or stream (object | ||
| 740 | locations in the file) in a human-readable form. This is | 747 | locations in the file) in a human-readable form. This is |
| 741 | especially useful for files with cross-reference streams, which | 748 | especially useful for files with cross-reference streams, which |
| 742 | are stored in a binary format. | 749 | are stored in a binary format. |
| 743 | )"); | 750 | )"); |
| 744 | -} | ||
| 745 | -static void add_help_7(QPDFArgParser& ap) | ||
| 746 | -{ | ||
| 747 | -ap.addOptionHelp("--show-object", "copy-attachments", "show contents of an object", R"(--show-object=trailer|obj[,gen] | 751 | +ap.addOptionHelp("--show-object", "inspection", "show contents of an object", R"(--show-object=trailer|obj[,gen] |
| 748 | 752 | ||
| 749 | Show the contents of the given object. This is especially useful | 753 | Show the contents of the given object. This is especially useful |
| 750 | for inspecting objects that are inside of object streams (also | 754 | for inspecting objects that are inside of object streams (also |
| 751 | known as "compressed objects"). | 755 | known as "compressed objects"). |
| 752 | )"); | 756 | )"); |
| 753 | -ap.addOptionHelp("--raw-stream-data", "copy-attachments", "show raw stream data", R"(When used with --show-object, if the object is a stream, write | 757 | +ap.addOptionHelp("--raw-stream-data", "inspection", "show raw stream data", R"(When used with --show-object, if the object is a stream, write |
| 754 | the raw (compressed) binary stream data to standard output | 758 | the raw (compressed) binary stream data to standard output |
| 755 | instead of the object's contents. See also | 759 | instead of the object's contents. See also |
| 756 | --filtered-stream-data. | 760 | --filtered-stream-data. |
| 757 | )"); | 761 | )"); |
| 758 | -ap.addOptionHelp("--filtered-stream-data", "copy-attachments", "show filtered stream data", R"(When used with --show-object, if the object is a stream, write | 762 | +ap.addOptionHelp("--filtered-stream-data", "inspection", "show filtered stream data", R"(When used with --show-object, if the object is a stream, write |
| 759 | the filtered (uncompressed, potentially binary) stream data to | 763 | the filtered (uncompressed, potentially binary) stream data to |
| 760 | standard output instead of the object's contents. See also | 764 | standard output instead of the object's contents. See also |
| 761 | --raw-stream-data. | 765 | --raw-stream-data. |
| 762 | )"); | 766 | )"); |
| 763 | -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. | 767 | +ap.addOptionHelp("--show-npages", "inspection", "show number of pages", R"(Print the number of pages in the input file on a line by itself. |
| 764 | Useful for scripts. | 768 | Useful for scripts. |
| 765 | )"); | 769 | )"); |
| 766 | -ap.addOptionHelp("--show-pages", "copy-attachments", "display page dictionary information", R"(Show the object and generation number for each page dictionary | 770 | +ap.addOptionHelp("--show-pages", "inspection", "display page dictionary information", R"(Show the object and generation number for each page dictionary |
| 767 | object and for each content stream associated with the page. | 771 | object and for each content stream associated with the page. |
| 768 | )"); | 772 | )"); |
| 769 | -ap.addOptionHelp("--with-images", "copy-attachments", "include image details with --show-pages", R"(When used with --show-pages, also shows the object and | 773 | +ap.addOptionHelp("--with-images", "inspection", "include image details with --show-pages", R"(When used with --show-pages, also shows the object and |
| 770 | generation numbers for the image objects on each page. | 774 | generation numbers for the image objects on each page. |
| 771 | )"); | 775 | )"); |
| 772 | ap.addHelpTopic("json", "JSON output for PDF information", R"(Show information about the PDF file in JSON format. Please see the | 776 | ap.addHelpTopic("json", "JSON output for PDF information", R"(Show information about the PDF file in JSON format. Please see the |
manual/cli.rst
| @@ -2782,6 +2782,12 @@ Options in this section are valid between | @@ -2782,6 +2782,12 @@ Options in this section are valid between | ||
| 2782 | PDF Inspection | 2782 | PDF Inspection |
| 2783 | -------------- | 2783 | -------------- |
| 2784 | 2784 | ||
| 2785 | +.. help-topic inspection: inspect PDF files | ||
| 2786 | + | ||
| 2787 | + These options provide tools for inspecting PDF files. When any of | ||
| 2788 | + the options in this section are specified, no output file should be | ||
| 2789 | + given. | ||
| 2790 | + | ||
| 2785 | These options provide tools for inspecting PDF files. When any of the | 2791 | These options provide tools for inspecting PDF files. When any of the |
| 2786 | options in this section are specified, no output file should be given. | 2792 | options in this section are specified, no output file should be given. |
| 2787 | 2793 |