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 | 2 | generate_auto_job b70f64314f1ae1f100fa6a11975dee5f7669038e2a619b6c9da1e5230db1dd1b |
| 3 | 3 | job.yml 8177cadf41096efdc174f04daadfe5d98c592ad44ad10cb96537521fd79a801a |
| 4 | 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 | 6 | libqpdf/qpdf/auto_job_init.hh 465bf46769559ceb77110d1b9d3293ba9b3595850b49848c31aeabd10aadb4ad |
| 7 | 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 | 700 | duplicate attachment keys. This affects the key only, not the |
| 701 | 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 | 709 | 0: the file is encrypted |
| 706 | 710 | 1: not used |
| ... | ... | @@ -709,64 +713,64 @@ ap.addOptionHelp("--is-encrypted", "copy-attachments", "silently test whether a |
| 709 | 713 | This can be used with password-protected files even if you don't |
| 710 | 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 | 718 | 0: a password, other than as supplied, is required |
| 715 | 719 | 1: not used |
| 716 | 720 | 2: the file is not encrypted |
| 717 | 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 | 724 | aspects of the file, and write information about the file to |
| 721 | 725 | standard output. Note that qpdf does not perform any validation |
| 722 | 726 | of the actual PDF page content or semantic correctness of the |
| 723 | 727 | PDF file. It merely checks that the PDF file is syntactically |
| 724 | 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 | 731 | user password if the owner password is given and the file was |
| 728 | 732 | encrypted using older encryption formats that allow user |
| 729 | 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 | 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 | 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 | 747 | locations in the file) in a human-readable form. This is |
| 741 | 748 | especially useful for files with cross-reference streams, which |
| 742 | 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 | 753 | Show the contents of the given object. This is especially useful |
| 750 | 754 | for inspecting objects that are inside of object streams (also |
| 751 | 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 | 758 | the raw (compressed) binary stream data to standard output |
| 755 | 759 | instead of the object's contents. See also |
| 756 | 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 | 763 | the filtered (uncompressed, potentially binary) stream data to |
| 760 | 764 | standard output instead of the object's contents. See also |
| 761 | 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 | 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 | 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 | 774 | generation numbers for the image objects on each page. |
| 771 | 775 | )"); |
| 772 | 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 | 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 | 2791 | These options provide tools for inspecting PDF files. When any of the |
| 2786 | 2792 | options in this section are specified, no output file should be given. |
| 2787 | 2793 | ... | ... |