Commit bf4d1078534f14776d777ae37a83736eb969cb7e

Authored by Jay Berkenbilt
1 parent b764ba95

Convert <option> to :samp: and clean up literal blocks

:option: is stronger and assumes a reference to a list of options.
Since we don't have that yet, just use :samp: for options. Inside
literal code blocks, there is no expansion, so just remove markup.
Showing 2 changed files with 455 additions and 456 deletions
... ... @@ -36,7 +36,6 @@ Make sure the information from &lt;book&gt; is in there
36 36 <xref> -- find #ref. in converted rst
37 37 Correct placement of comment: <!-- This section is referenced in QPDFObjectHandle.hh -->
38 38  
39   -<option> -> :samp: (allows {x})
40 39 <firstterm> -> just use literal
41 40 <replaceable> -> Make sure in :file: or :samp:, then use {}
42 41  
... ...
manual/index.rst
... ... @@ -131,7 +131,7 @@ contents of PDF files. If you are making deep changes to the library
131 131 that cause changes in the contents of the files that qpdf generates,
132 132 then you should enable the image comparison tests. Enable them by
133 133 running :command:`configure` with the
134   -@1@option@1@--enable-test-compare-images@2@option@2@ flag. If you enable
  134 +:samp:`--enable-test-compare-images` flag. If you enable
135 135 this, the following additional requirements are required by the test
136 136 suite. Note that in no case are these items required to use qpdf.
137 137  
... ... @@ -226,22 +226,22 @@ available crypto providers, and to use an external provider as the
226 226 default over the native one. This behavior can be changed with the
227 227 following flags to :command:`./configure`:
228 228  
229   -- @1@option@1@--enable-crypto-@1@replaceable@1@x@2@replaceable@2@@2@option@2@
  229 +- :samp:`--enable-crypto-@1@replaceable@1@x@2@replaceable@2@`
230 230 (where @1@replaceable@1@x@2@replaceable@2@ is a supported crypto
231 231 provider): enable the @1@replaceable@1@x@2@replaceable@2@ crypto
232 232 provider, requiring any external dependencies it needs
233 233  
234   -- @1@option@1@--disable-crypto-@1@replaceable@1@x@2@replaceable@2@@2@option@2@:
  234 +- :samp:`--disable-crypto-@1@replaceable@1@x@2@replaceable@2@`:
235 235 disable the @1@replaceable@1@x@2@replaceable@2@ provider, and do not
236 236 link against its dependencies even if they are available
237 237  
238   -- @1@option@1@--with-default-crypto=@1@replaceable@1@x@2@replaceable@2@@2@option@2@:
  238 +- :samp:`--with-default-crypto=@1@replaceable@1@x@2@replaceable@2@`:
239 239 make @1@replaceable@1@x@2@replaceable@2@ the default provider even if
240 240 a higher priority one is available
241 241  
242   -- @1@option@1@--disable-implicit-crypto@2@option@2@: only build crypto
  242 +- :samp:`--disable-implicit-crypto`: only build crypto
243 243 providers that are explicitly requested with an
244   - @1@option@1@--enable-crypto-@1@replaceable@1@x@2@replaceable@2@@2@option@2@
  244 + :samp:`--enable-crypto-@1@replaceable@1@x@2@replaceable@2@`
245 245 option
246 246  
247 247 For example, if you want to guarantee that the gnutls crypto provider is
... ... @@ -278,7 +278,7 @@ files you need to build.
278 278 Runtime Crypto Provider Selection
279 279 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
280 280  
281   -You can use the @1@option@1@--show-crypto@2@option@2@ option to
  281 +You can use the :samp:`--show-crypto` option to
282 282 :command:`qpdf` to get a list of available crypto
283 283 providers. The default provider is always listed first, and the rest are
284 284 listed in lexical order. Each crypto provider is listed on a line by
... ... @@ -395,7 +395,7 @@ some things you may want to keep in mind:
395 395 providers. Read `Build Support For Crypto
396 396 Providers <#ref.crypto.build>`__ for details.
397 397  
398   -- Passing @1@option@1@--enable-show-failed-test-output@2@option@2@ to
  398 +- Passing :samp:`--enable-show-failed-test-output` to
399 399 :command:`./configure` will cause any failed test
400 400 output to be written to the console. This can be very useful for
401 401 seeing test failures generated by autobuilders where you can't access
... ... @@ -408,7 +408,7 @@ some things you may want to keep in mind:
408 408 accidentally forgetting to regenerate automatic files after modifying
409 409 their sources. If your packaging environment automatically refreshes
410 410 automatic files, it can cause this check to fail. Suppress qpdf's
411   - checks by passing @1@option@1@--disable-check-autofiles@2@option@2@
  411 + checks by passing :samp:`--disable-check-autofiles`
412 412 to :command:`/.configure`. This is safe since qpdf's
413 413 :command:`autogen.sh` just runs autotools in the
414 414 normal way.
... ... @@ -440,41 +440,41 @@ When running qpdf, the basic invocation is as follows:
440 440  
441 441 ::
442 442  
443   - :command:`qpdf`@1@option@1@ [ @1@replaceable@1@options@2@replaceable@2@ ] { @1@replaceable@1@infilename@2@replaceable@2@ | @1@option@1@--empty@2@option@2@ } [ @1@replaceable@1@page_selection_options@2@replaceable@2@ ] @1@replaceable@1@outfilename@2@replaceable@2@@2@option@2@
  443 + qpdf [ options ] { infilename | --empty } outfilename
444 444  
445   -This converts PDF file @1@option@1@infilename@2@option@2@ to PDF file
446   -@1@option@1@outfilename@2@option@2@. The output file is functionally
  445 +This converts PDF file :samp:`infilename` to PDF file
  446 +:samp:`outfilename`. The output file is functionally
447 447 identical to the input file but may have been structurally reorganized.
448 448 Also, orphaned objects will be removed from the file. Many
449 449 transformations are available as controlled by the options below. In
450   -place of @1@option@1@infilename@2@option@2@, the parameter
451   -@1@option@1@--empty@2@option@2@ may be specified. This causes qpdf to
  450 +place of :samp:`infilename`, the parameter
  451 +:samp:`--empty` may be specified. This causes qpdf to
452 452 use a dummy input file that contains zero pages. The only normal use
453   -case for using @1@option@1@--empty@2@option@2@ would be if you were
  453 +case for using :samp:`--empty` would be if you were
454 454 going to add pages from another source, as discussed in `Page Selection
455 455 Options <#ref.page-selection>`__.
456 456  
457   -If @1@option@1@@filename@2@option@2@ appears as a word anywhere in the
  457 +If :samp:`@filename` appears as a word anywhere in the
458 458 command-line, it will be read line by line, and each line will be
459 459 treated as a command-line argument. Leading and trailing whitespace is
460 460 intentionally not removed from lines, which makes it possible to handle
461   -arguments that start or end with spaces. The @1@option@1@@-@2@option@2@
  461 +arguments that start or end with spaces. The :samp:`@-`
462 462 option allows arguments to be read from standard input. This allows qpdf
463 463 to be invoked with an arbitrary number of arbitrarily long arguments. It
464 464 is also very useful for avoiding having to pass passwords on the command
465   -line. Note that the @1@option@1@@filename@2@option@2@ can't appear in
  465 +line. Note that the :samp:`@filename` can't appear in
466 466 the middle of an argument, so constructs such as
467   -@1@option@1@--arg=@option@2@option@2@ will not work. You would have to
  467 +:samp:`--arg=@option` will not work. You would have to
468 468 include the argument and its options together in the arguments file.
469 469  
470   -@1@option@1@outfilename@2@option@2@ does not have to be seekable, even
471   -when generating linearized files. Specifying "@1@option@1@-@2@option@2@"
472   -as @1@option@1@outfilename@2@option@2@ means to write to standard
  470 +:samp:`outfilename` does not have to be seekable, even
  471 +when generating linearized files. Specifying ":samp:`-`"
  472 +as :samp:`outfilename` means to write to standard
473 473 output. If you want to overwrite the input file with the output, use the
474   -option @1@option@1@--replace-input@2@option@2@ and omit the output file
  474 +option :samp:`--replace-input` and omit the output file
475 475 name. You can't specify the same file as both the input and the output.
476 476 If you do this, qpdf will tell you about the
477   -@1@option@1@--replace-input@2@option@2@ option.
  477 +:samp:`--replace-input` option.
478 478  
479 479 Most options require an output file, but some testing or inspection
480 480 commands do not. These are specifically noted.
... ... @@ -489,7 +489,7 @@ follows:
489 489  
490 490 - ``0``: no errors or warnings were found. The file may still have
491 491 problems qpdf can't detect. If
492   - @1@option@1@--warning-exit-0@2@option@2@ was specified, exit status 0
  492 + :samp:`--warning-exit-0` was specified, exit status 0
493 493 is used even if there are warnings.
494 494  
495 495 - ``2``: errors were found. qpdf was not able to fully process the
... ... @@ -498,8 +498,8 @@ follows:
498 498 - ``3``: qpdf encountered problems that it was able to recover from. In
499 499 some cases, the resulting file may still be damaged. Note that qpdf
500 500 still exits with status ``3`` if it finds warnings even when
501   - @1@option@1@--no-warn@2@option@2@ is specified. With
502   - @1@option@1@--warning-exit-0@2@option@2@, warnings without errors
  501 + :samp:`--no-warn` is specified. With
  502 + :samp:`--warning-exit-0`, warnings without errors
503 503 exit with status 0 instead of 3.
504 504  
505 505 Note that :command:`qpdf` never exists with status ``1``.
... ... @@ -534,94 +534,94 @@ Basic Options
534 534 The following options are the most common ones and perform commonly
535 535 needed transformations.
536 536  
537   -@1@option@1@--help@2@option@2@
  537 +:samp:`--help`
538 538 Display command-line invocation help.
539 539  
540   -@1@option@1@--version@2@option@2@
  540 +:samp:`--version`
541 541 Display the current version of qpdf.
542 542  
543   -@1@option@1@--copyright@2@option@2@
  543 +:samp:`--copyright`
544 544 Show detailed copyright information.
545 545  
546   -@1@option@1@--show-crypto@2@option@2@
  546 +:samp:`--show-crypto`
547 547 Show a list of available crypto providers, each on a line by itself.
548 548 The default provider is always listed first. See `Crypto
549 549 Providers <#ref.crypto>`__ for more information about crypto
550 550 providers.
551 551  
552   -@1@option@1@--completion-bash@2@option@2@
  552 +:samp:`--completion-bash`
553 553 Output a completion command you can eval to enable shell completion
554 554 from bash.
555 555  
556   -@1@option@1@--completion-zsh@2@option@2@
  556 +:samp:`--completion-zsh`
557 557 Output a completion command you can eval to enable shell completion
558 558 from zsh.
559 559  
560   -@1@option@1@--password=@1@replaceable@1@password@2@replaceable@2@@2@option@2@
  560 +:samp:`--password=@1@replaceable@1@password@2@replaceable@2@`
561 561 Specifies a password for accessing encrypted files. To read the
562 562 password from a file or standard input, you can use
563   - @1@option@1@--password-file@2@option@2@, added in qpdf 10.2. Note
564   - that you can also use @1@option@1@@filename@2@option@2@ or
565   - @1@option@1@@-@2@option@2@ as described above to put the password in
  563 + :samp:`--password-file`, added in qpdf 10.2. Note
  564 + that you can also use :samp:`@filename` or
  565 + :samp:`@-` as described above to put the password in
566 566 a file or pass it via standard input, but you would do so by
567 567 specifying the entire
568   - @1@option@1@--password=@1@replaceable@1@password@2@replaceable@2@@2@option@2@
  568 + :samp:`--password=@1@replaceable@1@password@2@replaceable@2@`
569 569 option in the file. Syntax such as
570   - @1@option@1@--password=@filename@2@option@2@ won't work since
571   - @1@option@1@@filename@2@option@2@ is not recognized in the middle of
  570 + :samp:`--password=@filename` won't work since
  571 + :samp:`@filename` is not recognized in the middle of
572 572 an argument.
573 573  
574   -@1@option@1@--password-file=@1@replaceable@1@filename@2@replaceable@2@@2@option@2@
  574 +:samp:`--password-file=@1@replaceable@1@filename@2@replaceable@2@`
575 575 Reads the first line from the specified file and uses it as the
576 576 password for accessing encrypted files.
577   - @1@option@1@@1@replaceable@1@filename@2@replaceable@2@@2@option@2@
  577 + :samp:`@1@replaceable@1@filename@2@replaceable@2@`
578 578 may be ``-`` to read the password from standard input. Note that, in
579 579 this case, the password is echoed and there is no prompt, so use with
580 580 caution.
581 581  
582   -@1@option@1@--is-encrypted@2@option@2@
  582 +:samp:`--is-encrypted`
583 583 Silently exit with status 0 if the file is encrypted or status 2 if
584 584 the file is not encrypted. This is useful for shell scripts. Other
585 585 options are ignored if this is given. This option is mutually
586   - exclusive with @1@option@1@--requires-password@2@option@2@. Both this
587   - option and @1@option@1@--requires-password@2@option@2@ exit with
  586 + exclusive with :samp:`--requires-password`. Both this
  587 + option and :samp:`--requires-password` exit with
588 588 status 2 for non-encrypted files.
589 589  
590   -@1@option@1@--requires-password@2@option@2@
  590 +:samp:`--requires-password`
591 591 Silently exit with status 0 if a password (other than as supplied) is
592 592 required. Exit with status 2 if the file is not encrypted. Exit with
593 593 status 3 if the file is encrypted but requires no password or the
594 594 correct password has been supplied. This is useful for shell scripts.
595 595 Note that any supplied password is used when opening the file. When
596   - used with a @1@option@1@--password@2@option@2@ option, this option
  596 + used with a :samp:`--password` option, this option
597 597 can be used to check the correctness of the password. In that case,
598 598 an exit status of 3 means the file works with the supplied password.
599 599 This option is mutually exclusive with
600   - @1@option@1@--is-encrypted@2@option@2@. Both this option and
601   - @1@option@1@--is-encrypted@2@option@2@ exit with status 2 for
  600 + :samp:`--is-encrypted`. Both this option and
  601 + :samp:`--is-encrypted` exit with status 2 for
602 602 non-encrypted files.
603 603  
604   -@1@option@1@--verbose@2@option@2@
  604 +:samp:`--verbose`
605 605 Increase verbosity of output. For now, this just prints some
606 606 indication of any file that it creates.
607 607  
608   -@1@option@1@--progress@2@option@2@
  608 +:samp:`--progress`
609 609 Indicate progress while writing files.
610 610  
611   -@1@option@1@--no-warn@2@option@2@
  611 +:samp:`--no-warn`
612 612 Suppress writing of warnings to stderr. If warnings were detected and
613 613 suppressed, :command:`qpdf` will still exit with exit
614   - code 3. See also @1@option@1@--warning-exit-0@2@option@2@.
  614 + code 3. See also :samp:`--warning-exit-0`.
615 615  
616   -@1@option@1@--warning-exit-0@2@option@2@
  616 +:samp:`--warning-exit-0`
617 617 If warnings are found but no errors, exit with exit code 0 instead 3.
618   - When combined with @1@option@1@--no-warn@2@option@2@, the effect is
  618 + When combined with :samp:`--no-warn`, the effect is
619 619 for :command:`qpdf` to completely ignore warnings.
620 620  
621   -@1@option@1@--linearize@2@option@2@
  621 +:samp:`--linearize`
622 622 Causes generation of a linearized (web-optimized) output file.
623 623  
624   -@1@option@1@--replace-input@2@option@2@
  624 +:samp:`--replace-input`
625 625 If specified, the output file name should be omitted. This option
626 626 tells qpdf to replace the input file with the output. It does this by
627 627 writing to
... ... @@ -630,17 +630,17 @@ needed transformations.
630 630 If there were any warnings, the original input is saved as
631 631 :file:`@1@replaceable@1@infilename@2@replaceable@2@.~qpdf-orig`.
632 632  
633   -@1@option@1@--copy-encryption=file@2@option@2@
  633 +:samp:`--copy-encryption=file`
634 634 Encrypt the file using the same encryption parameters, including user
635 635 and owner password, as the specified file. Use
636   - @1@option@1@--encryption-file-password@2@option@2@ to specify a
  636 + :samp:`--encryption-file-password` to specify a
637 637 password if one is needed to open this file. Note that copying the
638 638 encryption parameters from a file also copies the first half of
639 639 ``/ID`` from the file since this is part of the encryption
640 640 parameters.
641 641  
642   -@1@option@1@--encryption-file-password=password@2@option@2@
643   - If the file specified with @1@option@1@--copy-encryption@2@option@2@
  642 +:samp:`--encryption-file-password=password`
  643 + If the file specified with :samp:`--copy-encryption`
644 644 requires a password, specify the password using this option. Note
645 645 that only one of the user or owner password is required. Both
646 646 passwords will be preserved since QPDF does not distinguish between
... ... @@ -648,30 +648,30 @@ needed transformations.
648 648 including the owner password, from a file even if you don't know the
649 649 file's owner password.
650 650  
651   -@1@option@1@--allow-weak-crypto@2@option@2@
  651 +:samp:`--allow-weak-crypto`
