Commit 48864b8d6eecc5bbd42029df0e2608621ce7d0bc
1 parent
794b649e
Clarify documentation of advanced parsing options
Showing
3 changed files
with
68 additions
and
41 deletions
ChangeLog
| 1 | 2017-12-25 Jay Berkenbilt <ejb@ql.org> | 1 | 2017-12-25 Jay Berkenbilt <ejb@ql.org> |
| 2 | 2 | ||
| 3 | + * Clarify documentation around options that control parsing but | ||
| 4 | + not output creation. Two options: --suppress-recovery and | ||
| 5 | + --ignore-xref-streams, were documented in the "Advanced | ||
| 6 | + Transformation Options" section of the manual and --help output | ||
| 7 | + even though they are not related to output. These are now | ||
| 8 | + described in a separate section called "Advanced Parsing Options." | ||
| 9 | + | ||
| 3 | * Implement remaining PNG filters for decode. Prior versions could | 10 | * Implement remaining PNG filters for decode. Prior versions could |
| 4 | decode only the "up" filter. Now all PNG filters (sub, up, | 11 | decode only the "up" filter. Now all PNG filters (sub, up, |
| 5 | average, Paeth, optimal) are supported for decoding. Thanks to | 12 | average, Paeth, optimal) are supported for decoding. Thanks to |
manual/qpdf-manual.xml
| @@ -865,6 +865,56 @@ outfile.pdf</option> | @@ -865,6 +865,56 @@ outfile.pdf</option> | ||
| 865 | to be bothered with. | 865 | to be bothered with. |
| 866 | </para> | 866 | </para> |
| 867 | </sect1> | 867 | </sect1> |
| 868 | + <sect1 id="ref.advanced-parsing"> | ||
| 869 | + <title>Advanced Parsing Options</title> | ||
| 870 | + <para> | ||
| 871 | + These options control aspects of how qpdf reads PDF files. Mostly | ||
| 872 | + these are of use to people who are working with damaged files. | ||
| 873 | + There is little reason to use these options unless you are trying | ||
| 874 | + to solve specific problems. The following options are available: | ||
| 875 | + <variablelist> | ||
| 876 | + <varlistentry> | ||
| 877 | + <term><option>--suppress-recovery</option></term> | ||
| 878 | + <listitem> | ||
| 879 | + <para> | ||
| 880 | + Prevents qpdf from attempting to recover damaged files. | ||
| 881 | + </para> | ||
| 882 | + </listitem> | ||
| 883 | + </varlistentry> | ||
| 884 | + <varlistentry> | ||
| 885 | + <term><option>--ignore-xref-streams</option></term> | ||
| 886 | + <listitem> | ||
| 887 | + <para> | ||
| 888 | + Tells qpdf to ignore any cross-reference streams. | ||
| 889 | + </para> | ||
| 890 | + </listitem> | ||
| 891 | + </varlistentry> | ||
| 892 | + </variablelist> | ||
| 893 | + </para> | ||
| 894 | + <para> | ||
| 895 | + Ordinarily, qpdf will attempt to recover from certain types of | ||
| 896 | + errors in PDF files. These include errors in the cross-reference | ||
| 897 | + table, certain types of object numbering errors, and certain types | ||
| 898 | + of stream length errors. Sometimes, qpdf may think it has | ||
| 899 | + recovered but may not have actually recovered, so care should be | ||
| 900 | + taken when using this option as some data loss is possible. The | ||
| 901 | + <option>--suppress-recovery</option> option will prevent qpdf from | ||
| 902 | + attempting recovery. In this case, it will fail on the first | ||
| 903 | + error that it encounters. | ||
| 904 | + </para> | ||
| 905 | + <para> | ||
| 906 | + Ordinarily, qpdf reads cross-reference streams when they are | ||
| 907 | + present in a PDF file. If <option>--ignore-xref-streams</option> | ||
| 908 | + is specified, qpdf will ignore any cross-reference streams for | ||
| 909 | + hybrid PDF files. The purpose of hybrid files is to make some | ||
| 910 | + content available to viewers that are not aware of cross-reference | ||
| 911 | + streams. It is almost never desirable to ignore them. The only | ||
| 912 | + time when you might want to use this feature is if you are testing | ||
| 913 | + creation of hybrid PDF files and wish to see how a PDF consumer | ||
| 914 | + that doesn't understand object and cross-reference streams would | ||
| 915 | + interpret such a file. | ||
| 916 | + </para> | ||
| 917 | + </sect1> | ||
| 868 | <sect1 id="ref.advanced-transformation"> | 918 | <sect1 id="ref.advanced-transformation"> |
| 869 | <title>Advanced Transformation Options</title> | 919 | <title>Advanced Transformation Options</title> |
| 870 | <para> | 920 | <para> |
| @@ -976,14 +1026,6 @@ outfile.pdf</option> | @@ -976,14 +1026,6 @@ outfile.pdf</option> | ||
| 976 | </listitem> | 1026 | </listitem> |
| 977 | </varlistentry> | 1027 | </varlistentry> |
| 978 | <varlistentry> | 1028 | <varlistentry> |
| 979 | - <term><option>--suppress-recovery</option></term> | ||
| 980 | - <listitem> | ||
| 981 | - <para> | ||
| 982 | - Prevents qpdf from attempting to recover damaged files. | ||
| 983 | - </para> | ||
| 984 | - </listitem> | ||
| 985 | - </varlistentry> | ||
| 986 | - <varlistentry> | ||
| 987 | <term><option>--object-streams=<replaceable>mode</replaceable></option></term> | 1029 | <term><option>--object-streams=<replaceable>mode</replaceable></option></term> |
| 988 | <listitem> | 1030 | <listitem> |
| 989 | <para> | 1031 | <para> |
| @@ -1013,14 +1055,6 @@ outfile.pdf</option> | @@ -1013,14 +1055,6 @@ outfile.pdf</option> | ||
| 1013 | </listitem> | 1055 | </listitem> |
| 1014 | </varlistentry> | 1056 | </varlistentry> |
| 1015 | <varlistentry> | 1057 | <varlistentry> |
| 1016 | - <term><option>--ignore-xref-streams</option></term> | ||
| 1017 | - <listitem> | ||
| 1018 | - <para> | ||
| 1019 | - Tells qpdf to ignore any cross-reference streams. | ||
| 1020 | - </para> | ||
| 1021 | - </listitem> | ||
| 1022 | - </varlistentry> | ||
| 1023 | - <varlistentry> | ||
| 1024 | <term><option>--preserve-unreferenced</option></term> | 1058 | <term><option>--preserve-unreferenced</option></term> |
| 1025 | <listitem> | 1059 | <listitem> |
| 1026 | <para> | 1060 | <para> |
| @@ -1143,17 +1177,6 @@ outfile.pdf</option> | @@ -1143,17 +1177,6 @@ outfile.pdf</option> | ||
| 1143 | You should not use this for “production” PDF files. | 1177 | You should not use this for “production” PDF files. |
| 1144 | </para> | 1178 | </para> |
| 1145 | <para> | 1179 | <para> |
| 1146 | - Ordinarily, qpdf will attempt to recover from certain types of | ||
| 1147 | - errors in PDF files. These include errors in the cross-reference | ||
| 1148 | - table, certain types of object numbering errors, and certain types | ||
| 1149 | - of stream length errors. Sometimes, qpdf may think it has | ||
| 1150 | - recovered but may not have actually recovered, so care should be | ||
| 1151 | - taken when using this option as some data loss is possible. The | ||
| 1152 | - <option>--suppress-recovery</option> option will prevent qpdf from | ||
| 1153 | - attempting recovery. In this case, it will fail on the first | ||
| 1154 | - error that it encounters. | ||
| 1155 | - </para> | ||
| 1156 | - <para> | ||
| 1157 | Object streams, also known as compressed objects, were introduced | 1180 | Object streams, also known as compressed objects, were introduced |
| 1158 | into the PDF specification at version 1.5, corresponding to | 1181 | into the PDF specification at version 1.5, corresponding to |
| 1159 | Acrobat 6. Some older PDF viewers may not support files with | 1182 | Acrobat 6. Some older PDF viewers may not support files with |
| @@ -1178,18 +1201,6 @@ outfile.pdf</option> | @@ -1178,18 +1201,6 @@ outfile.pdf</option> | ||
| 1178 | at least 1.5. | 1201 | at least 1.5. |
| 1179 | </para> | 1202 | </para> |
| 1180 | <para> | 1203 | <para> |
| 1181 | - Ordinarily, qpdf reads cross-reference streams when they are | ||
| 1182 | - present in a PDF file. If <option>--ignore-xref-streams</option> | ||
| 1183 | - is specified, qpdf will ignore any cross-reference streams for | ||
| 1184 | - hybrid PDF files. The purpose of hybrid files is to make some | ||
| 1185 | - content available to viewers that are not aware of cross-reference | ||
| 1186 | - streams. It is almost never desirable to ignore them. The only | ||
| 1187 | - time when you might want to use this feature is if you are testing | ||
| 1188 | - creation of hybrid PDF files and wish to see how a PDF consumer | ||
| 1189 | - that doesn't understand object and cross-reference streams would | ||
| 1190 | - interpret such a file. | ||
| 1191 | - </para> | ||
| 1192 | - <para> | ||
| 1193 | The <option>--qdf</option> flag turns on QDF mode, which changes | 1204 | The <option>--qdf</option> flag turns on QDF mode, which changes |
| 1194 | some of the defaults described above. Specifically, in QDF mode, | 1205 | some of the defaults described above. Specifically, in QDF mode, |
| 1195 | by default, stream data is uncompressed, content streams are | 1206 | by default, stream data is uncompressed, content streams are |
qpdf/qpdf.cc
| @@ -355,6 +355,17 @@ valid file name and not a valid range.\n\ | @@ -355,6 +355,17 @@ valid file name and not a valid range.\n\ | ||
| 355 | See the manual for examples and a discussion of additional subtleties.\n\ | 355 | See the manual for examples and a discussion of additional subtleties.\n\ |
| 356 | \n\ | 356 | \n\ |
| 357 | \n\ | 357 | \n\ |
| 358 | +Advanced Parsing Options\n\ | ||
| 359 | +-------------------------------\n\ | ||
| 360 | +\n\ | ||
| 361 | +These options control aspects of how qpdf reads PDF files. Mostly these are\n\ | ||
| 362 | +of use to people who are working with damaged files. There is little reason\n\ | ||
| 363 | +to use these options unless you are trying to solve specific problems.\n\ | ||
| 364 | +\n\ | ||
| 365 | +--suppress-recovery prevents qpdf from attempting to recover damaged files\n\ | ||
| 366 | +--ignore-xref-streams tells qpdf to ignore any cross-reference streams\n\ | ||
| 367 | +\n\ | ||
| 368 | +\n\ | ||
| 358 | Advanced Transformation Options\n\ | 369 | Advanced Transformation Options\n\ |
| 359 | -------------------------------\n\ | 370 | -------------------------------\n\ |
| 360 | \n\ | 371 | \n\ |
| @@ -366,9 +377,7 @@ familiar with the PDF file format or who are PDF developers.\n\ | @@ -366,9 +377,7 @@ familiar with the PDF file format or who are PDF developers.\n\ | ||
| 366 | --compress-streams=[yn] controls whether to compress streams on output\n\ | 377 | --compress-streams=[yn] controls whether to compress streams on output\n\ |
| 367 | --decode-level=option controls how to filter streams from the input\n\ | 378 | --decode-level=option controls how to filter streams from the input\n\ |
| 368 | --normalize-content=[yn] enables or disables normalization of content streams\n\ | 379 | --normalize-content=[yn] enables or disables normalization of content streams\n\ |
| 369 | ---suppress-recovery prevents qpdf from attempting to recover damaged files\n\ | ||
| 370 | --object-streams=mode controls handing of object streams\n\ | 380 | --object-streams=mode controls handing of object streams\n\ |
| 371 | ---ignore-xref-streams tells qpdf to ignore any cross-reference streams\n\ | ||
| 372 | --preserve-unreferenced preserve unreferenced objects\n\ | 381 | --preserve-unreferenced preserve unreferenced objects\n\ |
| 373 | --newline-before-endstream always put a newline before endstream\n\ | 382 | --newline-before-endstream always put a newline before endstream\n\ |
| 374 | --qdf turns on \"QDF mode\" (below)\n\ | 383 | --qdf turns on \"QDF mode\" (below)\n\ |