Commit 7eeaf58bb70ff9ce85d9d0580c5a2abcab8c6832

Authored by Jay Berkenbilt
1 parent 7097f290

More doc tweaks

job.sums
@@ -8,8 +8,8 @@ include/qpdf/auto_job_c_pages.hh 931840b329a36ca0e41401190e04537b47f2867671a6643 @@ -8,8 +8,8 @@ include/qpdf/auto_job_c_pages.hh 931840b329a36ca0e41401190e04537b47f2867671a6643
8 include/qpdf/auto_job_c_uo.hh 0585b7de459fa479d9e51a45fa92de0ff6dee748efc9ec1cedd0dde6cee1ad50 8 include/qpdf/auto_job_c_uo.hh 0585b7de459fa479d9e51a45fa92de0ff6dee748efc9ec1cedd0dde6cee1ad50
9 job.yml 1590fd16fd17ed40db9aa56b6713c844cfd61b3a6d0441a3ccd122b7371c68e9 9 job.yml 1590fd16fd17ed40db9aa56b6713c844cfd61b3a6d0441a3ccd122b7371c68e9
10 libqpdf/qpdf/auto_job_decl.hh 9f79396ec459f191be4c5fe34cf88c265cf47355a1a945fa39169d1c94cf04f6 10 libqpdf/qpdf/auto_job_decl.hh 9f79396ec459f191be4c5fe34cf88c265cf47355a1a945fa39169d1c94cf04f6
11 -libqpdf/qpdf/auto_job_help.hh 7155be7c3212afb9d5033dfacd3456768931bb6e837a2079d2332cd5bdafa087 11 +libqpdf/qpdf/auto_job_help.hh 23c79f1d2c02bda28f64aace17f69487205c797e7ae2234892cbbabab49d6d47
12 libqpdf/qpdf/auto_job_init.hh 3b6323189480a7d782563c9d2b5bc29b8dcd19c6dcc89840b207e38cb503d3f1 12 libqpdf/qpdf/auto_job_init.hh 3b6323189480a7d782563c9d2b5bc29b8dcd19c6dcc89840b207e38cb503d3f1
13 libqpdf/qpdf/auto_job_schema.hh 1c3b4b5488270f8d200ed345573e3a241f15baff6fb7e97ec3d044103b2546d9 13 libqpdf/qpdf/auto_job_schema.hh 1c3b4b5488270f8d200ed345573e3a241f15baff6fb7e97ec3d044103b2546d9
14 manual/_ext/qpdf.py e9ac9d6c70642a3d29281ee5ad92ae2422dee8be9306fb8a0bc9dba0ed5e28f3 14 manual/_ext/qpdf.py e9ac9d6c70642a3d29281ee5ad92ae2422dee8be9306fb8a0bc9dba0ed5e28f3
15 -manual/cli.rst 5fd018a6b34cd1b42a278f7b9afef709b72f082a65a563e8d2d3e10ce8ebe31a 15 +manual/cli.rst 79140e023faa0cb77afe0b1dc512dd120ee5617f4db82f842596e4f239f93882
libqpdf/qpdf/auto_job_help.hh
@@ -102,7 +102,7 @@ ap.addOptionHelp("--allow-weak-crypto", "general", "allow insecure cryptographic @@ -102,7 +102,7 @@ ap.addOptionHelp("--allow-weak-crypto", "general", "allow insecure cryptographic
102 option is necessary to create 40-bit files or 128-bit files that 102 option is necessary to create 40-bit files or 128-bit files that
103 use RC4 encryption. 103 use RC4 encryption.
104 )"); 104 )");
105 -ap.addOptionHelp("--keep-files-open", "general", "manage keeping multiple files open", R"(--keep-files-open=[yn] 105 +ap.addOptionHelp("--keep-files-open", "general", "manage keeping multiple files open", R"(--keep-files-open=[y|n]
106 106
107 When qpdf needs to work with many files, as when merging large 107 When qpdf needs to work with many files, as when merging large
108 numbers of files, explicitly indicate whether files should be 108 numbers of files, explicitly indicate whether files should be
@@ -175,7 +175,7 @@ had in the original file. @@ -175,7 +175,7 @@ had in the original file.
175 } 175 }
176 static void add_help_3(QPDFArgParser& ap) 176 static void add_help_3(QPDFArgParser& ap)
177 { 177 {
178 -ap.addOptionHelp("--compress-streams", "transformation", "compress uncompressed streams", R"(--compress-streams=[yn] 178 +ap.addOptionHelp("--compress-streams", "transformation", "compress uncompressed streams", R"(--compress-streams=[y|n]
179 179
180 Setting --compress-streams=n prevents qpdf from compressing 180 Setting --compress-streams=n prevents qpdf from compressing
181 uncompressed streams. This can be useful if you are leaving some 181 uncompressed streams. This can be useful if you are leaving some
@@ -220,7 +220,7 @@ gzip), which is the default compression for most PDF files. @@ -220,7 +220,7 @@ gzip), which is the default compression for most PDF files.
220 You need --recompress-flate with this option if you want to 220 You need --recompress-flate with this option if you want to
221 change already compressed streams. 221 change already compressed streams.
222 )"); 222 )");
223 -ap.addOptionHelp("--normalize-content", "transformation", "fix newlines in content streams", R"(--normalize-content=[yn] 223 +ap.addOptionHelp("--normalize-content", "transformation", "fix newlines in content streams", R"(--normalize-content=[y|n]
224 224
225 Normalize newlines to UNIX-style newlines in PDF content 225 Normalize newlines to UNIX-style newlines in PDF content
226 streams, which is useful for viewing them in a programmer's text 226 streams, which is useful for viewing them in a programmer's text
@@ -402,24 +402,24 @@ restrictions that differ from what you selected. This is probably @@ -402,24 +402,24 @@ restrictions that differ from what you selected. This is probably
402 not a bug in qpdf. 402 not a bug in qpdf.
403 403
404 Options for 40-bit only: 404 Options for 40-bit only:
405 - --annotate=[yn] restrict comments, filling forms, and signing  
406 - --extract=[yn] restrict text/graphic extraction  
407 - --modify=[yn] restrict document modification  
408 - --print=[yn] restrict printing 405 + --annotate=[y|n] restrict comments, filling forms, and signing
  406 + --extract=[y|n] restrict text/graphic extraction
  407 + --modify=[y|n] restrict document modification
  408 + --print=[y|n] restrict printing
409 409
410 Options for 128-bit or 256-bit: 410 Options for 128-bit or 256-bit:
411 - --accessibility=[yn] restrict accessibility (usually ignored)  
412 - --annotate=[yn] restrict commenting/filling form fields  
413 - --assemble=[yn] restrict document assembly  
414 - --extract=[yn] restrict text/graphic extraction  
415 - --form=[yn] restrict filling form fields  
416 - --modify-other=[yn] restrict other modifications 411 + --accessibility=[y|n] restrict accessibility (usually ignored)
  412 + --annotate=[y|n] restrict commenting/filling form fields
  413 + --assemble=[y|n] restrict document assembly
  414 + --extract=[y|n] restrict text/graphic extraction
  415 + --form=[y|n] restrict filling form fields
  416 + --modify-other=[y|n] restrict other modifications
417 --modify=modify-opt control modify access by level 417 --modify=modify-opt control modify access by level
418 --print=print-opt control printing access 418 --print=print-opt control printing access
419 --cleartext-metadata prevent encryption of metadata 419 --cleartext-metadata prevent encryption of metadata
420 420
421 For 128-bit only: 421 For 128-bit only:
422 - --use-aes=[yn] indicates whether to use AES encryption 422 + --use-aes=[y|n] indicates whether to use AES encryption
423 --force-V4 forces use of V=4 encryption handler 423 --force-V4 forces use of V=4 encryption handler
424 424
425 For 256-bit only: 425 For 256-bit only:
@@ -438,26 +438,26 @@ Values for modify-opt: @@ -438,26 +438,26 @@ Values for modify-opt:
438 annotate form + commenting and modifying forms 438 annotate form + commenting and modifying forms
439 all allow full document modification 439 all allow full document modification
440 )"); 440 )");
441 -ap.addOptionHelp("--accessibility", "encryption", "restrict document accessibility", R"(--accessibility=[yn] 441 +ap.addOptionHelp("--accessibility", "encryption", "restrict document accessibility", R"(--accessibility=[y|n]
442 442
443 This option is ignored except with very old encryption formats. 443 This option is ignored except with very old encryption formats.
444 The current PDF specification does not allow restriction of 444 The current PDF specification does not allow restriction of
445 document accessibility. This option is not available with 40-bit 445 document accessibility. This option is not available with 40-bit
446 encryption. 446 encryption.
447 )"); 447 )");
448 -ap.addOptionHelp("--annotate", "encryption", "restrict document annotation", R"(--annotate=[yn] 448 +ap.addOptionHelp("--annotate", "encryption", "restrict document annotation", R"(--annotate=[y|n]
449 449
450 Enable/disable modifying annotations including making comments 450 Enable/disable modifying annotations including making comments
451 and filling in form fields. For 128-bit and 256-bit encryption, 451 and filling in form fields. For 128-bit and 256-bit encryption,
452 this also enables editing, creating, and deleting form fields 452 this also enables editing, creating, and deleting form fields
453 unless --modify-other=n or --modify=none is also specified. 453 unless --modify-other=n or --modify=none is also specified.
454 )"); 454 )");
455 -ap.addOptionHelp("--assemble", "encryption", "restrict document assembly", R"(--assemble=[yn] 455 +ap.addOptionHelp("--assemble", "encryption", "restrict document assembly", R"(--assemble=[y|n]
456 456
457 Enable/disable document assembly (rotation and reordering of 457 Enable/disable document assembly (rotation and reordering of
458 pages). This option is not available with 40-bit encryption. 458 pages). This option is not available with 40-bit encryption.
459 )"); 459 )");
460 -ap.addOptionHelp("--extract", "encryption", "restrict text/graphic extraction", R"(--extract=[yn] 460 +ap.addOptionHelp("--extract", "encryption", "restrict text/graphic extraction", R"(--extract=[y|n]
461 461
462 Enable/disable text/graphic extraction for purposes other than 462 Enable/disable text/graphic extraction for purposes other than
463 accessibility. 463 accessibility.
@@ -465,13 +465,13 @@ accessibility. @@ -465,13 +465,13 @@ accessibility.
465 } 465 }
466 static void add_help_5(QPDFArgParser& ap) 466 static void add_help_5(QPDFArgParser& ap)
467 { 467 {
468 -ap.addOptionHelp("--form", "encryption", "restrict form filling", R"(--form=[yn] 468 +ap.addOptionHelp("--form", "encryption", "restrict form filling", R"(--form=[y|n]
469 469
470 Enable/disable whether filling form fields is allowed even if 470 Enable/disable whether filling form fields is allowed even if
471 modification of annotations is disabled. This option is not 471 modification of annotations is disabled. This option is not
472 available with 40-bit encryption. 472 available with 40-bit encryption.
473 )"); 473 )");
474 -ap.addOptionHelp("--modify-other", "encryption", "restrict other modifications", R"(--modify-other=[yn] 474 +ap.addOptionHelp("--modify-other", "encryption", "restrict other modifications", R"(--modify-other=[y|n]
475 475
476 Enable/disable modifications not controlled by --assemble, 476 Enable/disable modifications not controlled by --assemble,
477 --annotate, or --form. --modify-other=n is implied by any of the 477 --annotate, or --form. --modify-other=n is implied by any of the
@@ -509,7 +509,7 @@ ap.addOptionHelp("--cleartext-metadata", "encryption", "don't encrypt metadata", @@ -509,7 +509,7 @@ ap.addOptionHelp("--cleartext-metadata", "encryption", "don't encrypt metadata",
509 encrypting the rest of the document. This option is not 509 encrypting the rest of the document. This option is not
510 available with 40-bit encryption. 510 available with 40-bit encryption.
511 )"); 511 )");
512 -ap.addOptionHelp("--use-aes", "encryption", "use AES with 128-bit encryption", R"(--use-aes=[yn] 512 +ap.addOptionHelp("--use-aes", "encryption", "use AES with 128-bit encryption", R"(--use-aes=[y|n]
513 513
514 Enables/disables use of the more secure AES encryption with 514 Enables/disables use of the more secure AES encryption with
515 128-bit encryption. Specifying --use-aes=y forces the PDF 515 128-bit encryption. Specifying --use-aes=y forces the PDF
@@ -576,7 +576,7 @@ underlaid on the primary output. Overlaid pages are drawn on top of @@ -576,7 +576,7 @@ underlaid on the primary output. Overlaid pages are drawn on top of
576 the destination page and may obscure the page. Underlaid pages are 576 the destination page and may obscure the page. Underlaid pages are
577 drawn below the destination page. Usage: 577 drawn below the destination page. Usage:
578 578
579 -{--overlay | --underlay } file 579 +{--overlay|--underlay} file
580 [--password=password] 580 [--password=password]
581 [--to=page-range] 581 [--to=page-range]
582 [--from=[page-range]] 582 [--from=[page-range]]
manual/cli.rst
@@ -473,7 +473,7 @@ Related Options @@ -473,7 +473,7 @@ Related Options
473 files with weak cryptography when this flag is not given. See 473 files with weak cryptography when this flag is not given. See
474 :ref:`weak-crypto` for additional details. 474 :ref:`weak-crypto` for additional details.
475 475
476 -.. qpdf:option:: --keep-files-open=[yn] 476 +.. qpdf:option:: --keep-files-open=[y|n]
477 477
478 .. help: manage keeping multiple files open 478 .. help: manage keeping multiple files open
479 479
@@ -817,7 +817,7 @@ Related Options @@ -817,7 +817,7 @@ Related Options
817 default because it makes it easier to trace objects back to the 817 default because it makes it easier to trace objects back to the
818 original file. 818 original file.
819 819
820 -.. qpdf:option:: --compress-streams=[yn] 820 +.. qpdf:option:: --compress-streams=[y|n]
821 821
822 .. help: compress uncompressed streams 822 .. help: compress uncompressed streams
823 823
@@ -963,7 +963,7 @@ Related Options @@ -963,7 +963,7 @@ Related Options
963 :samp:`--object-streams=generate`. If you omit this option, qpdf 963 :samp:`--object-streams=generate`. If you omit this option, qpdf
964 defers to the compression library's default behavior. 964 defers to the compression library's default behavior.
965 965
966 -.. qpdf:option:: --normalize-content=[yn] 966 +.. qpdf:option:: --normalize-content=[y|n]
967 967
968 .. help: fix newlines in content streams 968 .. help: fix newlines in content streams
969 969
@@ -1703,24 +1703,24 @@ Encryption @@ -1703,24 +1703,24 @@ Encryption
1703 not a bug in qpdf. 1703 not a bug in qpdf.
1704 1704
1705 Options for 40-bit only: 1705 Options for 40-bit only:
1706 - --annotate=[yn] restrict comments, filling forms, and signing  
1707 - --extract=[yn] restrict text/graphic extraction  
1708 - --modify=[yn] restrict document modification  
1709 - --print=[yn] restrict printing 1706 + --annotate=[y|n] restrict comments, filling forms, and signing
  1707 + --extract=[y|n] restrict text/graphic extraction
  1708 + --modify=[y|n] restrict document modification
  1709 + --print=[y|n] restrict printing
1710 1710
1711 Options for 128-bit or 256-bit: 1711 Options for 128-bit or 256-bit:
1712 - --accessibility=[yn] restrict accessibility (usually ignored)  
1713 - --annotate=[yn] restrict commenting/filling form fields  
1714 - --assemble=[yn] restrict document assembly  
1715 - --extract=[yn] restrict text/graphic extraction  
1716 - --form=[yn] restrict filling form fields  
1717 - --modify-other=[yn] restrict other modifications 1712 + --accessibility=[y|n] restrict accessibility (usually ignored)
  1713 + --annotate=[y|n] restrict commenting/filling form fields
  1714 + --assemble=[y|n] restrict document assembly
  1715 + --extract=[y|n] restrict text/graphic extraction
  1716 + --form=[y|n] restrict filling form fields
  1717 + --modify-other=[y|n] restrict other modifications
1718 --modify=modify-opt control modify access by level 1718 --modify=modify-opt control modify access by level
1719 --print=print-opt control printing access 1719 --print=print-opt control printing access
1720 --cleartext-metadata prevent encryption of metadata 1720 --cleartext-metadata prevent encryption of metadata
1721 1721
1722 For 128-bit only: 1722 For 128-bit only:
1723 - --use-aes=[yn] indicates whether to use AES encryption 1723 + --use-aes=[y|n] indicates whether to use AES encryption
1724 --force-V4 forces use of V=4 encryption handler 1724 --force-V4 forces use of V=4 encryption handler
1725 1725
1726 For 256-bit only: 1726 For 256-bit only:
@@ -1792,38 +1792,38 @@ help for each option. @@ -1792,38 +1792,38 @@ help for each option.
1792 :widths: 30 70 1792 :widths: 30 70
1793 :header-rows: 0 1793 :header-rows: 0
1794 1794
1795 - - - ``--annotate=[yn]`` 1795 + - - ``--annotate=[y|n]``
1796 - restrict comments, filling forms, and signing 1796 - restrict comments, filling forms, and signing
1797 1797
1798 - - - ``--extract=[yn]`` 1798 + - - ``--extract=[y|n]``
1799 - restrict text/graphic extraction 1799 - restrict text/graphic extraction
1800 1800
1801 - - - ``--modify=[yn]`` 1801 + - - ``--modify=[y|n]``
1802 - restrict document modification 1802 - restrict document modification
1803 1803
1804 - - - ``--print=[yn]`` 1804 + - - ``--print=[y|n]``
1805 - restrict printing 1805 - restrict printing
1806 1806
1807 .. list-table:: Options for 128-bit or 256-bit Encryption 1807 .. list-table:: Options for 128-bit or 256-bit Encryption
1808 :widths: 30 70 1808 :widths: 30 70
1809 :header-rows: 0 1809 :header-rows: 0
1810 1810
1811 - - - ``--accessibility=[yn]`` 1811 + - - ``--accessibility=[y|n]``
1812 - restrict accessibility (usually ignored) 1812 - restrict accessibility (usually ignored)
1813 1813
1814 - - - ``--annotate=[yn]`` 1814 + - - ``--annotate=[y|n]``
1815 - restrict commenting/filling form fields 1815 - restrict commenting/filling form fields
1816 1816
1817 - - - ``--assemble=[yn]`` 1817 + - - ``--assemble=[y|n]``
1818 - restrict document assembly 1818 - restrict document assembly
1819 1819
1820 - - - ``--extract=[yn]`` 1820 + - - ``--extract=[y|n]``
1821 - restrict text/graphic extraction 1821 - restrict text/graphic extraction
1822 1822
1823 - - - ``--form=[yn]`` 1823 + - - ``--form=[y|n]``
1824 - restrict filling form fields 1824 - restrict filling form fields
1825 1825
1826 - - - ``--modify-other=[yn]`` 1826 + - - ``--modify-other=[y|n]``
1827 - restrict other modifications 1827 - restrict other modifications
1828 1828
1829 - - ``--modify=modify-opt`` 1829 - - ``--modify=modify-opt``
@@ -1836,10 +1836,10 @@ help for each option. @@ -1836,10 +1836,10 @@ help for each option.
1836 - prevent encryption of metadata 1836 - prevent encryption of metadata
1837 1837
1838 .. list-table:: Options for 128-bit Encryption Only 1838 .. list-table:: Options for 128-bit Encryption Only
1839 - :widths: 30 70 1839 + :widths: 35 65
1840 :header-rows: 0 1840 :header-rows: 0
1841 1841
1842 - - - ``--use-aes=[yn]`` 1842 + - - ``--use-aes=[y|n]``
1843 - indicates whether to use AES encryption 1843 - indicates whether to use AES encryption
1844 1844
1845 - - ``--force-V4`` 1845 - - ``--force-V4``
@@ -1891,7 +1891,7 @@ help for each option. @@ -1891,7 +1891,7 @@ help for each option.
1891 Related Options 1891 Related Options
1892 ~~~~~~~~~~~~~~~ 1892 ~~~~~~~~~~~~~~~
1893 1893
1894 -.. qpdf:option:: --accessibility=[yn] 1894 +.. qpdf:option:: --accessibility=[y|n]
1895 1895
1896 .. help: restrict document accessibility 1896 .. help: restrict document accessibility
1897 1897
@@ -1910,7 +1910,7 @@ Related Options @@ -1910,7 +1910,7 @@ Related Options
1910 1910
1911 This option is not available with 40-bit encryption. 1911 This option is not available with 40-bit encryption.
1912 1912
1913 -.. qpdf:option:: --annotate=[yn] 1913 +.. qpdf:option:: --annotate=[y|n]
1914 1914
1915 .. help: restrict document annotation 1915 .. help: restrict document annotation
1916 1916
@@ -1925,7 +1925,7 @@ Related Options @@ -1925,7 +1925,7 @@ Related Options
1925 creating, and deleting form fields unless :samp:`--modify-other=n` 1925 creating, and deleting form fields unless :samp:`--modify-other=n`
1926 or :samp:`--modify=none` is also specified. 1926 or :samp:`--modify=none` is also specified.
1927 1927
1928 -.. qpdf:option:: --assemble=[yn] 1928 +.. qpdf:option:: --assemble=[y|n]
1929 1929
1930 .. help: restrict document assembly 1930 .. help: restrict document assembly
1931 1931
@@ -1937,7 +1937,7 @@ Related Options @@ -1937,7 +1937,7 @@ Related Options
1937 1937
1938 This option is not available with 40-bit encryption. 1938 This option is not available with 40-bit encryption.
1939 1939
1940 -.. qpdf:option:: --extract=[yn] 1940 +.. qpdf:option:: --extract=[y|n]
1941 1941
1942 .. help: restrict text/graphic extraction 1942 .. help: restrict text/graphic extraction
1943 1943
@@ -1947,7 +1947,7 @@ Related Options @@ -1947,7 +1947,7 @@ Related Options
1947 Enable/disable text/graphic extraction for purposes other than 1947 Enable/disable text/graphic extraction for purposes other than
1948 accessibility. The default is to be fully permissive. 1948 accessibility. The default is to be fully permissive.
1949 1949
1950 -.. qpdf:option:: --form=[yn] 1950 +.. qpdf:option:: --form=[y|n]
1951 1951
1952 .. help: restrict form filling 1952 .. help: restrict form filling
1953 1953
@@ -1961,7 +1961,7 @@ Related Options @@ -1961,7 +1961,7 @@ Related Options
1961 1961
1962 This option is not available with 40-bit encryption. 1962 This option is not available with 40-bit encryption.
1963 1963
1964 -.. qpdf:option:: --modify-other=[yn] 1964 +.. qpdf:option:: --modify-other=[y|n]
1965 1965
1966 .. help: restrict other modifications 1966 .. help: restrict other modifications
1967 1967
@@ -2094,7 +2094,7 @@ Related Options @@ -2094,7 +2094,7 @@ Related Options
2094 2094
2095 This option is not available with 40-bit encryption. 2095 This option is not available with 40-bit encryption.
2096 2096
2097 -.. qpdf:option:: --use-aes=[yn] 2097 +.. qpdf:option:: --use-aes=[y|n]
2098 2098
2099 .. help: use AES with 128-bit encryption 2099 .. help: use AES with 128-bit encryption
2100 2100
@@ -2434,7 +2434,7 @@ Overlay and Underlay @@ -2434,7 +2434,7 @@ Overlay and Underlay
2434 the destination page and may obscure the page. Underlaid pages are 2434 the destination page and may obscure the page. Underlaid pages are
2435 drawn below the destination page. Usage: 2435 drawn below the destination page. Usage:
2436 2436
2437 - {--overlay | --underlay } file 2437 + {--overlay|--underlay} file
2438 [--password=password] 2438 [--password=password]
2439 [--to=page-range] 2439 [--to=page-range]
2440 [--from=[page-range]] 2440 [--from=[page-range]]
@@ -2458,7 +2458,7 @@ as follows: @@ -2458,7 +2458,7 @@ as follows:
2458 2458
2459 :: 2459 ::
2460 2460
2461 - { --overlay | --underlay } file [options] -- 2461 + {--overlay|--underlay} file [options] --
2462 2462
2463 Overlay and underlay options are processed late, so they can be 2463 Overlay and underlay options are processed late, so they can be
2464 combined with other options like merging and will apply to the final 2464 combined with other options like merging and will apply to the final