652 652 Starting with version 10.4, qpdf issues warnings when requested to
653 653 create files using RC4 encryption. This option suppresses those
654 654 warnings. In future versions of qpdf, qpdf will refuse to create
655 655 files with weak cryptography when this flag is not given. See `Weak
656 656 Cryptography <#ref.weak-crypto>`__ for additional details.
657 657  
658   -@1@option@1@--encrypt options --@2@option@2@
  658 +:samp:`--encrypt options --`
659 659 Causes generation an encrypted output file. Please see `Encryption
660 660 Options <#ref.encryption-options>`__ for details on how to specify
661 661 encryption parameters.
662 662  
663   -@1@option@1@--decrypt@2@option@2@
  663 +:samp:`--decrypt`
664 664 Removes any encryption on the file. A password must be supplied if
665 665 the file is password protected.
666 666  
667   -@1@option@1@--password-is-hex-key@2@option@2@
  667 +:samp:`--password-is-hex-key`
668 668 Overrides the usual computation/retrieval of the PDF file's
669 669 encryption key from user/owner password with an explicit
670 670 specification of the encryption key. When this option is specified,
671   - the argument to the @1@option@1@--password@2@option@2@ option is
  671 + the argument to the :samp:`--password` option is
672 672 interpreted as a hexadecimal-encoded key value. This only applies to
673 673 the password used to open the main input file. It does not apply to
674   - other files opened by @1@option@1@--pages@2@option@2@ or other
  674 + other files opened by :samp:`--pages` or other
675 675 options or to files being written.
676 676  
677 677 Most users will never have a need for this option, and no standard
... ... @@ -682,28 +682,28 @@ needed transformations.
682 682 Also, if a file is heavily damaged, it may be possible to derive the
683 683 encryption key and recover parts of the file using it directly. To
684 684 expose the encryption key used by an encrypted file that you can open
685   - normally, use the @1@option@1@--show-encryption-key@2@option@2@
  685 + normally, use the :samp:`--show-encryption-key`
686 686 option.
687 687  
688   -@1@option@1@--suppress-password-recovery@2@option@2@
  688 +:samp:`--suppress-password-recovery`
689 689 Ordinarily, qpdf attempts to automatically compensate for passwords
690 690 specified in the wrong character encoding. This option suppresses
691 691 that behavior. Under normal conditions, there are no reasons to use
692 692 this option. See `Unicode Passwords <#ref.unicode-passwords>`__ for a
693 693 discussion
694 694  
695   -@1@option@1@--password-mode=@1@replaceable@1@mode@2@replaceable@2@@2@option@2@
  695 +:samp:`--password-mode=@1@replaceable@1@mode@2@replaceable@2@`
696 696 This option can be used to fine-tune how qpdf interprets Unicode
697 697 (non-ASCII) password strings passed on the command line. With the
698   - exception of the @1@option@1@hex-bytes@2@option@2@ mode, these only
  698 + exception of the :samp:`hex-bytes` mode, these only
699 699 apply to passwords provided when encrypting files. The
700   - @1@option@1@hex-bytes@2@option@2@ mode also applies to passwords
  700 + :samp:`hex-bytes` mode also applies to passwords
701 701 specified for reading files. For additional discussion of the
702 702 supported password modes and when you might want to use them, see
703 703 `Unicode Passwords <#ref.unicode-passwords>`__. The following modes
704 704 are supported:
705 705  
706   - - @1@option@1@auto@2@option@2@: Automatically determine whether the
  706 + - :samp:`auto`: Automatically determine whether the
707 707 specified password is a properly encoded Unicode (UTF-8) string,
708 708 and transcode it as required by the PDF spec based on the type
709 709 encryption being applied. On Windows starting with version 8.4.0,
... ... @@ -711,40 +711,40 @@ needed transformations.
711 711 be properly encoded in UTF-8, so this is almost always what you
712 712 want.
713 713  
714   - - @1@option@1@unicode@2@option@2@: Tells qpdf that the incoming
  714 + - :samp:`unicode`: Tells qpdf that the incoming
715 715 password is UTF-8, overriding whatever its automatic detection
716 716 determines. The only difference between this mode and
717   - @1@option@1@auto@2@option@2@ is that qpdf will fail with an error
  717 + :samp:`auto` is that qpdf will fail with an error
718 718 message if the password is not valid UTF-8 instead of falling back
719   - to @1@option@1@bytes@2@option@2@ mode with a warning.
  719 + to :samp:`bytes` mode with a warning.
720 720  
721   - - @1@option@1@bytes@2@option@2@: Interpret the password as a literal
  721 + - :samp:`bytes`: Interpret the password as a literal
722 722 byte string. For non-Windows platforms, this is what versions of
723 723 qpdf prior to 8.4.0 did. For Windows platforms, there is no way to
724 724 specify strings of binary data on the command line directly, but
725   - you can use the @1@option@1@@filename@2@option@2@ option to do it,
  725 + you can use the :samp:`@filename` option to do it,
726 726 in which case this option forces qpdf to respect the string of
727 727 bytes as provided. This option will allow you to encrypt PDF files
728 728 with passwords that will not be usable by other readers.
729 729  
730   - - @1@option@1@hex-bytes@2@option@2@: Interpret the password as a
  730 + - :samp:`hex-bytes`: Interpret the password as a
731 731 hex-encoded string. This provides a way to pass binary data as a
732 732 password on all platforms including Windows. As with
733   - @1@option@1@bytes@2@option@2@, this option may allow creation of
  733 + :samp:`bytes`, this option may allow creation of
734 734 files that can't be opened by other readers. This mode affects
735 735 qpdf's interpretation of passwords specified for decrypting files
736 736 as well as for encrypting them. It makes it possible to specify
737 737 strings that are encoded in some manner other than the system's
738 738 default encoding.
739 739  
740   -@1@option@1@--rotate=[+|-]angle[:page-range]@2@option@2@
  740 +:samp:`--rotate=[+|-]angle[:page-range]`
741 741 Apply rotation to specified pages. The
742   - @1@option@1@page-range@2@option@2@ portion of the option value has
  742 + :samp:`page-range` portion of the option value has
743 743 the same format as page ranges in `Page Selection
744 744 Options <#ref.page-selection>`__. If the page range is omitted, the
745   - rotation is applied to all pages. The @1@option@1@angle@2@option@2@
  745 + rotation is applied to all pages. The :samp:`angle`
746 746 portion of the parameter may be either 0, 90, 180, or 270. If
747   - preceded by @1@option@1@+@2@option@2@ or @1@option@1@-@2@option@2@,
  747 + preceded by :samp:`+` or :samp:`-`,
748 748 the angle is added to or subtracted from the specified pages'
749 749 original rotations. This is almost always what you want. Otherwise
750 750 the pages' rotations are set to the exact value, which may cause the
... ... @@ -757,7 +757,7 @@ needed transformations.
757 757 out.pdf --rotate=+180` would rotate all pages by 180
758 758 degrees.
759 759  
760   -@1@option@1@--keep-files-open=@1@replaceable@1@[yn]@2@replaceable@2@@2@option@2@
  760 +:samp:`--keep-files-open=@1@replaceable@1@[yn]@2@replaceable@2@`
761 761 This option controls whether qpdf keeps individual files open while
762 762 merging. Prior to version 8.1.0, qpdf always kept all files open, but
763 763 this meant that the number of files that could be merged was limited
... ... @@ -770,45 +770,45 @@ needed transformations.
770 770 version 8.2.1, the default behavior is that files are kept open if no
771 771 more than 200 files are specified, but that the behavior can be
772 772 explicitly overridden with the
773   - @1@option@1@--keep-files-open@2@option@2@ flag. If you are merging
  773 + :samp:`--keep-files-open` flag. If you are merging
774 774 more than 200 files but less than the operating system's max open
775 775 files limit, you may want to use
776   - @1@option@1@--keep-files-open=y@2@option@2@, especially if working
  776 + :samp:`--keep-files-open=y`, especially if working
777 777 over a networked file system. If you are using a local file system
778 778 where the overhead is low and you might sometimes merge more than the
779 779 OS limit's number of files from a script and are not worried about a
780 780 few seconds additional processing time, you may want to specify
781   - @1@option@1@--keep-files-open=n@2@option@2@. The threshold for
  781 + :samp:`--keep-files-open=n`. The threshold for
782 782 switching may be changed from the default 200 with the
783   - @1@option@1@--keep-files-open-threshold@2@option@2@ option.
  783 + :samp:`--keep-files-open-threshold` option.
784 784  
785   -@1@option@1@--keep-files-open-threshold=@1@replaceable@1@count@2@replaceable@2@@2@option@2@
  785 +:samp:`--keep-files-open-threshold=@1@replaceable@1@count@2@replaceable@2@`
786 786 If specified, overrides the default value of 200 used as the
787 787 threshold for qpdf deciding whether or not to keep files open. See
788   - @1@option@1@--keep-files-open@2@option@2@ for details.
  788 + :samp:`--keep-files-open` for details.
789 789  
790   -@1@option@1@--pages options --@2@option@2@
  790 +:samp:`--pages options --`
791 791 Select specific pages from one or more input files. See `Page
792 792 Selection Options <#ref.page-selection>`__ for details on how to do
793 793 page selection (splitting and merging).
794 794  
795   -@1@option@1@--collate=@1@replaceable@1@n@2@replaceable@2@@2@option@2@
  795 +:samp:`--collate=@1@replaceable@1@n@2@replaceable@2@`
796 796 When specified, collate rather than concatenate pages from files
797   - specified with @1@option@1@--pages@2@option@2@. With a numeric
  797 + specified with :samp:`--pages`. With a numeric
798 798 argument, collate in groups of @1@replaceable@1@n@2@replaceable@2@.
799 799 The default is 1. See `Page Selection
800 800 Options <#ref.page-selection>`__ for additional details.
801 801  
802   -@1@option@1@--flatten-rotation@2@option@2@
  802 +:samp:`--flatten-rotation`
803 803 For each page that is rotated using the ``/Rotate`` key in the page's
804 804 dictionary, remove the ``/Rotate`` key and implement the identical
805 805 rotation semantics by modifying the page's contents. This option can
806 806 be useful to prepare files for buggy PDF applications that don't
807 807 properly handle rotated pages.
808 808  
809   -@1@option@1@--split-pages=[n]@2@option@2@
810   - Write each group of @1@option@1@n@2@option@2@ pages to a separate
811   - output file. If @1@option@1@n@2@option@2@ is not specified, create
  809 +:samp:`--split-pages=[n]`
  810 + Write each group of :samp:`n` pages to a separate
  811 + output file. If :samp:`n` is not specified, create
812 812 single pages. Output file names are generated as follows:
813 813  
814 814 - If the string ``%d`` appears in the output file name, it is
... ... @@ -845,24 +845,24 @@ needed transformations.
845 845 option creates an empty PDF and copies a single page from the output
846 846 into it. If you require the global data, you will have to run
847 847 :command:`qpdf` with the
848   - @1@option@1@--pages@2@option@2@ option once for each file. Using
849   - @1@option@1@--split-pages@2@option@2@ is much faster if you don't
  848 + :samp:`--pages` option once for each file. Using
  849 + :samp:`--split-pages` is much faster if you don't
850 850 require the global data.
851 851  
852   -@1@option@1@--overlay options --@2@option@2@
  852 +:samp:`--overlay options --`
853 853 Overlay pages from another file onto the output pages. See `Overlay
854 854 and Underlay Options <#ref.overlay-underlay>`__ for details on
855 855 overlay/underlay.
856 856  
857   -@1@option@1@--underlay options --@2@option@2@
  857 +:samp:`--underlay options --`
858 858 Overlay pages from another file onto the output pages. See `Overlay
859 859 and Underlay Options <#ref.overlay-underlay>`__ for details on
860 860 overlay/underlay.
861 861  
862 862 Password-protected files may be opened by specifying a password. By
863 863 default, qpdf will preserve any encryption data associated with a file.
864   -If @1@option@1@--decrypt@2@option@2@ is specified, qpdf will attempt to
865   -remove any encryption information. If @1@option@1@--encrypt@2@option@2@
  864 +If :samp:`--decrypt` is specified, qpdf will attempt to
  865 +remove any encryption information. If :samp:`--encrypt`
866 866 is specified, qpdf will replace the document's encryption parameters
867 867 with whatever is specified.
868 868  
... ... @@ -893,9 +893,9 @@ The syntax is
893 893  
894 894 ::
895 895  
896   - @1@option@1@--encrypt @1@replaceable@1@user-password@2@replaceable@2@ @1@replaceable@1@owner-password@2@replaceable@2@ @1@replaceable@1@key-length@2@replaceable@2@ [ @1@replaceable@1@restrictions@2@replaceable@2@ ] --@2@option@2@
  896 + --encrypt user-password owner-password key-length [ restrictions ] --
897 897  
898   -Note that "@1@option@1@--@2@option@2@" terminates parsing of encryption
  898 +Note that ":samp:`--`" terminates parsing of encryption
899 899 flags and must be present even if no restrictions are present.
900 900  
901 901 Either or both of the user password and the owner password may be empty
... ... @@ -903,34 +903,34 @@ strings. Starting in qpdf 10.2, qpdf defaults to not allowing creation
903 903 of PDF files with a non-empty user password, an empty owner password,
904 904 and a 256-bit key since such files can be opened with no password. If
905 905 you want to create such files, specify the encryption option
906   -@1@option@1@--allow-insecure@2@option@2@, as described below.
  906 +:samp:`--allow-insecure`, as described below.
907 907  
908 908 The value for
909   -@1@option@1@@1@replaceable@1@key-length@2@replaceable@2@@2@option@2@ may
  909 +:samp:`@1@replaceable@1@key-length@2@replaceable@2@` may
910 910 be 40, 128, or 256. The restriction flags are dependent upon key length.
911 911 When no additional restrictions are given, the default is to be fully
912 912 permissive.
913 913  
914   -If @1@option@1@@1@replaceable@1@key-length@2@replaceable@2@@2@option@2@
  914 +If :samp:`@1@replaceable@1@key-length@2@replaceable@2@`
915 915 is 40, the following restriction options are available:
916 916  
917   -@1@option@1@--print=[yn]@2@option@2@
  917 +:samp:`--print=[yn]`
918 918 Determines whether or not to allow printing.
919 919  
920   -@1@option@1@--modify=[yn]@2@option@2@
  920 +:samp:`--modify=[yn]`
921 921 Determines whether or not to allow document modification.
922 922  
923   -@1@option@1@--extract=[yn]@2@option@2@
  923 +:samp:`--extract=[yn]`
924 924 Determines whether or not to allow text/image extraction.
925 925  
926   -@1@option@1@--annotate=[yn]@2@option@2@
  926 +:samp:`--annotate=[yn]`
927 927 Determines whether or not to allow comments and form fill-in and
928 928 signing.
929 929  
930   -If @1@option@1@@1@replaceable@1@key-length@2@replaceable@2@@2@option@2@
  930 +If :samp:`@1@replaceable@1@key-length@2@replaceable@2@`
931 931 is 128, the following restriction options are available:
932 932  
933   -@1@option@1@--accessibility=[yn]@2@option@2@
  933 +:samp:`--accessibility=[yn]`
934 934 Determines whether or not to allow accessibility to visually
935 935 impaired. The qpdf library disregards this field when AES is used or
936 936 when 256-bit encryption is used. You should really never disable
... ... @@ -939,74 +939,74 @@ is 128, the following restriction options are available:
939 939 conforming readers should disregard this permission and always allow
940 940 accessibility.
941 941  
942   -@1@option@1@--extract=[yn]@2@option@2@
  942 +:samp:`--extract=[yn]`
943 943 Determines whether or not to allow text/graphic extraction.
944 944  
945   -@1@option@1@--assemble=[yn]@2@option@2@
  945 +:samp:`--assemble=[yn]`
946 946 Determines whether document assembly (rotation and reordering of
947 947 pages) is allowed.
948 948  
949   -@1@option@1@--annotate=[yn]@2@option@2@
  949 +:samp:`--annotate=[yn]`
950 950 Determines whether modifying annotations is allowed. This includes
951 951 adding comments and filling in form fields. Also allows editing of
952   - form fields if @1@option@1@--modify-other=y@2@option@2@ is given.
  952 + form fields if :samp:`--modify-other=y` is given.
953 953  
954   -@1@option@1@--form=[yn]@2@option@2@
  954 +:samp:`--form=[yn]`
955 955 Determines whether filling form fields is allowed.
956 956  
957   -@1@option@1@--modify-other=[yn]@2@option@2@
  957 +:samp:`--modify-other=[yn]`
958 958 Allow all document editing except those controlled separately by the
959   - @1@option@1@--assemble@2@option@2@,
960   - @1@option@1@--annotate@2@option@2@, and
961   - @1@option@1@--form@2@option@2@ options.
  959 + :samp:`--assemble`,
  960 + :samp:`--annotate`, and
  961 + :samp:`--form` options.
962 962  
963   -@1@option@1@--print=@1@replaceable@1@print-opt@2@replaceable@2@@2@option@2@
  963 +:samp:`--print=@1@replaceable@1@print-opt@2@replaceable@2@`
964 964 Controls printing access.
965   - @1@option@1@@1@replaceable@1@print-opt@2@replaceable@2@@2@option@2@
  965 + :samp:`@1@replaceable@1@print-opt@2@replaceable@2@`
966 966 may be one of the following:
967 967  
968   - - @1@option@1@full@2@option@2@: allow full printing
  968 + - :samp:`full`: allow full printing
