From d492bb0a90e30c8c57f36434479ddb708d322e79 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Sat, 31 Aug 2019 15:11:11 -0400 Subject: Add --replace-input option (fixes #321) --- manual/qpdf-manual.xml | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) (limited to 'manual/qpdf-manual.xml') diff --git a/manual/qpdf-manual.xml b/manual/qpdf-manual.xml index bfdefc41..01d1b9cf 100644 --- a/manual/qpdf-manual.xml +++ b/manual/qpdf-manual.xml @@ -331,10 +331,12 @@ make does not have to be seekable, even when generating linearized files. Specifying “” as - means to write to standard output. However, you can't specify the - same file as both the input and the output because qpdf reads data - from the input file as it writes to the output file. QPDF attempts - to detect this case and fail without overwriting the output file. + means to write to standard output. If you want to overwrite the + input file with the output, use the option + and omit the output file name. + You can't specify the same file as both the input and the output. + If you do this, qpdf will tell you about the + option. Most options require an output file, but some testing or @@ -449,6 +451,21 @@ make + + + + + If specified, the output file name should be omitted. This + option tells qpdf to replace the input file with the output. + It does this by writing to + .~qpdf-temp.infilename# + and, when done, overwriting the input file with the temporary + file. If there were any warnings, the original input is saved + as + infilename.~qpdf-orig. + + + @@ -4419,6 +4436,15 @@ print "\n"; CLI Enhancements + + + The option may be given in + place of an output file name. This causes qpdf to overwrite + the input file with the output. See the description of + in for more details. + + The instructs -- cgit v1.2.3-54-g00ecf