969 969  
970   - - @1@option@1@low@2@option@2@: allow low-resolution printing only
  970 + - :samp:`low`: allow low-resolution printing only
971 971  
972   - - @1@option@1@none@2@option@2@: disallow printing
  972 + - :samp:`none`: disallow printing
973 973  
974   -@1@option@1@--modify=@1@replaceable@1@modify-opt@2@replaceable@2@@2@option@2@
  974 +:samp:`--modify=@1@replaceable@1@modify-opt@2@replaceable@2@`
975 975 Controls modify access. This way of controlling modify access has
976 976 less granularity than new options added in qpdf 8.4.
977   - @1@option@1@@1@replaceable@1@modify-opt@2@replaceable@2@@2@option@2@
  977 + :samp:`@1@replaceable@1@modify-opt@2@replaceable@2@`
978 978 may be one of the following:
979 979  
980   - - @1@option@1@all@2@option@2@: allow full document modification
  980 + - :samp:`all`: allow full document modification
981 981  
982   - - @1@option@1@annotate@2@option@2@: allow comment authoring, form
  982 + - :samp:`annotate`: allow comment authoring, form
983 983 operations, and document assembly
984 984  
985   - - @1@option@1@form@2@option@2@: allow form field fill-in and signing
  985 + - :samp:`form`: allow form field fill-in and signing
986 986 and document assembly
987 987  
988   - - @1@option@1@assembly@2@option@2@: allow document assembly only
  988 + - :samp:`assembly`: allow document assembly only
989 989  
990   - - @1@option@1@none@2@option@2@: allow no modifications
  990 + - :samp:`none`: allow no modifications
991 991  
992   - Using the @1@option@1@--modify@2@option@2@ option does not allow you
  992 + Using the :samp:`--modify` option does not allow you
993 993 to create certain combinations of permissions such as allowing form
994 994 filling but not allowing document assembly. Starting with qpdf 8.4,
995 995 you can either just use the other options to control fields
996   - individually, or you can use something like @1@option@1@--modify=form
997   - --assembly=n@2@option@2@ to fine tune.
  996 + individually, or you can use something like :samp:`--modify=form
  997 + --assembly=n` to fine tune.
998 998  
999   -@1@option@1@--cleartext-metadata@2@option@2@
  999 +:samp:`--cleartext-metadata`
1000 1000 If specified, any metadata stream in the document will be left
1001 1001 unencrypted even if the rest of the document is encrypted. This also
1002 1002 forces the PDF version to be at least 1.5.
1003 1003  
1004   -@1@option@1@--use-aes=[yn]@2@option@2@
1005   - If @1@option@1@--use-aes=y@2@option@2@ is specified, AES encryption
  1004 +:samp:`--use-aes=[yn]`
  1005 + If :samp:`--use-aes=y` is specified, AES encryption
1006 1006 will be used instead of RC4 encryption. This forces the PDF version
1007 1007 to be at least 1.6.
1008 1008  
1009   -@1@option@1@--allow-insecure@2@option@2@
  1009 +:samp:`--allow-insecure`
1010 1010 From qpdf 10.2, qpdf defaults to not allowing creation of PDF files
1011 1011 where the user password is non-empty, the owner password is empty,
1012 1012 and a 256-bit key is in use. Files created in this way are insecure
... ... @@ -1015,27 +1015,27 @@ is 128, the following restriction options are available:
1015 1015 intentionally created strange files for testing (a definite valid use
1016 1016 of qpdf!), this option allows you to create such insecure files.
1017 1017  
1018   -@1@option@1@--force-V4@2@option@2@
  1018 +:samp:`--force-V4`
1019 1019 Use of this option forces the ``/V`` and ``/R`` parameters in the
1020 1020 document's encryption dictionary to be set to the value ``4``. As
1021 1021 qpdf will automatically do this when required, there is no reason to
1022 1022 ever use this option. It exists primarily for use in testing qpdf
1023 1023 itself. This option also forces the PDF version to be at least 1.5.
1024 1024  
1025   -If @1@option@1@@1@replaceable@1@key-length@2@replaceable@2@@2@option@2@
  1025 +If :samp:`@1@replaceable@1@key-length@2@replaceable@2@`
1026 1026 is 256, the minimum PDF version is 1.7 with extension level 8, and the
1027 1027 AES-based encryption format used is the PDF 2.0 encryption method
1028 1028 supported by Acrobat X. the same options are available as with 128 bits
1029 1029 with the following exceptions:
1030 1030  
1031   -@1@option@1@--use-aes@2@option@2@
  1031 +:samp:`--use-aes`
1032 1032 This option is not available with 256-bit keys. AES is always used
1033 1033 with 256-bit encryption keys.
1034 1034  
1035   -@1@option@1@--force-V4@2@option@2@
  1035 +:samp:`--force-V4`
1036 1036 This option is not available with 256 keys.
1037 1037  
1038   -@1@option@1@--force-R5@2@option@2@
  1038 +:samp:`--force-R5`
1039 1039 If specified, qpdf sets the minimum version to 1.7 at extension level
1040 1040 3 and writes the deprecated encryption format used by Acrobat version
1041 1041 IX. This option should not be used in practice to generate PDF files
... ... @@ -1057,11 +1057,11 @@ replaced with pages as specified.
1057 1057  
1058 1058 ::
1059 1059  
1060   - @1@option@1@--pages @1@replaceable@1@input-file@2@replaceable@2@ [ @1@replaceable@1@--password=password@2@replaceable@2@ ] [ @1@replaceable@1@page-range@2@replaceable@2@ ] [ ... ] --@2@option@2@
  1060 + --pages input-file [ --password=password ] [ page-range ] [ ... ] --
1061 1061  
1062 1062 Multiple input files may be specified. Each one is given as the name of
1063 1063 the input file, an optional password (if required to open the file), and
1064   -the range of pages. Note that "@1@option@1@--@2@option@2@" terminates
  1064 +the range of pages. Note that ":samp:`--`" terminates
1065 1065 parsing of page selection flags.
1066 1066  
1067 1067 Starting with qpf 8.4, the special input file name
... ... @@ -1077,7 +1077,7 @@ password here. The same file can be repeated multiple times. If a file
1077 1077 that is repeated has a password, the password only has to be given the
1078 1078 first time. All non-page data (info, outlines, page numbers, etc.) are
1079 1079 taken from the primary input file. To discard these, use
1080   -@1@option@1@--empty@2@option@2@ as the primary input.
  1080 +:samp:`--empty` as the primary input.
1081 1081  
1082 1082 Starting with qpdf 5.0.0, it is possible to omit the page range. If qpdf
1083 1083 sees a value in the place where it expects a page range and that value
... ... @@ -1117,10 +1117,10 @@ Example page ranges:
1117 1117 8, 9, and 12.
1118 1118  
1119 1119 Starting in qpdf version 8.3, you can specify the
1120   -@1@option@1@--collate@2@option@2@ option. Note that this option is
1121   -specified outside of @1@option@1@--pagesย ...ย --@2@option@2@. When
1122   -@1@option@1@--collate@2@option@2@ is specified, it changes the meaning
1123   -of @1@option@1@--pages@2@option@2@ so that the specified files, as
  1120 +:samp:`--collate` option. Note that this option is
  1121 +specified outside of :samp:`--pagesย ...ย --`. When
  1122 +:samp:`--collate` is specified, it changes the meaning
  1123 +of :samp:`--pages` so that the specified files, as
1124 1124 modified by page ranges, are collated rather than concatenated. For
1125 1125 example, if you add the files :file:`odd.pdf` and
1126 1126 :file:`even.pdf` containing odd and even pages of a
... ... @@ -1153,8 +1153,8 @@ following pages in this order:
1153 1153 - a.pdf page 5
1154 1154  
1155 1155 Starting in qpdf version 10.2, you may specify a numeric argument to
1156   -@1@option@1@--collate@2@option@2@. With
1157   -@1@option@1@--collate=@1@replaceable@1@n@2@replaceable@2@@2@option@2@,
  1156 +:samp:`--collate`. With
  1157 +:samp:`--collate=@1@replaceable@1@n@2@replaceable@2@`,
1158 1158 pull groups of @1@replaceable@1@n@2@replaceable@2@ pages from each file,
1159 1159 again, stopping when there are no more pages. For example, if you ran
1160 1160 :command:`qpdf --collate=2 --empty --pages a.pdf 1-5 b.pdf 6-4 c.pdf
... ... @@ -1191,14 +1191,14 @@ remaining bookmarks will not work. A future version of
1191 1191 issues. (Note that the qpdf library already contains all of the APIs
1192 1192 required in order to implement this in your own application if you need
1193 1193 it.) In the mean time, you can always use
1194   -@1@option@1@--empty@2@option@2@ as the primary input file to avoid
  1194 +:samp:`--empty` as the primary input file to avoid
1195 1195 copying all of that from the first file. For example, to take pages 1
1196 1196 through 5 from a :file:`infile.pdf` while preserving
1197 1197 all metadata associated with that file, you could use
1198 1198  
1199 1199 ::
1200 1200  
1201   - :command:`qpdf` @1@option@1@infile.pdf --pages . 1-5 -- outfile.pdf@2@option@2@
  1201 + qpdf infile.pdf --pages . 1-5 -- outfile.pdf
1202 1202  
1203 1203 If you wanted pages 1 through 5 from
1204 1204 :file:`infile.pdf` but you wanted the rest of the
... ... @@ -1206,7 +1206,7 @@ metadata to be dropped, you could instead run
1206 1206  
1207 1207 ::
1208 1208  
1209   - :command:`qpdf` @1@option@1@--empty --pages infile.pdf 1-5 -- outfile.pdf@2@option@2@
  1209 + qpdf --empty --pages infile.pdf 1-5 -- outfile.pdf
1210 1210  
1211 1211 If you wanted to take pages 1 through 5 from
1212 1212 :file:`file1.pdf` and pages 11 through 15 from
... ... @@ -1215,7 +1215,7 @@ metadata from :file:`file2.pdf`, you would run
1215 1215  
1216 1216 ::
1217 1217  
1218   - :command:`qpdf` @1@option@1@file2.pdf --pages file1.pdf 1-5 . 15-11 -- outfile.pdf@2@option@2@
  1218 + qpdf file2.pdf --pages file1.pdf 1-5 . 15-11 -- outfile.pdf
1219 1219  
1220 1220 If, for some reason, you wanted to take the first page of an encrypted
1221 1221 file called :file:`encrypted.pdf` with password
... ... @@ -1224,12 +1224,12 @@ drop document-level metadata but preserve encryption, you would use
1224 1224  
1225 1225 ::
1226 1226  
1227   - :command:`qpdf` @1@option@1@--empty --copy-encryption=encrypted.pdf --encryption-file-password=pass
  1227 + qpdf --empty --copy-encryption=encrypted.pdf --encryption-file-password=pass
1228 1228 --pages encrypted.pdf --password=pass 1 ./encrypted.pdf --password=pass 1 --
1229   - outfile.pdf@2@option@2@
  1229 + outfile.pdf
1230 1230  
1231 1231 Note that we had to specify the password all three times because giving
1232   -a password as @1@option@1@--encryption-file-password@2@option@2@ doesn't
  1232 +a password as :samp:`--encryption-file-password` doesn't
1233 1233 count for page selection, and as far as qpdf is concerned,
1234 1234 :file:`encrypted.pdf` and
1235 1235 :file:`./encrypted.pdf` are separated files. These
... ... @@ -1260,11 +1260,11 @@ underlay as follows:
1260 1260  
1261 1261 ::
1262 1262  
1263   - { @1@option@1@--overlay@2@option@2@ | @1@option@1@--underlay@2@option@2@ } @1@replaceable@1@file@2@replaceable@2@ [ @1@option@1@options@2@option@2@ ] @1@option@1@--@2@option@2@
  1263 + { --overlay | --underlay } file [ options ] --
1264 1264  
1265 1265 Overlay and underlay options are processed late, so they can be combined
1266 1266 with other like merging and will apply to the final output. The
1267   -@1@option@1@--overlay@2@option@2@ and @1@option@1@--underlay@2@option@2@
  1267 +:samp:`--overlay` and :samp:`--underlay`
1268 1268 options work the same way, except underlay pages are drawn underneath
1269 1269 the page to which they are applied, possibly obscured by the original
1270 1270 page, and overlay files are drawn on top of the page to which they are
... ... @@ -1276,29 +1276,29 @@ from the overlay/underlay file in sequence and applied to corresponding
1276 1276 pages in the output until there are no more output pages. If the overlay
1277 1277 or underlay file runs out of pages, remaining output pages are left
1278 1278 alone. This behavior can be modified by options, which are provided
1279   -between the @1@option@1@--overlay@2@option@2@ or
1280   -@1@option@1@--underlay@2@option@2@ flag and the
1281   -@1@option@1@--@2@option@2@ option. The following options are supported:
  1279 +between the :samp:`--overlay` or
  1280 +:samp:`--underlay` flag and the
  1281 +:samp:`--` option. The following options are supported:
1282 1282  
1283   -- @1@option@1@--password=password@2@option@2@: supply a password if the
  1283 +- :samp:`--password=password`: supply a password if the
1284 1284 overlay/underlay file is encrypted.
1285 1285  
1286   -- @1@option@1@--to=page-range@2@option@2@: a range of pages in the same
  1286 +- :samp:`--to=page-range`: a range of pages in the same
1287 1287 form at described in `Page Selection Options <#ref.page-selection>`__
1288 1288 indicates which pages in the output should have the overlay/underlay
1289 1289 applied. If not specified, overlay/underlay are applied to all pages.
1290 1290  
1291   -- @1@option@1@--from=[page-range]@2@option@2@: a range of pages that
  1291 +- :samp:`--from=[page-range]`: a range of pages that
1292 1292 specifies which pages in the overlay/underlay file will be used for
1293 1293 overlay or underlay. If not specified, all pages will be used. This
1294 1294 can be explicitly specified to be empty if
1295   - @1@option@1@--repeat@2@option@2@ is used.
  1295 + :samp:`--repeat` is used.
1296 1296  
1297   -- @1@option@1@--repeat=page-range@2@option@2@: an optional range of
  1297 +- :samp:`--repeat=page-range`: an optional range of
1298 1298 pages that specifies which pages in the overlay/underlay file will be
1299 1299 repeated after the "from" pages are used up. If you want to repeat a
1300 1300 range of pages starting at the beginning, you can explicitly use
1301   - @1@option@1@--from=@2@option@2@.
  1301 + :samp:`--from=`.
1302 1302  
1303 1303 Here are some examples.
1304 1304  
... ... @@ -1323,78 +1323,78 @@ Embedded Files/Attachments Options
1323 1323 Starting with qpdf 10.2, you can work with file attachments in PDF files
1324 1324 from the command line. The following options are available:
1325 1325  
1326   -@1@option@1@--list-attachments@2@option@2@
  1326 +:samp:`--list-attachments`
1327 1327 Show the "key" and stream number for embedded files. With
1328   - @1@option@1@--verbose@2@option@2@, additional information, including
  1328 + :samp:`--verbose`, additional information, including
1329 1329 preferred file name, description, dates, and more are also displayed.
1330 1330 The key is usually but not always equal to the file name, and is
1331 1331 needed by some of the other options.
1332 1332  
1333   -@1@option@1@--show-attachment=@1@replaceable@1@key@2@replaceable@2@@2@option@2@
  1333 +:samp:`--show-attachment=@1@replaceable@1@key@2@replaceable@2@`
1334 1334 Write the contents of the specified attachment to standard output as
1335 1335 binary data. The key should match one of the keys shown by
1336   - @1@option@1@--list-attachments@2@option@2@. If specified multiple
  1336 + :samp:`--list-attachments`. If specified multiple
1337 1337 times, only the last attachment will be shown.
1338 1338  
1339   -@1@option@1@--add-attachment @1@replaceable@1@file@2@replaceable@2@ @1@replaceable@1@options@2@replaceable@2@ --@2@option@2@
  1339 +:samp:`--add-attachment @1@replaceable@1@file@2@replaceable@2@ @1@replaceable@1@options@2@replaceable@2@ --`
1340 1340 Add or replace an attachment with the contents of
1341 1341 @1@replaceable@1@file@2@replaceable@2@. This may be specified more
1342 1342 than once. The following additional options may appear before the
1343 1343 ``--`` that ends this option:
1344 1344  
1345   - @1@option@1@--key=@1@replaceable@1@key@2@replaceable@2@@2@option@2@
  1345 + :samp:`--key=@1@replaceable@1@key@2@replaceable@2@`
1346 1346 The key to use to register the attachment in the embedded files
1347 1347 table. Defaults to the last path element of
1348 1348 @1@replaceable@1@file@2@replaceable@2@.
1349 1349  
1350   - @1@option@1@--filename=@1@replaceable@1@name@2@replaceable@2@@2@option@2@
  1350 + :samp:`--filename=@1@replaceable@1@name@2@replaceable@2@`
1351 1351 The file name to be used for the attachment. This is what is
1352 1352 usually displayed to the user and is the name most graphical PDF
1353 1353 viewers will use when saving a file. It defaults to the last path
1354 1354 element of @1@replaceable@1@file@2@replaceable@2@.
1355 1355  
1356   - @1@option@1@--creationdate=@1@replaceable@1@date@2@replaceable@2@@2@option@2@
  1356 + :samp:`--creationdate=@1@replaceable@1@date@2@replaceable@2@`
1357 1357 The attachment's creation date in PDF format; defaults to the
1358 1358 current time. The date format is explained below.
1359 1359  
1360   - @1@option@1@--moddate=@1@replaceable@1@date@2@replaceable@2@@2@option@2@
  1360 + :samp:`--moddate=@1@replaceable@1@date@2@replaceable@2@`
1361 1361 The attachment's modification date in PDF format; defaults to the
1362 1362 current time. The date format is explained below.
1363 1363  
1364   - @1@option@1@--mimetype=@1@replaceable@1@type/subtype@2@replaceable@2@@2@option@2@
  1364 + :samp:`--mimetype=@1@replaceable@1@type/subtype@2@replaceable@2@`
1365 1365 The mime type for the attachment, e.g. ``text/plain`` or
1366 1366 ``application/pdf``. Note that the mimetype appears in a field
1367 1367 called ``/Subtype`` in the PDF but actually includes the full type
1368 1368 and subtype of the mime type.
1369 1369  
1370   - @1@option@1@--description=@1@replaceable@1@"text"@2@replaceable@2@@2@option@2@
  1370 + :samp:`--description=@1@replaceable@1@"text"@2@replaceable@2@`
1371 1371 Descriptive text for the attachment, displayed by some PDF
1372 1372 viewers.
1373 1373  
1374   - @1@option@1@--replace@2@option@2@
  1374 + :samp:`--replace`
1375 1375 Indicates that any existing attachment with the same key should be
1376 1376 replaced by the new attachment. Otherwise,
1377 1377 :command:`qpdf` gives an error if an attachment
1378 1378 with that key is already present.
1379 1379  
1380   -@1@option@1@--remove-attachment=@1@replaceable@1@key@2@replaceable@2@@2@option@2@
  1380 +:samp:`--remove-attachment=@1@replaceable@1@key@2@replaceable@2@`
1381 1381 Remove the specified attachment. This doesn't only remove the
1382 1382 attachment from the embedded files table but also clears out the file
1383 1383 specification. That means that any potential internal links to the
1384 1384 attachment will be broken. This option may be specified multiple
1385   - times. Run with @1@option@1@--verbose@2@option@2@ to see status of
  1385 + times. Run with :samp:`--verbose` to see status of
1386 1386 the removal.
1387 1387  
1388   -@1@option@1@--copy-attachments-from @1@replaceable@1@file@2@replaceable@2@ @1@replaceable@1@options@2@replaceable@2@ --@2@option@2@
  1388 +:samp:`--copy-attachments-from @1@replaceable@1@file@2@replaceable@2@ @1@replaceable@1@options@2@replaceable@2@ --`
1389 1389 Copy attachments from another file. This may be specified more than
1390 1390 once. The following additional options may appear before the ``--``
1391 1391 that ends this option:
1392 1392  
1393   - @1@option@1@--password=@1@replaceable@1@password@2@replaceable@2@@2@option@2@
  1393 + :samp:`--password=@1@replaceable@1@password@2@replaceable@2@`
1394 1394 If required, the password needed to open
1395 1395 @1@replaceable@1@file@2@replaceable@2@
1396 1396  
1397   - @1@option@1@--prefix=@1@replaceable@1@prefix@2@replaceable@2@@2@option@2@
  1397 + :samp:`--prefix=@1@replaceable@1@prefix@2@replaceable@2@`
1398 1398 Only required if the file from which attachments are being copied
1399 1399 has attachments with keys that conflict with attachments already
1400 1400 in the file. In this case, the specified prefix will be prepended
... ... @@ -1420,10 +1420,10 @@ are of use to people who are working with damaged files. There is little
1420 1420 reason to use these options unless you are trying to solve specific
1421 1421 problems. The following options are available:
1422 1422  
1423   -@1@option@1@--suppress-recovery@2@option@2@
  1423 +:samp:`--suppress-recovery`
1424 1424 Prevents qpdf from attempting to recover damaged files.
1425 1425  
1426   -@1@option@1@--ignore-xref-streams@2@option@2@
  1426 +:samp:`--ignore-xref-streams`
1427 1427 Tells qpdf to ignore any cross-reference streams.
1428 1428  
1429 1429 Ordinarily, qpdf will attempt to recover from certain types of errors in
... ... @@ -1432,12 +1432,12 @@ types of object numbering errors, and certain types of stream length
1432 1432 errors. Sometimes, qpdf may think it has recovered but may not have
1433 1433 actually recovered, so care should be taken when using this option as
1434 1434 some data loss is possible. The
1435   -@1@option@1@--suppress-recovery@2@option@2@ option will prevent qpdf
  1435 +:samp:`--suppress-recovery` option will prevent qpdf
1436 1436 from attempting recovery. In this case, it will fail on the first error
1437 1437 that it encounters.
1438 1438  
1439 1439 Ordinarily, qpdf reads cross-reference streams when they are present in
1440   -a PDF file. If @1@option@1@--ignore-xref-streams@2@option@2@ is
  1440 +a PDF file. If :samp:`--ignore-xref-streams` is
1441 1441 specified, qpdf will ignore any cross-reference streams for hybrid PDF
1442 1442 files. The purpose of hybrid files is to make some content available to
1443 1443 viewers that are not aware of cross-reference streams. It is almost
... ... @@ -1456,99 +1456,99 @@ output file. Mostly these are of use only to people who are very
1456 1456 familiar with the PDF file format or who are PDF developers. The
1457 1457 following options are available:
1458 1458  
1459   -@1@option@1@--compress-streams=@1@replaceable@1@[yn]@2@replaceable@2@@2@option@2@
1460   - By default, or with @1@option@1@--compress-streams=y@2@option@2@,
  1459 +:samp:`--compress-streams=@1@replaceable@1@[yn]@2@replaceable@2@`
  1460 + By default, or with :samp:`--compress-streams=y`,
1461 1461 qpdf will compress any stream with no other filters applied to it
1462 1462 with the ``/FlateDecode`` filter when it writes it. To suppress this
1463 1463 behavior and preserve uncompressed streams as uncompressed, use
1464   - @1@option@1@--compress-streams=n@2@option@2@.
  1464 + :samp:`--compress-streams=n`.
1465 1465  
1466   -@1@option@1@--decode-level=@1@replaceable@1@option@2@replaceable@2@@2@option@2@
  1466 +:samp:`--decode-level=@1@replaceable@1@option@2@replaceable@2@`
1467 1467 Controls which streams qpdf tries to decode. The default is
1468   - @1@option@1@generalized@2@option@2@. The following options are
  1468 + :samp:`generalized`. The following options are
1469 1469 available:
1470 1470  
1471   - - @1@option@1@none@2@option@2@: do not attempt to decode any streams
  1471 + - :samp:`none`: do not attempt to decode any streams
1472 1472  
1473   - - @1@option@1@generalized@2@option@2@: decode streams filtered with
  1473 + - :samp:`generalized`: decode streams filtered with
1474 1474 supported generalized filters: ``/LZWDecode``, ``/FlateDecode``,
1475 1475 ``/ASCII85Decode``, and ``/ASCIIHexDecode``. We define generalized
1476 1476 filters as those to be used for general-purpose compression or
1477 1477 encoding, as opposed to filters specifically designed for image
1478 1478 data. Note that, by default, streams already compressed with
1479 1479 ``/FlateDecode`` are not uncompressed and recompressed unless you
1480   - also specify @1@option@1@--recompress-flate@2@option@2@.
  1480 + also specify :samp:`--recompress-flate`.
1481 1481  
1482   - - @1@option@1@specialized@2@option@2@: in addition to generalized,
  1482 + - :samp:`specialized`: in addition to generalized,
1483 1483 decode streams with supported non-lossy specialized filters;
1484 1484 currently this is just ``/RunLengthDecode``
1485 1485  
1486   - - @1@option@1@all@2@option@2@: in addition to generalized and
  1486 + - :samp:`all`: in addition to generalized and
1487 1487 specialized, decode streams with supported lossy filters;
1488 1488 currently this is just ``/DCTDecode`` (JPEG)
1489 1489  
1490   -@1@option@1@--stream-data=@1@replaceable@1@option@2@replaceable@2@@2@option@2@
  1490 +:samp:`--stream-data=@1@replaceable@1@option@2@replaceable@2@`
1491 1491 Controls transformation of stream data. This option predates the
1492   - @1@option@1@--compress-streams@2@option@2@ and
1493   - @1@option@1@--decode-level@2@option@2@ options. Those options can be
  1492 + :samp:`--compress-streams` and
  1493 + :samp:`--decode-level` options. Those options can be
1494 1494 used to achieve the same affect with more control. The value of
1495   - @1@option@1@@1@replaceable@1@option@2@replaceable@2@@2@option@2@ may
  1495 + :samp:`@1@replaceable@1@option@2@replaceable@2@` may
1496 1496 be one of the following:
1497 1497  
1498   - - @1@option@1@compress@2@option@2@: recompress stream data when
  1498 + - :samp:`compress`: recompress stream data when
1499 1499 possible (default); equivalent to
1500   - @1@option@1@--compress-streams=y@2@option@2@
1501   - @1@option@1@--decode-level=generalized@2@option@2@. Does not
  1500 + :samp:`--compress-streams=y`
  1501 + :samp:`--decode-level=generalized`. Does not
1502 1502 recompress streams already compressed with ``/FlateDecode`` unless
1503   - @1@option@1@--recompress-flate@2@option@2@ is also specified.
  1503 + :samp:`--recompress-flate` is also specified.
1504 1504  
1505   - - @1@option@1@preserve@2@option@2@: leave all stream data as is;
1506   - equivalent to @1@option@1@--compress-streams=n@2@option@2@
1507   - @1@option@1@--decode-level=none@2@option@2@
  1505 + - :samp:`preserve`: leave all stream data as is;
  1506 + equivalent to :samp:`--compress-streams=n`
  1507 + :samp:`--decode-level=none`
1508 1508  
1509   - - @1@option@1@uncompress@2@option@2@: uncompress stream data
  1509 + - :samp:`uncompress`: uncompress stream data
1510 1510 compressed with generalized filters when possible; equivalent to
1511   - @1@option@1@--compress-streams=n@2@option@2@
1512   - @1@option@1@--decode-level=generalized@2@option@2@
  1511 + :samp:`--compress-streams=n`
  1512 + :samp:`--decode-level=generalized`
1513 1513  
1514   -@1@option@1@--recompress-flate@2@option@2@
  1514 +:samp:`--recompress-flate`
1515 1515 By default, streams already compressed with ``/FlateDecode`` are left
1516 1516 alone rather than being uncompressed and recompressed. This option
1517 1517 causes qpdf to uncompress and recompress the streams. There is a
1518 1518 significant performance cost to using this option, but you probably
1519 1519 want to use it if you specify
1520   - @1@option@1@--compression-level@2@option@2@.
  1520 + :samp:`--compression-level`.
1521 1521  
1522   -@1@option@1@--compression-level=@1@replaceable@1@level@2@replaceable@2@@2@option@2@
  1522 +:samp:`--compression-level=@1@replaceable@1@level@2@replaceable@2@`
1523 1523 When writing new streams that are compressed with ``/FlateDecode``,
1524 1524 use the specified compression level. The value of
1525   - @1@option@1@level@2@option@2@ should be a number from 1 to 9 and is
  1525 + :samp:`level` should be a number from 1 to 9 and is
1526 1526 passed directly to zlib, which implements deflate compression. Note
1527 1527 that qpdf doesn't uncompress and recompress streams by default. To
1528 1528 have this option apply to already compressed streams, you should also
1529   - specify @1@option@1@--recompress-flate@2@option@2@. If your goal is
  1529 + specify :samp:`--recompress-flate`. If your goal is
1530 1530 to shrink the size of PDF files, you should also use
1531   - @1@option@1@--object-streams=generate@2@option@2@.
  1531 + :samp:`--object-streams=generate`.
1532 1532  
1533   -@1@option@1@--normalize-content=[yn]@2@option@2@
  1533 +:samp:`--normalize-content=[yn]`
1534 1534 Enables or disables normalization of content streams. Content
1535 1535 normalization is enabled by default in QDF mode. Please see `QDF
1536 1536 Mode <#ref.qdf>`__ for additional discussion of QDF mode.
1537 1537  
1538   -@1@option@1@--object-streams=@1@replaceable@1@mode@2@replaceable@2@@2@option@2@
  1538 +:samp:`--object-streams=@1@replaceable@1@mode@2@replaceable@2@`
1539 1539 Controls handling of object streams. The value of
1540   - @1@option@1@@1@replaceable@1@mode@2@replaceable@2@@2@option@2@ may be
  1540 + :samp:`@1@replaceable@1@mode@2@replaceable@2@` may be
1541 1541 one of the following:
1542 1542  
1543   - - @1@option@1@preserve@2@option@2@: preserve original object streams
  1543 + - :samp:`preserve`: preserve original object streams
1544 1544 (default)
1545 1545  
1546   - - @1@option@1@disable@2@option@2@: don't write any object streams
  1546 + - :samp:`disable`: don't write any object streams
1547 1547  
1548   - - @1@option@1@generate@2@option@2@: use object streams wherever
  1548 + - :samp:`generate`: use object streams wherever
1549 1549 possible
1550 1550  
1551   -@1@option@1@--preserve-unreferenced@2@option@2@
  1551 +:samp:`--preserve-unreferenced`
1552 1552 Tells qpdf to preserve objects that are not referenced when writing
1553 1553 the file. Ordinarily any object that is not referenced in a traversal
1554 1554 of the document from the trailer dictionary will be discarded. This
... ... @@ -1562,10 +1562,10 @@ following options are available:
1562 1562 indirect differently from the original file, and the original file
1563 1563 may have gaps in its numbering.
1564 1564  
1565   - See also @1@option@1@--preserve-unreferenced-resources@2@option@2@,
  1565 + See also :samp:`--preserve-unreferenced-resources`,
1566 1566 which does something completely different.
1567 1567  
1568   -@1@option@1@--remove-unreferenced-resources=@1@replaceable@1@option@2@replaceable@2@@2@option@2@
  1568 +:samp:`--remove-unreferenced-resources=@1@replaceable@1@option@2@replaceable@2@`
1569 1569 The @1@replaceable@1@option@2@replaceable@2@ may be ``auto``,
1570 1570 ``yes``, or ``no``. The default is ``auto``.
1571 1571  
... ... @@ -1592,14 +1592,14 @@ following options are available:
1592 1592 be removing. If you encounter that case, please report it as bug at
1593 1593 https://github.com/qpdf/qpdf/issues/.
1594 1594  
1595   -@1@option@1@--preserve-unreferenced-resources@2@option@2@
  1595 +:samp:`--preserve-unreferenced-resources`
1596 1596 This is a synonym for
1597   - @1@option@1@--remove-unreferenced-resources=no@2@option@2@.
  1597 + :samp:`--remove-unreferenced-resources=no`.
1598 1598  
1599   - See also @1@option@1@--preserve-unreferenced@2@option@2@, which does
  1599 + See also :samp:`--preserve-unreferenced`, which does
1600 1600 something completely different.
1601 1601  
1602   -@1@option@1@--newline-before-endstream@2@option@2@
  1602 +:samp:`--newline-before-endstream`
1603 1603 Tells qpdf to insert a newline before the ``endstream`` keyword, not
1604 1604 counted in the length, after any stream content even if the last
1605 1605 character of the stream was a newline. This may result in two
... ... @@ -1608,7 +1608,7 @@ following options are available:
1608 1608 at least prevents it from removing compliance on already compliant
1609 1609 files.
1610 1610  
1611   -@1@option@1@--linearize-pass1=@1@replaceable@1@file@2@replaceable@2@@2@option@2@
  1611 +:samp:`--linearize-pass1=@1@replaceable@1@file@2@replaceable@2@`
1612 1612 Write the first pass of linearization to the named file. The
1613 1613 resulting file is not a valid PDF file. This option is useful only
1614 1614 for debugging ``QPDFWriter``'s linearization code. When qpdf
... ... @@ -1617,7 +1617,7 @@ following options are available:
1617 1617 and the linearization dictionary. Ordinarily, the first pass is
1618 1618 discarded. This option enables it to be captured.
1619 1619  
1620   -@1@option@1@--coalesce-contents@2@option@2@
  1620 +:samp:`--coalesce-contents`
1621 1621 When a page's contents are split across multiple streams, this option
1622 1622 causes qpdf to combine them into a single stream. Use of this option
1623 1623 is never necessary for ordinary usage, but it can help when working
... ... @@ -1625,7 +1625,7 @@ following options are available:
1625 1625 with QDF mode or content normalization to make it easier to look at
1626 1626 all of a page's contents at once.
1627 1627  
1628   -@1@option@1@--flatten-annotations=@1@replaceable@1@option@2@replaceable@2@@2@option@2@
  1628 +:samp:`--flatten-annotations=@1@replaceable@1@option@2@replaceable@2@`
1629 1629 This option collapses annotations into the pages' contents with
1630 1630 special handling for form fields. Ordinarily, an annotation is
1631 1631 rendered separately and on top of the page. Combining annotations
... ... @@ -1637,13 +1637,13 @@ following options are available:
1637 1637 annotations. The @1@replaceable@1@option@2@replaceable@2@ parameter
1638 1638 may be any of the following:
1639 1639  
1640   - - @1@option@1@all@2@option@2@: include all annotations that are not
  1640 + - :samp:`all`: include all annotations that are not
1641 1641 marked invisible or hidden
1642 1642  
1643   - - @1@option@1@print@2@option@2@: only include annotations that
  1643 + - :samp:`print`: only include annotations that
1644 1644 indicate that they should appear when the page is printed
1645 1645  
1646   - - @1@option@1@screen@2@option@2@: omit annotations that indicate
  1646 + - :samp:`screen`: omit annotations that indicate
1647 1647 they should not appear on the screen
1648 1648  
1649 1649 Note that form fields are special because the annotations that are
... ... @@ -1655,14 +1655,14 @@ following options are available:
1655 1655 chance to go back and resave the form with a program that knows how
1656 1656 to generate appearances. QPDF itself can generate appearances with
1657 1657 some limitations. See the
1658   - @1@option@1@--generate-appearances@2@option@2@ option below.
  1658 + :samp:`--generate-appearances` option below.
1659 1659  
1660   -@1@option@1@--generate-appearances@2@option@2@
  1660 +:samp:`--generate-appearances`
1661 1661 If a file contains interactive form fields and indicates that the
1662 1662 appearances are out of date with the values of the form, this flag
1663 1663 will regenerate appearances, subject to a few limitations. Note that
1664 1664 there is not usually a reason to do this, but it can be necessary
1665   - before using the @1@option@1@--flatten-annotations@2@option@2@
  1665 + before using the :samp:`--flatten-annotations`
1666 1666 option. Most of these are not a problem with well-behaved PDF files.
1667 1667 The limitations are as follows:
1668 1668  
... ... @@ -1690,61 +1690,61 @@ following options are available:
1690 1690 application to save your filled-in form before processing it with
1691 1691 qpdf.
1692 1692  
1693   -@1@option@1@--optimize-images@2@option@2@
  1693 +:samp:`--optimize-images`
1694 1694 This flag causes qpdf to recompress all images that are not
1695 1695 compressed with DCT (JPEG) using DCT compression as long as doing so
1696 1696 decreases the size in bytes of the image data and the image does not
1697 1697 fall below minimum specified dimensions. Useful information is
1698 1698 provided when used in combination with
1699   - @1@option@1@--verbose@2@option@2@. See also the
1700   - @1@option@1@--oi-min-width@2@option@2@,
1701   - @1@option@1@--oi-min-height@2@option@2@, and
1702   - @1@option@1@--oi-min-area@2@option@2@ options. By default, starting
  1699 + :samp:`--verbose`. See also the
  1700 + :samp:`--oi-min-width`,
  1701 + :samp:`--oi-min-height`, and
  1702 + :samp:`--oi-min-area` options. By default, starting
1703 1703 in qpdf 8.4, inline images are converted to regular images and
1704   - optimized as well. Use @1@option@1@--keep-inline-images@2@option@2@
  1704 + optimized as well. Use :samp:`--keep-inline-images`
1705 1705 to prevent inline images from being included.
1706 1706  
1707   -@1@option@1@--oi-min-width=@1@replaceable@1@width@2@replaceable@2@@2@option@2@
  1707 +:samp:`--oi-min-width=@1@replaceable@1@width@2@replaceable@2@`
1708 1708 Avoid optimizing images whose width is below the specified amount. If
1709 1709 omitted, the default is 128 pixels. Use 0 for no minimum.
1710 1710  
1711   -@1@option@1@--oi-min-height=@1@replaceable@1@height@2@replaceable@2@@2@option@2@
  1711 +:samp:`--oi-min-height=@1@replaceable@1@height@2@replaceable@2@`
1712 1712 Avoid optimizing images whose height is below the specified amount.
1713 1713 If omitted, the default is 128 pixels. Use 0 for no minimum.
1714 1714  
1715   -@1@option@1@--oi-min-area=@1@replaceable@1@area-in-pixels@2@replaceable@2@@2@option@2@
  1715 +:samp:`--oi-min-area=@1@replaceable@1@area-in-pixels@2@replaceable@2@`
1716 1716 Avoid optimizing images whose pixel count (widthย ร—ย height) is below
1717 1717 the specified amount. If omitted, the default is 16,384 pixels. Use 0
1718 1718 for no minimum.
1719 1719  
1720   -@1@option@1@--externalize-inline-images@2@option@2@
  1720 +:samp:`--externalize-inline-images`
1721 1721 Convert inline images to regular images. By default, images whose
1722 1722 data is at least 1,024 bytes are converted when this option is
1723   - selected. Use @1@option@1@--ii-min-bytes@2@option@2@ to change the
  1723 + selected. Use :samp:`--ii-min-bytes` to change the
1724 1724 size threshold. This option is implicitly selected when
1725   - @1@option@1@--optimize-images@2@option@2@ is selected. Use
1726   - @1@option@1@--keep-inline-images@2@option@2@ to exclude inline images
  1725 + :samp:`--optimize-images` is selected. Use
  1726 + :samp:`--keep-inline-images` to exclude inline images
1727 1727 from image optimization.
1728 1728  
1729   -@1@option@1@--ii-min-bytes=@1@replaceable@1@bytes@2@replaceable@2@@2@option@2@
  1729 +:samp:`--ii-min-bytes=@1@replaceable@1@bytes@2@replaceable@2@`
1730 1730 Avoid converting inline images whose size is below the specified
1731 1731 minimum size to regular images. If omitted, the default is 1,024
1732 1732 bytes. Use 0 for no minimum.
1733 1733  
1734   -@1@option@1@--keep-inline-images@2@option@2@
  1734 +:samp:`--keep-inline-images`
1735 1735 Prevent inline images from being included in image optimization. This
1736   - option has no affect when @1@option@1@--optimize-images@2@option@2@
  1736 + option has no affect when :samp:`--optimize-images`
1737 1737 is not specified.
1738 1738  
1739   -@1@option@1@--remove-page-labels@2@option@2@
  1739 +:samp:`--remove-page-labels`
1740 1740 Remove page labels from the output file.
1741 1741  
1742   -@1@option@1@--qdf@2@option@2@
  1742 +:samp:`--qdf`
1743 1743 Turns on QDF mode. For additional information on QDF, please see `QDF
1744   - Mode <#ref.qdf>`__. Note that @1@option@1@--linearize@2@option@2@
  1744 + Mode <#ref.qdf>`__. Note that :samp:`--linearize`
1745 1745 disables QDF mode.
1746 1746  
1747   -@1@option@1@--min-version=@1@replaceable@1@version@2@replaceable@2@@2@option@2@
  1747 +:samp:`--min-version=@1@replaceable@1@version@2@replaceable@2@`
1748 1748 Forces the PDF version of the output file to be at least
1749 1749 @1@replaceable@1@version@2@replaceable@2@. In other words, if the
1750 1750 input file has a lower version than the specified version, the
... ... @@ -1762,11 +1762,11 @@ following options are available:
1762 1762 version ``1.7.8`` represents version 1.7 at extension level 8. Note
1763 1763 that minimal syntax checking is done on the command line.
1764 1764  
1765   -@1@option@1@--force-version=@1@replaceable@1@version@2@replaceable@2@@2@option@2@
  1765 +:samp:`--force-version=@1@replaceable@1@version@2@replaceable@2@`
1766 1766 This option forces the PDF version to be the exact version specified
1767 1767 *even when the file may have content that is not supported in that
1768 1768 version*. The version number is interpreted in the same way as with
1769   - @1@option@1@--min-version@2@option@2@ so that extension levels can be
  1769 + :samp:`--min-version` so that extension levels can be
1770 1770 set. In some cases, forcing the output file's PDF version to be lower
1771 1771 than that of the input file will cause qpdf to disable certain
1772 1772 features of the document. Specifically, 256-bit keys are disabled if
... ... @@ -1793,9 +1793,9 @@ understands and is not already compressed using a good compression
1793 1793 scheme, qpdf will uncompress and recompress streams. Assuming proper
1794 1794 filter implements, this is safe and generally results in smaller files.
1795 1795 This behavior may also be explicitly requested with
1796   -@1@option@1@--stream-data=compress@2@option@2@.
  1796 +:samp:`--stream-data=compress`.
1797 1797  
1798   -When @1@option@1@--normalize-content=y@2@option@2@ is specified, qpdf
  1798 +When :samp:`--normalize-content=y` is specified, qpdf
1799 1799 will attempt to normalize whitespace and newlines in page content
1800 1800 streams. This is generally safe but could, in some cases, cause damage
1801 1801 to the content streams. This option is intended for people who wish to
... ... @@ -1811,9 +1811,9 @@ string, name, or inline image. Note that files that do this are invalid
1811 1811 since the PDF specification states that content streams are not to be
1812 1812 split in the middle of a token. If you want to inspect the original
1813 1813 content streams in an uncompressed format, you can always run with
1814   -@1@option@1@--qdf --normalize-content=n@2@option@2@ for a QDF file
  1814 +:samp:`--qdf --normalize-content=n` for a QDF file
1815 1815 without content normalization, or alternatively
1816   -@1@option@1@--stream-data=uncompress@2@option@2@ for a regular non-QDF
  1816 +:samp:`--stream-data=uncompress` for a regular non-QDF
1817 1817 mode file with uncompressed streams. These will both uncompress all the
1818 1818 streams but will not attempt to normalize content. Please note that if
1819 1819 you are using content normalization or QDF mode for the purpose of
... ... @@ -1824,22 +1824,22 @@ the PDF specification at version 1.5, corresponding to Acrobat 6. Some
1824 1824 older PDF viewers may not support files with object streams. qpdf can be
1825 1825 used to transform files with object streams to files without object
1826 1826 streams or vice versa. As mentioned above, there are three object stream
1827   -modes: @1@option@1@preserve@2@option@2@,
1828   -@1@option@1@disable@2@option@2@, and @1@option@1@generate@2@option@2@.
  1827 +modes: :samp:`preserve`,
  1828 +:samp:`disable`, and :samp:`generate`.
1829 1829  
1830   -In @1@option@1@preserve@2@option@2@ mode, the relationship to objects
  1830 +In :samp:`preserve` mode, the relationship to objects
1831 1831 and the streams that contain them is preserved from the original file.
1832   -In @1@option@1@disable@2@option@2@ mode, all objects are written as
  1832 +In :samp:`disable` mode, all objects are written as
1833 1833 regular, uncompressed objects. The resulting file should be readable by
1834 1834 older PDF viewers. (Of course, the content of the files may include
1835 1835 features not supported by older viewers, but at least the structure will
1836   -be supported.) In @1@option@1@generate@2@option@2@ mode, qpdf will
  1836 +be supported.) In :samp:`generate` mode, qpdf will
1837 1837 create its own object streams. This will usually result in more compact
1838 1838 PDF files, though they may not be readable by older viewers. In this
1839 1839 mode, qpdf will also make sure the PDF version number in the header is
1840 1840 at least 1.5.
1841 1841  
1842   -The @1@option@1@--qdf@2@option@2@ flag turns on QDF mode, which changes
  1842 +The :samp:`--qdf` flag turns on QDF mode, which changes
1843 1843 some of the defaults described above. Specifically, in QDF mode, by
1844 1844 default, stream data is uncompressed, content streams are normalized,
1845 1845 and encryption is removed. These defaults can still be overridden by
... ... @@ -1862,7 +1862,7 @@ automated test suites for software that uses the qpdf library. When any
1862 1862 of the options in this section are specified, no output file should be
1863 1863 given. The following options are available:
1864 1864  
1865   -@1@option@1@--deterministic-id@2@option@2@
  1865 +:samp:`--deterministic-id`
1866 1866 Causes generation of a deterministic value for /ID. This prevents use
1867 1867 of timestamp and output file name information in the /ID generation.
1868 1868 Instead, at some slight additional runtime cost, the /ID field is
... ... @@ -1872,138 +1872,138 @@ given. The following options are available:
1872 1872 caching results or for generation of some test data. Use of this flag
1873 1873 is not compatible with creation of encrypted files.
1874 1874  
1875   -@1@option@1@--static-id@2@option@2@
  1875 +:samp:`--static-id`
1876 1876 Causes generation of a fixed value for /ID. This is intended for
1877 1877 testing only. Never use it for production files. If you are trying to
1878 1878 get the same /ID each time for a given file and you are not
1879 1879 generating encrypted files, consider using the
1880   - @1@option@1@--deterministic-id@2@option@2@ option.
  1880 + :samp:`--deterministic-id` option.
1881 1881  
1882   -@1@option@1@--static-aes-iv@2@option@2@
  1882 +:samp:`--static-aes-iv`
1883 1883 Causes use of a static initialization vector for AES-CBC. This is
1884 1884 intended for testing only so that output files can be reproducible.
1885 1885 Never use it for production files. This option in particular is not
1886 1886 secure since it significantly weakens the encryption.
1887 1887  
1888   -@1@option@1@--no-original-object-ids@2@option@2@
  1888 +:samp:`--no-original-object-ids`
1889 1889 Suppresses inclusion of original object ID comments in QDF files.
1890 1890 This can be useful when generating QDF files for test purposes,
1891 1891 particularly when comparing them to determine whether two PDF files
1892 1892 have identical content.
1893 1893  
1894   -@1@option@1@--show-encryption@2@option@2@
  1894 +:samp:`--show-encryption`
1895 1895 Shows document encryption parameters. Also shows the document's user
1896 1896 password if the owner password is given.
1897 1897  
1898   -@1@option@1@--show-encryption-key@2@option@2@
  1898 +:samp:`--show-encryption-key`
1899 1899 When encryption information is being displayed, as when
1900   - @1@option@1@--check@2@option@2@ or
1901   - @1@option@1@--show-encryption@2@option@2@ is given, display the
  1900 + :samp:`--check` or
  1901 + :samp:`--show-encryption` is given, display the
1902 1902 computed or retrieved encryption key as a hexadecimal string. This
1903 1903 value is not ordinarily useful to users, but it can be used as the
1904   - argument to @1@option@1@--password@2@option@2@ if the
1905   - @1@option@1@--password-is-hex-key@2@option@2@ is specified. Note
  1904 + argument to :samp:`--password` if the
  1905 + :samp:`--password-is-hex-key` is specified. Note
1906 1906 that, when PDF files are encrypted, passwords and other metadata are
1907 1907 used only to compute an encryption key, and the encryption key is
1908 1908 what is actually used for encryption. This enables retrieval of that
1909 1909 key.
1910 1910  
1911   -@1@option@1@--check-linearization@2@option@2@
  1911 +:samp:`--check-linearization`
1912 1912 Checks file integrity and linearization status.
1913 1913  
1914   -@1@option@1@--show-linearization@2@option@2@
  1914 +:samp:`--show-linearization`
1915 1915 Checks and displays all data in the linearization hint tables.
1916 1916  
1917   -@1@option@1@--show-xref@2@option@2@
  1917 +:samp:`--show-xref`
1918 1918 Shows the contents of the cross-reference table in a human-readable
1919 1919 form. This is especially useful for files with cross-reference
1920 1920 streams which are stored in a binary format.
1921 1921  
1922   -@1@option@1@--show-object=trailer|obj[,gen]@2@option@2@
  1922 +:samp:`--show-object=trailer|obj[,gen]`
1923 1923 Show the contents of the given object. This is especially useful for
1924 1924 inspecting objects that are inside of object streams (also known as
1925 1925 "compressed objects").
1926 1926  
1927   -@1@option@1@--raw-stream-data@2@option@2@
1928   - When used along with the @1@option@1@--show-object@2@option@2@
  1927 +:samp:`--raw-stream-data`
  1928 + When used along with the :samp:`--show-object`
1929 1929 option, if the object is a stream, shows the raw stream data instead
1930 1930 of object's contents.
1931 1931  
1932   -@1@option@1@--filtered-stream-data@2@option@2@
1933   - When used along with the @1@option@1@--show-object@2@option@2@
  1932 +:samp:`--filtered-stream-data`
  1933 + When used along with the :samp:`--show-object`
1934 1934 option, if the object is a stream, shows the filtered stream data
1935 1935 instead of object's contents. If the stream is filtered using filters
1936 1936 that qpdf does not support, an error will be issued.
1937 1937  
1938   -@1@option@1@--show-npages@2@option@2@
  1938 +:samp:`--show-npages`
1939 1939 Prints the number of pages in the input file on a line by itself.
1940 1940 Since the number of pages appears by itself on a line, this option
1941 1941 can be useful for scripting if you need to know the number of pages
1942 1942 in a file.
1943 1943  
1944   -@1@option@1@--show-pages@2@option@2@
  1944 +:samp:`--show-pages`
1945 1945 Shows the object and generation number for each page dictionary
1946 1946 object and for each content stream associated with the page. Having
1947 1947 this information makes it more convenient to inspect objects from a
1948 1948 particular page.
1949 1949  
1950   -@1@option@1@--with-images@2@option@2@
1951   - When used along with @1@option@1@--show-pages@2@option@2@, also shows
  1950 +:samp:`--with-images`
  1951 + When used along with :samp:`--show-pages`, also shows
1952 1952 the object and generation numbers for the image objects on each page.
1953 1953 (At present, information about images in shared resource dictionaries
1954 1954 are not output by this command. This is discussed in a comment in the
1955 1955 source code.)
1956 1956  
1957   -@1@option@1@--json@2@option@2@
  1957 +:samp:`--json`
1958 1958 Generate a JSON representation of the file. This is described in
1959 1959 depth in `QPDF JSON <#ref.json>`__
1960 1960  
1961   -@1@option@1@--json-help@2@option@2@
  1961 +:samp:`--json-help`
1962 1962 Describe the format of the JSON output.
1963 1963  
1964   -@1@option@1@--json-key=key@2@option@2@
  1964 +:samp:`--json-key=key`
1965 1965 This option is repeatable. If specified, only top-level keys
1966 1966 specified will be included in the JSON output. If not specified, all
1967 1967 keys will be shown.
1968 1968  
1969   -@1@option@1@--json-object=trailer|obj[,gen]@2@option@2@
  1969 +:samp:`--json-object=trailer|obj[,gen]`
1970 1970 This option is repeatable. If specified, only specified objects will
1971 1971 be shown in the "``objects``" key of the JSON output. If absent, all
1972 1972 objects will be shown.
1973 1973  
1974   -@1@option@1@--check@2@option@2@
  1974 +:samp:`--check`
1975 1975 Checks file structure and well as encryption, linearization, and
1976 1976 encoding of stream data. A file for which
1977   - @1@option@1@--check@2@option@2@ reports no errors may still have
  1977 + :samp:`--check` reports no errors may still have
1978 1978 errors in stream data content but should otherwise be structurally
1979   - sound. If @1@option@1@--check@2@option@2@ any errors, qpdf will exit
  1979 + sound. If :samp:`--check` any errors, qpdf will exit
1980 1980 with a status of 2. There are some recoverable conditions that
1981   - @1@option@1@--check@2@option@2@ detects. These are issued as warnings
  1981 + :samp:`--check` detects. These are issued as warnings
1982 1982 instead of errors. If qpdf finds no errors but finds warnings, it
1983 1983 will exit with a status of 3 (as of versionย 2.0.4). When
1984   - @1@option@1@--check@2@option@2@ is combined with other options,
  1984 + :samp:`--check` is combined with other options,
1985 1985 checks are always performed before any other options are processed.
1986   - For erroneous files, @1@option@1@--check@2@option@2@ will cause qpdf
  1986 + For erroneous files, :samp:`--check` will cause qpdf
1987 1987 to attempt to recover, after which other options are effectively
1988 1988 operating on the recovered file. Combining
1989   - @1@option@1@--check@2@option@2@ with other options in this way can be
  1989 + :samp:`--check` with other options in this way can be
1990 1990 useful for manually recovering severely damaged files. Note that
1991   - @1@option@1@--check@2@option@2@ produces no output to standard output
  1991 + :samp:`--check` produces no output to standard output
1992 1992 when everything is valid, so if you are using this to
1993 1993 programmatically validate files in bulk, it is safe to run without
1994 1994 output redirected to :file:`/dev/null` and just
1995 1995 check for a 0 exit code.
1996 1996  
1997   -The @1@option@1@--raw-stream-data@2@option@2@ and
1998   -@1@option@1@--filtered-stream-data@2@option@2@ options are ignored
1999   -unless @1@option@1@--show-object@2@option@2@ is given. Either of these
  1997 +The :samp:`--raw-stream-data` and
  1998 +:samp:`--filtered-stream-data` options are ignored
  1999 +unless :samp:`--show-object` is given. Either of these
2000 2000 options will cause the stream data to be written to standard output. In
2001 2001 order to avoid commingling of stream data with other output, it is
2002 2002 recommend that these objects not be combined with other test/inspection
2003 2003 options.
2004 2004  
2005   -If @1@option@1@--filtered-stream-data@2@option@2@ is given and
2006   -@1@option@1@--normalize-content=y@2@option@2@ is also given, qpdf will
  2005 +If :samp:`--filtered-stream-data` is given and
  2006 +:samp:`--normalize-content=y` is also given, qpdf will
2007 2007 attempt to normalize the stream data as if it is a page content stream.
2008 2008 This attempt will be made even if it is not a page content stream, in
2009 2009 which case it will produce unusable results.
... ... @@ -2055,23 +2055,23 @@ would contain strings of even numbers of characters that alternate
2055 2055 between accented letters and symbols. In the extremely unlikely event
2056 2056 that you are intentionally using such passwords and qpdf is thwarting
2057 2057 you by interpreting them as UTF-8, you can use
2058   -@1@option@1@--password-mode=bytes@2@option@2@ to suppress qpdf's
  2058 +:samp:`--password-mode=bytes` to suppress qpdf's
2059 2059 automatic behavior.
2060 2060  
2061   -The @1@option@1@--password-mode@2@option@2@ option, as described earlier
  2061 +The :samp:`--password-mode` option, as described earlier
2062 2062 in this chapter, can be used to change qpdf's interpretation of supplied
2063 2063 passwords. There are very few reasons to use this option. One would be
2064 2064 the unlikely case described in the previous paragraph in which the
2065 2065 supplied password happens to be valid UTF-8 but isn't supposed to be
2066 2066 UTF-8. Your best bet would be just to provide the password as a valid
2067 2067 UTF-8 string, but you could also use
2068   -@1@option@1@--password-mode=bytes@2@option@2@. Another reason to use
2069   -@1@option@1@--password-mode=bytes@2@option@2@ would be to intentionally
  2068 +:samp:`--password-mode=bytes`. Another reason to use
  2069 +:samp:`--password-mode=bytes` would be to intentionally
2070 2070 generate PDF files encrypted with passwords that are not properly
2071 2071 encoded. The qpdf test suite does this to generate invalid files for the
2072 2072 purpose of testing its password recovery capability. If you were trying
2073 2073 to create intentionally incorrect files for a similar purposes, the
2074   -@1@option@1@bytes@2@option@2@ password mode can enable you to do this.
  2074 +:samp:`bytes` password mode can enable you to do this.
2075 2075  
2076 2076 When qpdf attempts to decrypt a file with a password that contains
2077 2077 non-ASCII characters, it will generate a list of alternative passwords
... ... @@ -2089,7 +2089,7 @@ recovery methods should make qpdf transparently open most encrypted
2089 2089 files with the password supplied correctly but in the wrong coding
2090 2090 system. There are no real downsides to this behavior, but if you don't
2091 2091 want qpdf to do this, you can use the
2092   -@1@option@1@--suppress-password-recovery@2@option@2@ option. One reason
  2092 +:samp:`--suppress-password-recovery` option. One reason
2093 2093 to do that is to ensure that you know the exact password that was used
2094 2094 to encrypt the file.
2095 2095  
... ... @@ -2105,7 +2105,7 @@ will be addressed in a future version of qpdf. The ``QPDFWriter``
2105 2105 methods that enable encryption on the output file accept passwords as
2106 2106 strings of bytes.
2107 2107  
2108   -Please note that the @1@option@1@--password-is-hex-key@2@option@2@
  2108 +Please note that the :samp:`--password-is-hex-key`
2109 2109 option is unrelated to all this. This flag bypasses the normal process
2110 2110 of going from password to encryption string entirely, allowing the raw
2111 2111 encryption key to be specified directly. This is useful for forensic
... ... @@ -2315,12 +2315,12 @@ cryptography algorithm, and MD5, which is a weak hashing algorithm. In
2315 2315 version 10.4, qpdf generates warnings for some (but not all) cases of
2316 2316 writing files with weak cryptography when invoked from the command-line.
2317 2317 These warnings can be suppressed using the
2318   -@1@option@1@--allow-weak-crypto@2@option@2@ option.
  2318 +:samp:`--allow-weak-crypto` option.
2319 2319  
2320 2320 It is planned for qpdf version 11 to be stricter, making it an error to
2321 2321 write files with insecure cryptography from the command-line tool in
2322 2322 most cases without specifying the
2323   -@1@option@1@--allow-weak-crypto@2@option@2@ flag and also to require
  2323 +:samp:`--allow-weak-crypto` flag and also to require
2324 2324 explicit steps when using the C++ library to enable use of insecure
2325 2325 cryptography.
2326 2326  
... ... @@ -2387,7 +2387,7 @@ Compatibility
2387 2387  
2388 2388 Documentation
2389 2389 The :command:`qpdf` command can be invoked with the
2390   - @1@option@1@--json-help@2@option@2@ option. This will output a JSON
  2390 + :samp:`--json-help` option. This will output a JSON
2391 2391 structure that has the same structure as the JSON output that qpdf
2392 2392 generates, except that each field in the help output is a description
2393 2393 of the corresponding field in the JSON output. The specific
... ... @@ -2470,7 +2470,7 @@ There are a few limitations to be aware of with the JSON structure:
2470 2470 encoding. In other words, it's best if you don't try to use the JSON
2471 2471 format to extract binary strings from the PDF file, but if you really
2472 2472 had to, it could be done. Note that qpdf's
2473   - @1@option@1@--show-object@2@option@2@ option does not have this
  2473 + :samp:`--show-object` option does not have this
2474 2474 limitation and will reveal the string as encoded in the original
2475 2475 file.
2476 2476  
... ... @@ -2486,9 +2486,9 @@ be aware of:
2486 2486 - While qpdf guarantees that keys present in the help will be present
2487 2487 in the output, those fields may be null or empty if the information
2488 2488 is not known or absent in the file. Also, if you specify
2489   - @1@option@1@--json-keys@2@option@2@, the keys that are not listed
  2489 + :samp:`--json-keys`, the keys that are not listed
2490 2490 will be excluded entirely except for those that
2491   - @1@option@1@--json-help@2@option@2@ says are always present.
  2491 + :samp:`--json-help` says are always present.
2492 2492  
2493 2493 - In a few places, there are keys with names containing
2494 2494 ``pageposfrom1``. The values of these keys are null or an integer. If
... ... @@ -2504,7 +2504,7 @@ be aware of:
2504 2504  
2505 2505 - The image information included in the ``page`` section of the JSON
2506 2506 output includes the key "``filterable``". Note that the value of this
2507   - field may depend on the @1@option@1@--decode-level@2@option@2@ that
  2507 + field may depend on the :samp:`--decode-level` that
2508 2508 you invoke qpdf with. The JSON output includes a top-level key
2509 2509 "``parameters``" that indicates the decode level used for computing
2510 2510 whether a stream was filterable. For example, jpeg images will be
... ... @@ -3630,8 +3630,8 @@ Implementation Notes
3630 3630 --------------------
3631 3631  
3632 3632 There are three modes for writing object streams:
3633   -@1@option@1@disable@2@option@2@, @1@option@1@preserve@2@option@2@, and
3634   -@1@option@1@generate@2@option@2@. In disable mode, we do not generate
  3633 +:samp:`disable`, :samp:`preserve`, and
  3634 +:samp:`generate`. In disable mode, we do not generate
3635 3635 any object streams, and we also generate an xref table rather than xref
3636 3636 streams. This can be used to generate PDF files that are viewable with
3637 3637 older readers. In preserve mode, we write object streams such that
... ... @@ -3642,7 +3642,7 @@ ourselves by grouping objects that are allowed in object streams
3642 3642 together in sets of no more than 100 objects. We also ensure that the
3643 3643 PDF version is at least 1.5 in generate mode, but we preserve the
3644 3644 version header in the other modes. The default is
3645   -@1@option@1@preserve@2@option@2@.
  3645 +:samp:`preserve`.
3646 3646  
3647 3647 We do not support creation of hybrid files. When we write files, even in
3648 3648 preserve mode, we will lose any xref tables and merge any appended
... ... @@ -3697,7 +3697,7 @@ For a detailed list of changes, please see the file
3697 3697 - Handling of Weak Cryptography Algorithms
3698 3698  
3699 3699 - From the qpdf CLI, the
3700   - @1@option@1@--allow-weak-crypto@2@option@2@ is now required to
  3700 + :samp:`--allow-weak-crypto` is now required to
3701 3701 suppress a warning when explicitly creating PDF files using RC4
3702 3702 encryption. While qpdf will always retain the ability to read
3703 3703 and write such files, doing so will require explicit
... ... @@ -3716,7 +3716,7 @@ For a detailed list of changes, please see the file
3716 3716 (with no resource dictionary).
3717 3717  
3718 3718 - Fix crash that could occur under certain conditions when using
3719   - @1@option@1@--pages@2@option@2@ with files that had form
  3719 + :samp:`--pages` with files that had form
3720 3720 fields.
3721 3721  
3722 3722 - Library Enhancements
... ... @@ -3735,7 +3735,7 @@ For a detailed list of changes, please see the file
3735 3735 - CLI Enhancements
3736 3736  
3737 3737 - Improve diagnostics around parsing
3738   - @1@option@1@--pages@2@option@2@ command-line options
  3738 + :samp:`--pages` command-line options
3739 3739  
3740 3740 - Packaging Changes
3741 3741  
... ... @@ -3747,7 +3747,7 @@ For a detailed list of changes, please see the file
3747 3747  
3748 3748 - When generating a file while preserving object streams,
3749 3749 unreferenced objects are correctly removed unless
3750   - @1@option@1@--preserve-unreferenced@2@option@2@ is specified.
  3750 + :samp:`--preserve-unreferenced` is specified.
3751 3751  
3752 3752 - Library Enhancements
3753 3753  
... ... @@ -3810,19 +3810,19 @@ For a detailed list of changes, please see the file
3810 3810  
3811 3811 - Operations that work on combining pages are much better about
3812 3812 protecting form fields. In particular,
3813   - @1@option@1@--split-pages@2@option@2@ and
3814   - @1@option@1@--pages@2@option@2@ now preserve interaction form
  3813 + :samp:`--split-pages` and
  3814 + :samp:`--pages` now preserve interaction form
3815 3815 functionality by copying the relevant form field information
3816 3816 from the original files. Additionally, if you use
3817   - @1@option@1@--pages@2@option@2@ to select only some pages from
  3817 + :samp:`--pages` to select only some pages from
3818 3818 the original input file, unused form fields are removed, which
3819 3819 prevents lots of unused annotations from being retained.
3820 3820  
3821 3821 - By default, :command:`qpdf` no longer allows
3822 3822 creation of encrypted PDF files whose user password is
3823 3823 non-empty and owner password is empty when a 256-bit key is in
3824   - use. The @1@option@1@--allow-insecure@2@option@2@ option,
3825   - specified inside the @1@option@1@--encrypt@2@option@2@ options,
  3824 + use. The :samp:`--allow-insecure` option,
  3825 + specified inside the :samp:`--encrypt` options,
3826 3826 allows creation of such files. Behavior changes in the CLI are
3827 3827 avoided when possible, but an exception was made here because
3828 3828 this is security-related. qpdf must always allow creation of
... ... @@ -3864,7 +3864,7 @@ For a detailed list of changes, please see the file
3864 3864 Files/Attachments Options <#ref.attachments>`__ for details.
3865 3865  
3866 3866 - Page splitting and merging operations, as well as
3867   - @1@option@1@--flatten-rotation@2@option@2@, are better behaved
  3867 + :samp:`--flatten-rotation`, are better behaved
3868 3868 with respect to annotations and interactive form fields. In
3869 3869 most cases, interactive form field functionality and proper
3870 3870 formatting and functionality of annotations is preserved by
... ... @@ -3877,12 +3877,12 @@ For a detailed list of changes, please see the file
3877 3877 that is out of spec but that works in most viewers anyway).
3878 3878  
3879 3879 - The option
3880   - @1@option@1@--password-file=@1@replaceable@1@filename@2@replaceable@2@@2@option@2@
  3880 + :samp:`--password-file=@1@replaceable@1@filename@2@replaceable@2@`
3881 3881 can now be used to read the decryption password from a file.
3882 3882 You can use ``-`` as the file name to read the password from
3883 3883 standard input. This is an easier/more obvious way to read
3884 3884 passwords from files or standard input than using
3885   - @1@option@1@@file@2@option@2@ for this purpose.
  3885 + :samp:`@file` for this purpose.
3886 3886  
3887 3887 - Add some information about attachments to the json output, and
3888 3888 added ``attachments`` as an additional json key. The
... ... @@ -3893,12 +3893,12 @@ For a detailed list of changes, please see the file
3893 3893 extraction of attachments. More detailed information can be
3894 3894 obtained by following the reference to the file spec object.
3895 3895  
3896   - - Add numeric option to @1@option@1@--collate@2@option@2@. If
3897   - @1@option@1@--collate=@1@replaceable@1@n@2@replaceable@2@@2@option@2@
  3896 + - Add numeric option to :samp:`--collate`. If
  3897 + :samp:`--collate=@1@replaceable@1@n@2@replaceable@2@`
3898 3898 is given, take pages in groups of
3899 3899 @1@replaceable@1@n@2@replaceable@2@ from the given files.
3900 3900  
3901   - - It is now valid to provide @1@option@1@--rotate=0@2@option@2@
  3901 + - It is now valid to provide :samp:`--rotate=0`
3902 3902 to clear rotation from a page.
3903 3903  
3904 3904 - Library Enhancements
... ... @@ -3976,7 +3976,7 @@ For a detailed list of changes, please see the file
3976 3976  
3977 3977 - Bug Fixes
3978 3978  
3979   - - The @1@option@1@--flatten-rotation@2@option@2@ option applies
  3979 + - The :samp:`--flatten-rotation` option applies
3980 3980 transformations to any annotations that may be on the page.
3981 3981  
3982 3982 - If a form XObject lacks a resources dictionary, consider any
... ... @@ -3999,7 +3999,7 @@ For a detailed list of changes, please see the file
3999 3999 10.1.0: January 5, 2021
4000 4000 - CLI Enhancements
4001 4001  
4002   - - Add @1@option@1@--flatten-rotation@2@option@2@ command-line
  4002 + - Add :samp:`--flatten-rotation` command-line
4003 4003 option, which causes all pages that are rotated using
4004 4004 parameters in the page's dictionary to instead be identically
4005 4005 rotated in the page's contents. The change is not user-visible
... ... @@ -4119,7 +4119,7 @@ For a detailed list of changes, please see the file
4119 4119 - Bug Fixes
4120 4120  
4121 4121 - When concatenating content streams, as with
4122   - @1@option@1@--coalesce-contents@2@option@2@, there were cases
  4122 + :samp:`--coalesce-contents`, there were cases
4123 4123 in which qpdf would merge two lexical tokens together, creating
4124 4124 invalid results. A newline is now inserted between merged
4125 4125 content streams if one is not already present.
... ... @@ -4136,23 +4136,23 @@ For a detailed list of changes, please see the file
4136 4136 already ignored the user's locale for numeric conversion.
4137 4137  
4138 4138 - Fix several instances in which warnings were not suppressed in
4139   - spite of @1@option@1@--no-warn@2@option@2@ and/or errors or
  4139 + spite of :samp:`--no-warn` and/or errors or
4140 4140 warnings were written to standard output rather than standard
4141 4141 error.
4142 4142  
4143 4143 - Fixed a memory leak that could occur under specific
4144 4144 circumstances when
4145   - @1@option@1@--object-streams=generate@2@option@2@ was used.
  4145 + :samp:`--object-streams=generate` was used.
4146 4146  
4147 4147 - Fix various integer overflows and similar conditions found by
4148 4148 the OSS-Fuzz project.
4149 4149  
4150 4150 - Enhancements
4151 4151  
4152   - - New option @1@option@1@--warning-exit-0@2@option@2@ causes qpdf
  4152 + - New option :samp:`--warning-exit-0` causes qpdf
4153 4153 to exit with a status of ``0`` rather than ``3`` if there are
4154 4154 warnings but no errors. Combine with
4155   - @1@option@1@--no-warn@2@option@2@ to completely ignore
  4155 + :samp:`--no-warn` to completely ignore
4156 4156 warnings.
4157 4157  
4158 4158 - Performance improvements have been made to
... ... @@ -4163,7 +4163,7 @@ For a detailed list of changes, please see the file
4163 4163  
4164 4164 - Build Changes
4165 4165  
4166   - - The option @1@option@1@--disable-rpath@2@option@2@ is now
  4166 + - The option :samp:`--disable-rpath` is now
4167 4167 supported by qpdf's :command:`./configure`
4168 4168 script. Some distributions' packaging standards recommended the
4169 4169 use of this option.
... ... @@ -4265,7 +4265,7 @@ For a detailed list of changes, please see the file
4265 4265 :command:`qpdf --json-help` for details.
4266 4266  
4267 4267 - Add new option
4268   - @1@option@1@--remove-unreferenced-resources@2@option@2@ which
  4268 + :samp:`--remove-unreferenced-resources` which
4269 4269 takes ``auto``, ``yes``, or ``no`` as arguments. The new
4270 4270 ``auto`` mode, which is the default, performs a fast heuristic
4271 4271 over a PDF file when splitting pages to determine whether the
... ... @@ -4276,9 +4276,9 @@ For a detailed list of changes, please see the file
4276 4276 Options <#ref.advanced-transformation>`__ for a more detailed
4277 4277 discussion.
4278 4278  
4279   - - The @1@option@1@--preserve-unreferenced-resources@2@option@2@
  4279 + - The :samp:`--preserve-unreferenced-resources`
4280 4280 is now just a synonym for
4281   - @1@option@1@--remove-unreferenced-resources=no@2@option@2@.
  4281 + :samp:`--remove-unreferenced-resources=no`.
4282 4282  
4283 4283 - If the ``QPDF_EXECUTABLE`` environment variable is set when
4284 4284 invoking :command:`qpdf --bash-completion` or
... ... @@ -4370,8 +4370,8 @@ For a detailed list of changes, please see the file
4370 4370  
4371 4371 - CLI Enhancements
4372 4372  
4373   - - Added options @1@option@1@--is-encrypted@2@option@2@ and
4374   - @1@option@1@--requires-password@2@option@2@ for testing whether
  4373 + - Added options :samp:`--is-encrypted` and
  4374 + :samp:`--requires-password` for testing whether
4375 4375 a file is encrypted or requires a password other than the
4376 4376 supplied (or empty) password. These communicate via exit
4377 4377 status, making them useful for shell scripts. They also work on
... ... @@ -4380,7 +4380,7 @@ For a detailed list of changes, please see the file
4380 4380 - Added ``encrypt`` key to JSON options. With the exception of
4381 4381 the reconstructed user password for older encryption formats,
4382 4382 this provides the same information as
4383   - @1@option@1@--show-encryption@2@option@2@ but in a consistent,
  4383 + :samp:`--show-encryption` but in a consistent,
4384 4384 parseable format. See output of :command:`qpdf
4385 4385 --json-help` for details.
4386 4386  
... ... @@ -4388,7 +4388,7 @@ For a detailed list of changes, please see the file
4388 4388  
4389 4389 - In QDF mode, be sure not to write more than one XRef stream to
4390 4390 a file, even when
4391   - @1@option@1@--preserve-unreferenced@2@option@2@ is used.
  4391 + :samp:`--preserve-unreferenced` is used.
4392 4392 :command:`fix-qdf` assumes that there is only
4393 4393 one XRef stream, and that it appears at the end of the file.
4394 4394  
... ... @@ -4437,7 +4437,7 @@ For a detailed list of changes, please see the file
4437 4437  
4438 4438 - CLI Enhancements
4439 4439  
4440   - - Addition of the @1@option@1@--show-crypto@2@option@2@ option in
  4440 + - Addition of the :samp:`--show-crypto` option in
4441 4441 support of selectable crypto providers, as described in `Crypto
4442 4442 Providers <#ref.crypto>`__.
4443 4443  
... ... @@ -4452,7 +4452,7 @@ For a detailed list of changes, please see the file
4452 4452 - Bug Fix
4453 4453  
4454 4454 - Fix the name of the temporary file used by
4455   - @1@option@1@--replace-input@2@option@2@ so that it doesn't
  4455 + :samp:`--replace-input` so that it doesn't
4456 4456 require path splitting and works with paths include
4457 4457 directories.
4458 4458  
... ... @@ -4505,22 +4505,22 @@ For a detailed list of changes, please see the file
4505 4505  
4506 4506 - CLI Enhancements
4507 4507  
4508   - - The @1@option@1@--replace-input@2@option@2@ option may be given
  4508 + - The :samp:`--replace-input` option may be given
4509 4509 in place of an output file name. This causes qpdf to overwrite
4510 4510 the input file with the output. See the description of
4511   - @1@option@1@--replace-input@2@option@2@ in `Basic
  4511 + :samp:`--replace-input` in `Basic
4512 4512 Options <#ref.basic-options>`__ for more details.
4513 4513  
4514   - - The @1@option@1@--recompress-flate@2@option@2@ instructs
  4514 + - The :samp:`--recompress-flate` instructs
4515 4515 :command:`qpdf` to recompress streams that are
4516 4516 already compressed with ``/FlateDecode``. Useful with
4517   - @1@option@1@--compression-level@2@option@2@.
  4517 + :samp:`--compression-level`.
4518 4518  
4519 4519 - The
4520   - @1@option@1@--compression-level=@1@replaceable@1@level@2@replaceable@2@@2@option@2@
  4520 + :samp:`--compression-level=@1@replaceable@1@level@2@replaceable@2@`
4521 4521 sets the zlib compression level used for any streams compressed
4522 4522 by ``/FlateDecode``. Most effective when combined with
4523   - @1@option@1@--recompress-flate@2@option@2@.
  4523 + :samp:`--recompress-flate`.
4524 4524  
4525 4525 - Library Enhancements
4526 4526  
... ... @@ -4614,8 +4614,8 @@ For a detailed list of changes, please see the file
4614 4614 a file with linearization warnings but not errors, it now
4615 4615 properly exits with exit code 3 instead of 2.
4616 4616  
4617   - - The @1@option@1@--completion-bash@2@option@2@ and
4618   - @1@option@1@--completion-zsh@2@option@2@ options now work
  4617 + - The :samp:`--completion-bash` and
  4618 + :samp:`--completion-zsh` options now work
4619 4619 properly when qpdf is invoked as an AppImage.
4620 4620  
4621 4621 - Calling ``QPDFWriter::set*EncryptionParameters`` on a
... ... @@ -4630,7 +4630,7 @@ For a detailed list of changes, please see the file
4630 4630 - Build Changes
4631 4631  
4632 4632 - On platforms that support it, qpdf now builds with
4633   - @1@option@1@-fvisibility=hidden@2@option@2@. If you build qpdf
  4633 + :samp:`-fvisibility=hidden`. If you build qpdf
4634 4634 with your own build system, this is now safe to use. This
4635 4635 prevents methods that are not part of the public API from being
4636 4636 exported by the shared library, and makes qpdf's ELF shared
... ... @@ -4679,7 +4679,7 @@ For a detailed list of changes, please see the file
4679 4679 qpdf than the library, which may indicate a problem with the
4680 4680 installation.
4681 4681  
4682   - - New option @1@option@1@--remove-page-labels@2@option@2@ will
  4682 + - New option :samp:`--remove-page-labels` will
4683 4683 remove page labels before generating output. This used to
4684 4684 happen if you ran :command:`qpdf --empty --pages ..
4685 4685 --`, but the behavior changed in qpdf 8.3.0. This
... ... @@ -4687,7 +4687,7 @@ For a detailed list of changes, please see the file
4687 4687 get it again.
4688 4688  
4689 4689 - New option
4690   - @1@option@1@--keep-files-open-threshold=@1@replaceable@1@count@2@replaceable@2@@2@option@2@
  4690 + :samp:`--keep-files-open-threshold=@1@replaceable@1@count@2@replaceable@2@`
4691 4691 can be used to override number of files that qpdf will use to
4692 4692 trigger the behavior of not keeping all files open when merging
4693 4693 files. This may be necessary if your system allows fewer than
... ... @@ -4706,7 +4706,7 @@ For a detailed list of changes, please see the file
4706 4706 during page splitting operations.
4707 4707  
4708 4708 - Revert change that included preservation of outlines
4709   - (bookmarks) in @1@option@1@--split-pages@2@option@2@. The way
  4709 + (bookmarks) in :samp:`--split-pages`. The way
4710 4710 it was implemented in 8.3.0 and 8.4.0 caused a very significant
4711 4711 degradation of performance for splitting certain files. A
4712 4712 future release of qpdf may re-introduce the behavior in a more
... ... @@ -4759,17 +4759,17 @@ For a detailed list of changes, please see the file
4759 4759 depth in `Unicode Passwords <#ref.unicode-passwords>`__.
4760 4760  
4761 4761 - New options
4762   - @1@option@1@--externalize-inline-images@2@option@2@,
4763   - @1@option@1@--ii-min-bytes@2@option@2@, and
4764   - @1@option@1@--keep-inline-images@2@option@2@ control qpdf's
  4762 + :samp:`--externalize-inline-images`,
  4763 + :samp:`--ii-min-bytes`, and
  4764 + :samp:`--keep-inline-images` control qpdf's
4765 4765 handling of inline images and possible conversion of them to
4766 4766 regular images. By default,
4767   - @1@option@1@--optimize-images@2@option@2@ now also applies to
  4767 + :samp:`--optimize-images` now also applies to
4768 4768 inline images. These options are discussed in `Advanced
4769 4769 Transformation Options <#ref.advanced-transformation>`__.
4770 4770  
4771   - - Add options @1@option@1@--overlay@2@option@2@ and
4772   - @1@option@1@--underlay@2@option@2@ for overlaying or
  4771 + - Add options :samp:`--overlay` and
  4772 + :samp:`--underlay` for overlaying or
4773 4773 underlaying pages of other files onto output pages. See
4774 4774 `Overlay and Underlay Options <#ref.overlay-underlay>`__ for
4775 4775 details.
... ... @@ -4779,33 +4779,33 @@ For a detailed list of changes, please see the file
4779 4779 non-ASCII characters, qpdf will try a number of alternative
4780 4780 passwords to try to compensate for possible character encoding
4781 4781 errors. This behavior can be suppressed with the
4782   - @1@option@1@--suppress-password-recovery@2@option@2@ option.
  4782 + :samp:`--suppress-password-recovery` option.
4783 4783 See `Unicode Passwords <#ref.unicode-passwords>`__ for a full
4784 4784 discussion.
4785 4785  
4786   - - Add the @1@option@1@--password-mode@2@option@2@ option to
  4786 + - Add the :samp:`--password-mode` option to
4787 4787 fine-tune how qpdf interprets password arguments, especially
4788 4788 when they contain non-ASCII characters. See `Unicode
4789 4789 Passwords <#ref.unicode-passwords>`__ for more information.
4790 4790  
4791   - - In the @1@option@1@--pages@2@option@2@ option, it is now
  4791 + - In the :samp:`--pages` option, it is now
4792 4792 possible to copy the same page more than once from the same
4793 4793 file without using the previous workaround of specifying two
4794 4794 different paths to the same file.
4795 4795  
4796   - - In the @1@option@1@--pages@2@option@2@ option, allow use of "."
  4796 + - In the :samp:`--pages` option, allow use of "."
4797 4797 as a shortcut for the primary input file. That way, you can do
4798 4798 :command:`qpdf in.pdf --pages . 1-2 -- out.pdf`
4799 4799 instead of having to repeat :file:`in.pdf`
4800 4800 in the command.
4801 4801  
4802 4802 - When encrypting with 128-bit and 256-bit encryption, new
4803   - encryption options @1@option@1@--assemble@2@option@2@,
4804   - @1@option@1@--annotate@2@option@2@,
4805   - @1@option@1@--form@2@option@2@, and
4806   - @1@option@1@--modify-other@2@option@2@ allow more fine-grained
  4803 + encryption options :samp:`--assemble`,
  4804 + :samp:`--annotate`,
  4805 + :samp:`--form`, and
  4806 + :samp:`--modify-other` allow more fine-grained
4807 4807 granularity in configuring options. Before, the
4808   - @1@option@1@--modify@2@option@2@ option only configured certain
  4808 + :samp:`--modify` option only configured certain
4809 4809 predefined groups of permissions.
4810 4810  
4811 4811 - Bug Fixes and Enhancements
... ... @@ -4816,7 +4816,7 @@ For a detailed list of changes, please see the file
4816 4816 file's internal structure shared these resource lists across
4817 4817 pages and if some but not all of the pages in the output did
4818 4818 not reference all the fonts and images. Using the
4819   - @1@option@1@--preserve-unreferenced-resources@2@option@2@
  4819 + :samp:`--preserve-unreferenced-resources`
4820 4820 option would work around the incorrect behavior. This bug was
4821 4821 the result of a typo in the code and a deficiency in the test
4822 4822 suite. The case that triggered the error was known, just not
... ... @@ -4831,7 +4831,7 @@ For a detailed list of changes, please see the file
4831 4831 from files that have duplicate Page objects in the pages tree.
4832 4832  
4833 4833 - Using older option
4834   - @1@option@1@--stream-data=compress@2@option@2@ with object
  4834 + :samp:`--stream-data=compress` with object
4835 4835 streams, object streams and xref streams were not compressed.
4836 4836  
4837 4837 - When the tokenizer returns inline image tokens, delimiters
... ... @@ -4919,7 +4919,7 @@ For a detailed list of changes, please see the file
4919 4919 - Build Improvements
4920 4920  
4921 4921 - Add new configure option
4922   - @1@option@1@--enable-avoid-windows-handle@2@option@2@, which
  4922 + :samp:`--enable-avoid-windows-handle`, which
4923 4923 causes the preprocessor symbol ``AVOID_WINDOWS_HANDLE`` to be
4924 4924 defined. When defined, qpdf will avoid referencing the Windows
4925 4925 ``HANDLE`` type, which is disallowed with certain versions of
... ... @@ -4944,11 +4944,11 @@ For a detailed list of changes, please see the file
4944 4944  
4945 4945 - Page numbers (also known as page labels) are now preserved when
4946 4946 merging and splitting files with the
4947   - @1@option@1@--pages@2@option@2@ and
4948   - @1@option@1@--split-pages@2@option@2@ options.
  4947 + :samp:`--pages` and
  4948 + :samp:`--split-pages` options.
4949 4949  
4950 4950 - Bookmarks are partially preserved when splitting pages with the
4951   - @1@option@1@--split-pages@2@option@2@ option. Specifically, the
  4951 + :samp:`--split-pages` option. Specifically, the
4952 4952 outlines dictionary and some supporting metadata are copied
4953 4953 into the split files. The result is that all bookmarks from the
4954 4954 original file appear, those that point to pages that are
... ... @@ -4958,50 +4958,50 @@ For a detailed list of changes, please see the file
4958 4958 operations.
4959 4959  
4960 4960 - Page collation: add new option
4961   - @1@option@1@--collate@2@option@2@. When specified, the
4962   - semantics of @1@option@1@--pages@2@option@2@ change from
  4961 + :samp:`--collate`. When specified, the
  4962 + semantics of :samp:`--pages` change from
4963 4963 concatenation to collation. See `Page Selection
4964 4964 Options <#ref.page-selection>`__ for examples and discussion.
4965 4965  
4966 4966 - Generation of information in JSON format, primarily to
4967 4967 facilitate use of qpdf from languages other than C++. Add new
4968   - options @1@option@1@--json@2@option@2@,
4969   - @1@option@1@--json-key@2@option@2@, and
4970   - @1@option@1@--json-object@2@option@2@ to generate a JSON
  4968 + options :samp:`--json`,
  4969 + :samp:`--json-key`, and
  4970 + :samp:`--json-object` to generate a JSON
4971 4971 representation of the PDF file. Run :command:`qpdf
4972 4972 --json-help` to get a description of the JSON
4973 4973 format. For more information, see `QPDF JSON <#ref.json>`__.
4974 4974  
4975   - - The @1@option@1@--generate-appearances@2@option@2@ flag will
  4975 + - The :samp:`--generate-appearances` flag will
4976 4976 cause qpdf to generate appearances for form fields if the PDF
4977 4977 file indicates that form field appearances are out of date.
4978 4978 This can happen when PDF forms are filled in by a program that
4979 4979 doesn't know how to regenerate the appearances of the filled-in
4980 4980 fields.
4981 4981  
4982   - - The @1@option@1@--flatten-annotations@2@option@2@ flag can be
  4982 + - The :samp:`--flatten-annotations` flag can be
4983 4983 used to *flatten* annotations, including form fields.
4984 4984 Ordinarily, annotations are drawn separately from the page.
4985 4985 Flattening annotations is the process of combining their
4986 4986 appearances into the page's contents. You might want to do this
4987 4987 if you are going to rotate or combine pages using a tool that
4988 4988 doesn't understand about annotations. You may also want to use
4989   - @1@option@1@--generate-appearances@2@option@2@ when using this
  4989 + :samp:`--generate-appearances` when using this
4990 4990 flag since annotations for outdated form fields are not
4991 4991 flattened as that would cause loss of information.
4992 4992  
4993   - - The @1@option@1@--optimize-images@2@option@2@ flag tells qpdf
  4993 + - The :samp:`--optimize-images` flag tells qpdf
4994 4994 to recompresses every image using DCT (JPEG) compression as
4995 4995 long as the image is not already compressed with lossy
4996 4996 compression and recompressing the image reduces its size. The
4997   - additional options @1@option@1@--oi-min-width@2@option@2@,
4998   - @1@option@1@--oi-min-height@2@option@2@, and
4999   - @1@option@1@--oi-min-area@2@option@2@ prevent recompression of
  4997 + additional options :samp:`--oi-min-width`,
  4998 + :samp:`--oi-min-height`, and
  4999 + :samp:`--oi-min-area` prevent recompression of
5000 5000 images whose width, height, or pixel area (widthย ร—ย height) are
5001 5001 below a specified threshold.
5002 5002  
5003   - - The @1@option@1@--show-object@2@option@2@ option can now be
5004   - given as @1@option@1@--show-object=trailer@2@option@2@ to show
  5003 + - The :samp:`--show-object` option can now be
  5004 + given as :samp:`--show-object=trailer` to show
5005 5005 the trailer dictionary.
5006 5006  
5007 5007 - Bug Fixes and Enhancements
... ... @@ -5024,7 +5024,7 @@ For a detailed list of changes, please see the file
5024 5024 Instead, it issues a normal warning or error.
5025 5025  
5026 5026 - Ordinarily qpdf treats an argument of the form
5027   - @1@option@1@@file@2@option@2@ to mean that command-line options
  5027 + :samp:`@file` to mean that command-line options
5028 5028 should be read from :file:`file`. Now, if
5029 5029 :file:`file` does not exist but
5030 5030 :file:`@file` does, qpdf will treat
... ... @@ -5135,7 +5135,7 @@ For a detailed list of changes, please see the file
5135 5135 your packaging system automatically refreshes libtool or
5136 5136 autoconf files, it could cause this check to fail. To avoid
5137 5137 this problem, pass
5138   - @1@option@1@--disable-check-autofiles@2@option@2@ to
  5138 + :samp:`--disable-check-autofiles` to
5139 5139 :command:`configure`.
5140 5140  
5141 5141 - If you would like to have qpdf completion enabled
... ... @@ -5148,16 +5148,16 @@ For a detailed list of changes, please see the file
5148 5148 - Command-line Enhancements
5149 5149  
5150 5150 - Add
5151   - @1@option@1@--keep-files-open=@1@replaceable@1@[yn]@2@replaceable@2@@2@option@2@
  5151 + :samp:`--keep-files-open=@1@replaceable@1@[yn]@2@replaceable@2@`
5152 5152 to override default determination of whether to keep files open
5153 5153 when merging. Please see the discussion of
5154   - @1@option@1@--keep-files-open@2@option@2@ in `Basic
  5154 + :samp:`--keep-files-open` in `Basic
5155 5155 Options <#ref.basic-options>`__ for additional details.
5156 5156  
5157 5157 8.2.0: August 16, 2018
5158 5158 - Command-line Enhancements
5159 5159  
5160   - - Add @1@option@1@--no-warn@2@option@2@ option to suppress
  5160 + - Add :samp:`--no-warn` option to suppress
5161 5161 issuing warning messages. If there are any conditions that
5162 5162 would have caused warnings to be issued, the exit status is
5163 5163 still 3.
... ... @@ -5177,7 +5177,7 @@ For a detailed list of changes, please see the file
5177 5177 - Bug fix: end of line characters were not properly handled
5178 5178 inside strings in some cases.
5179 5179  
5180   - - Bug fix: using @1@option@1@--progress@2@option@2@ on very small
  5180 + - Bug fix: using :samp:`--progress` on very small
5181 5181 files could cause an infinite loop.
5182 5182  
5183 5183 - API enhancements
... ... @@ -5217,7 +5217,7 @@ For a detailed list of changes, please see the file
5217 5217 old behavior should be desired, or if you have a case where
5218 5218 page splitting is very slow, the old behavior (and speed) can
5219 5219 be enabled by specifying
5220   - @1@option@1@--preserve-unreferenced-resources@2@option@2@. For
  5220 + :samp:`--preserve-unreferenced-resources`. For
5221 5221 additional details, please see `Advanced Transformation
5222 5222 Options <#ref.advanced-transformation>`__.
5223 5223  
... ... @@ -5226,19 +5226,19 @@ For a detailed list of changes, please see the file
5226 5226 that may exceed the operating system's limit for the maximum
5227 5227 number of open files.
5228 5228  
5229   - - The @1@option@1@--rotate@2@option@2@ option's syntax has been
  5229 + - The :samp:`--rotate` option's syntax has been
5230 5230 extended to make the page range optional. If you specify
5231   - @1@option@1@--rotate=@1@replaceable@1@angle@2@replaceable@2@@2@option@2@
  5231 + :samp:`--rotate=@1@replaceable@1@angle@2@replaceable@2@`
5232 5232 without specifying a page range, the rotation will be applied
5233 5233 to all pages. This can be especially useful for adjusting a PDF
5234 5234 created from a multi-page document that was scanned upside
5235 5235 down.
5236 5236  
5237 5237 - When merging multiple files, the
5238   - @1@option@1@--verbose@2@option@2@ option now prints information
  5238 + :samp:`--verbose` option now prints information
5239 5239 about each file as it operates on that file.
5240 5240  
5241   - - When the @1@option@1@--progress@2@option@2@ option is
  5241 + - When the :samp:`--progress` option is
5242 5242 specified, qpdf will print a running indicator of its best
5243 5243 guess at how far through the writing process it is. Note that,
5244 5244 as with all progress meters, it's an approximation. This option
... ... @@ -5294,7 +5294,7 @@ For a detailed list of changes, please see the file
5294 5294 it thinks it is through writing its output. Client programs can
5295 5295 use this to implement reasonably accurate progress meters. The
5296 5296 :command:`qpdf` command line tool uses this to
5297   - implement its @1@option@1@--progress@2@option@2@ option.
  5297 + implement its :samp:`--progress` option.
5298 5298  
5299 5299 - New methods ``QPDFObjectHandle::newUnicodeString`` and
5300 5300 ``QPDFObject::unparseBinary`` have been added to allow for more
... ... @@ -5352,10 +5352,10 @@ For a detailed list of changes, please see the file
5352 5352 `Running QPDF <#ref.using>`__.
5353 5353  
5354 5354 - The option
5355   - @1@option@1@--linearize-pass1=@1@replaceable@1@file@2@replaceable@2@@2@option@2@
  5355 + :samp:`--linearize-pass1=@1@replaceable@1@file@2@replaceable@2@`
5356 5356 has been added for debugging qpdf's linearization code.
5357 5357  
5358   - - The option @1@option@1@--coalesce-contents@2@option@2@ can be
  5358 + - The option :samp:`--coalesce-contents` can be
5359 5359 used to combine content streams of a page whose contents are an
5360 5360 array of streams into a single stream.
5361 5361  
... ... @@ -5404,7 +5404,7 @@ For a detailed list of changes, please see the file
5404 5404 password when opening encrypted files, and will optionally display
5405 5405 the encryption key used by a file. This is a non-standard
5406 5406 operation, but it can be useful in certain situations. Please see
5407   - the discussion of @1@option@1@--password-is-hex-key@2@option@2@ in
  5407 + the discussion of :samp:`--password-is-hex-key` in
5408 5408 `Basic Options <#ref.basic-options>`__ or the comments around
5409 5409 ``QPDF::setPasswordIsHexKey`` in
5410 5410 :file:`QPDF.hh` for additional details.
... ... @@ -5442,8 +5442,8 @@ For a detailed list of changes, please see the file
5442 5442 or RunLength encoding. Library API enhancements and
5443 5443 command-line options have been added to control this behavior.
5444 5444 See command-line options
5445   - @1@option@1@--compress-streams@2@option@2@ and
5446   - @1@option@1@--decode-level@2@option@2@ and methods
  5445 + :samp:`--compress-streams` and
  5446 + :samp:`--decode-level` and methods
5447 5447 ``QPDFWriter::setCompressStreams`` and
5448 5448 ``QPDFWriter::setDecodeLevel``.
5449 5449  
... ... @@ -5469,27 +5469,27 @@ For a detailed list of changes, please see the file
5469 5469 input using ``@file`` or ``@-`` syntax. Please see `Basic
5470 5470 Invocation <#ref.invocation>`__.
5471 5471  
5472   - - @1@option@1@--rotate@2@option@2@: request page rotation
  5472 + - :samp:`--rotate`: request page rotation
5473 5473  
5474   - - @1@option@1@--newline-before-endstream@2@option@2@: ensure that
  5474 + - :samp:`--newline-before-endstream`: ensure that
5475 5475 a newline appears before every ``endstream`` keyword in the
5476 5476 file; used to prevent qpdf from breaking PDF/A compliance on
5477 5477 already compliant files.
5478 5478  
5479   - - @1@option@1@--preserve-unreferenced@2@option@2@: preserve
  5479 + - :samp:`--preserve-unreferenced`: preserve
5480 5480 unreferenced objects in the input PDF
5481 5481  
5482   - - @1@option@1@--split-pages@2@option@2@: break output into chunks
  5482 + - :samp:`--split-pages`: break output into chunks
5483 5483 with fixed numbers of pages
5484 5484  
5485   - - @1@option@1@--verbose@2@option@2@: print the name of each
  5485 + - :samp:`--verbose`: print the name of each
5486 5486 output file that is created
5487 5487  
5488   - - @1@option@1@--compress-streams@2@option@2@ and
5489   - @1@option@1@--decode-level@2@option@2@ replace
5490   - @1@option@1@--stream-data@2@option@2@ for improving granularity
  5488 + - :samp:`--compress-streams` and
  5489 + :samp:`--decode-level` replace
  5490 + :samp:`--stream-data` for improving granularity
5491 5491 of controlling compression and decompression of stream data.
5492   - The @1@option@1@--stream-data@2@option@2@ option will remain
  5492 + The :samp:`--stream-data` option will remain
5493 5493 available.
5494 5494  
5495 5495 - When running :command:`qpdf --check` with other
... ... @@ -5500,8 +5500,8 @@ For a detailed list of changes, please see the file
5500 5500 reference table, or other similar operations.
5501 5501  
5502 5502 - Process :command:`--pages` earlier so that other
5503   - options like @1@option@1@--show-pages@2@option@2@ or
5504   - @1@option@1@--split-pages@2@option@2@ can operate on the file
  5503 + options like :samp:`--show-pages` or
  5504 + :samp:`--split-pages` can operate on the file
5505 5505 after page splitting/merging has occurred.
5506 5506  
5507 5507 - API Changes. All new API calls are documented in their respective
... ... @@ -5534,7 +5534,7 @@ For a detailed list of changes, please see the file
5534 5534 ``QPDFWriter`` methods.
5535 5535  
5536 5536 6.0.0: November 10, 2015
5537   - - Implement @1@option@1@--deterministic-id@2@option@2@ command-line
  5537 + - Implement :samp:`--deterministic-id` command-line
5538 5538 option and ``QPDFWriter::setDeterministicID`` as well as C API
5539 5539 function ``qpdf_set_deterministic_ID`` for generating a
5540 5540 deterministic ID for non-encrypted files. When this option is
... ... @@ -5618,11 +5618,11 @@ For a detailed list of changes, please see the file
5618 5618 Windows build, this results in an added dependency on Microsoft's
5619 5619 cryptography API. To disable the OS-specific cryptography and use
5620 5620 the old version, pass the
5621   - @1@option@1@--enable-insecure-random@2@option@2@ option to
  5621 + :samp:`--enable-insecure-random` option to
5622 5622 :command:`./configure`.
5623 5623  
5624 5624 - The :command:`qpdf` command-line tool now issues a
5625   - warning when @1@option@1@-accessibility=n@2@option@2@ is specified
  5625 + warning when :samp:`-accessibility=n` is specified
5626 5626 for newer encryption versions stating that the option is ignored.
5627 5627 qpdf, per the spec, has always ignored this flag, but it
5628 5628 previously did so silently. This warning is issued only by the
... ... @@ -5647,12 +5647,12 @@ For a detailed list of changes, please see the file
5647 5647 :file:`QPDFObjectHandle.hh` for additional
5648 5648 notes.
5649 5649  
5650   - - Add @1@option@1@--show-npages@2@option@2@ command-line option to
  5650 + - Add :samp:`--show-npages` command-line option to
5651 5651 the :command:`qpdf` command to show the number of
5652 5652 pages in a file.
5653 5653  
5654 5654 - Allow omission of the page range within
5655   - @1@option@1@--pages@2@option@2@ for the
  5655 + :samp:`--pages` for the
5656 5656 :command:`qpdf` command. When omitted, the page
5657 5657 range is implicitly taken to be all the pages in the file.
5658 5658  
... ... @@ -5701,7 +5701,7 @@ For a detailed list of changes, please see the file
5701 5701 - Warning flags have been moved into a separate variable in
5702 5702 :file:`autoconf.mk`
5703 5703  
5704   - - The configure flag @1@option@1@--enable-werror@2@option@2@ work
  5704 + - The configure flag :samp:`--enable-werror` work
5705 5705 for Microsoft compilers
5706 5706  
5707 5707 - All MSVC CRT security warnings have been resolved.
... ... @@ -5837,12 +5837,12 @@ For a detailed list of changes, please see the file
5837 5837 ``QPDFWriter``.
5838 5838  
5839 5839 - Removed the method ``decodeStreams``. This method was used by
5840   - the @1@option@1@--check@2@option@2@ option of the
  5840 + the :samp:`--check` option of the
5841 5841 :command:`qpdf` command-line tool to force all
5842 5842 streams in the file to be decoded, but it also suffered from
5843 5843 the problem of opening otherwise unreferenced streams and thus
5844 5844 could report false positive. The
5845   - @1@option@1@--check@2@option@2@ option now causes qpdf to go
  5845 + :samp:`--check` option now causes qpdf to go
5846 5846 through all the motions of writing a new file based on the
5847 5847 original one, so it will always reference and check exactly
5848 5848 those parts of a file that any ordinary viewer would check.
... ... @@ -5951,7 +5951,7 @@ For a detailed list of changes, please see the file
5951 5951 - When building on a platform that supports ELF shared libraries
5952 5952 (such as Linux), symbol versions are enabled by default. They can
5953 5953 be disabled by passing
5954   - @1@option@1@--disable-ld-version-script@2@option@2@ to
  5954 + :samp:`--disable-ld-version-script` to
5955 5955 :command:`./configure`.
5956 5956  
5957 5957 - The file :file:`libqpdf.pc` is now installed
... ... @@ -5972,7 +5972,7 @@ For a detailed list of changes, please see the file
5972 5972 terminal anymore by default. Instead, find them in
5973 5973 :file:`build/qtest.log`. For packagers who are
5974 5974 building with an autobuilder, you can add the
5975   - @1@option@1@--enable-show-failed-test-output@2@option@2@ option to
  5975 + :samp:`--enable-show-failed-test-output` option to
5976 5976 :command:`./configure` to restore the old behavior.
5977 5977  
5978 5978 2.3.1: December 28, 2011
... ... @@ -6180,7 +6180,7 @@ For a detailed list of changes, please see the file
6180 6180 permissions, it does make them available so that applications that
6181 6181 use qpdf can enforce permissions.
6182 6182  
6183   - - The @1@option@1@--check@2@option@2@ option to
  6183 + - The :samp:`--check` option to
6184 6184 :command:`qpdf` has been extended to include some
6185 6185 additional information.
6186 6186  
... ...