"Fossies" - the Fresh Open Source Software Archive

Member "littleutils-1.2.4/extra/opt-pdf.1" (28 Mar 2021, 3624 Bytes) of package /linux/privat/littleutils-1.2.4.tar.lz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 .TH OPT-PDF 1 "2021 Jan 15" littleutils
    2 .SH NAME
    3 opt-pdf \- optimize PDF image files using Ghostscript or Poppler
    4 .SH SYNOPSIS
    5 \fBopt-pdf\fR
    6 [\fB\-b(ackup)\fR]
    7 [\fB\-c(olor)\fR\~\fIDPI\fR]
    8 [\fB\-f(orce)\fR]
    9 [\fB\-g(ray)\fR\~\fIDPI\fR]
   10 [\fB\-h(elp)\fR]
   11 [\fB\-m(ono)\fR\~\fIDPI\fR]
   12 [\fB\-o(ptimize_for_web)\fR]
   13 [\fB\-q(uiet)\fR]
   14 [\fB\-t(ouch)\fR]
   15 [\fB\-v(erbose)\fR]
   16 \fIfile\|.\|.\|.
   17 .SH DESCRIPTION
   18 \fBopt-pdf\fR runs existing PDF files through Ghostscript or Poppler in order
   19 to make them smaller.  This is accomplished using the \fBfilesize\fR, \fBgs\fR,
   20 \fBpdfinfo\fR, \fBpdftocairo\fR, and \fBtempname\fR utilities.
   21 .SH OPTIONS
   22 .TP
   23 \fB\-b\fR
   24 Retain the original file by adding a ".bak" suffix.
   25 .TP
   26 \fB\-c\fR\~\fIDPI\fR
   27 Downsample color bitmap images inside the PDF file to a pixel resolution of
   28 \fIDPI\fR.
   29 .TP
   30 \fB\-f\fR
   31 Force an overwrite of input files, even if the new version is larger.  This is
   32 useful when the goal of an \fBopt-pdf\fR run is to create more proper PDF files
   33 rather than smaller ones.  This flag also forces \fBopt-pdf\fR to process files
   34 that have already been run through Ghostscript or Poppler instead of skipping
   35 them as it normally does.
   36 .TP
   37 \fB\-g\fR\~\fIDPI\fR
   38 Downsample grayscale bitmap images inside the PDF file to a pixel resolution of
   39 \fIDPI\fR.
   40 .TP
   41 \fB\-h\fR
   42 Print help and quit.
   43 .TP
   44 \fB\-m\fR\~\fIDPI\fR
   45 Downsample monochrome bitmap images inside the PDF file to a pixel resolution of
   46 \fIDPI\fR.
   47 .TP
   48 \fB\-o\fR
   49 Write "web optimized" PDF documents, which puts elements of the file into a
   50 more linear order and adds "hint" pointers, much like Ghostscript's
   51 \fBpdfopt\fR utility.  Note that this option will actually make the PDF file
   52 slightly larger.
   53 .TP
   54 \fB\-q\fR
   55 Quiet output.  No output commentary will be printed.
   56 .TP
   57 \fB\-t\fR
   58 Preserve timestamp on modified files.
   59 .TP
   60 \fB\-v\fR
   61 Print debugging output from Ghostscript.
   62 .SH EXAMPLES
   63 .TP
   64 Process a couple of PDF files:
   65 opt-pdf image001.pdf image002.pdf
   66 .TP
   67 Process all PDF images in an entire directory tree:
   68 find . \-name "*.pdf" \-exec opt-pdf {} \\;
   69 .TP
   70 Or alternatively, process all PDF images this way:
   71 find . \-name "*.pdf" \-print0 | xargs \-0 opt-pdf
   72 .TP
   73 Fully utilize a quad-core system while process all PDF images:
   74 find . \-name "*.pdf" \-print0 | xargs \-0 \-n 1 \-P 4 opt-pdf
   75 .br
   76 find . \-name "*.pdf" | parallel opt-pdf
   77 .SH NOTES
   78 The \fBopt-pdf\fR utility was originally written to reduce the size of
   79 overly-large PDF files generated by certain programs (here's looking at you,
   80 Pro/Engineer).  Additionally, it can sometimes correct files that are not fully
   81 compliant with PDF standards.
   82 .SH CAVEATS
   83 The \fBopt-pdf\fR is not strictly lossless like the \fBopt-gif\fR,
   84 \fBopt-jpg\fR, and \fBopt-png\fR utilities.  It completely rewrites the PDF
   85 file by running it through Ghostscript or Poppler, and it is possible that this
   86 will introduce subtle changes.  Ghostscript and Poppler are far more complex
   87 than utilities that handle only bitmapped images.  You have been warned.
   88 .SH "SEE ALSO"
   89 \fBfilesize\fR(1), \fBgs\fR(1), \fBpdfinfo\fR(1), \fBpdfopt\fR(1),
   90 \fBpdftocairo\fR(1), \fBtempname\fR(1)
   91 .SH COPYRIGHT
   92 Copyright (C) 2013-2021 by Brian Lindholm.  This program is free software; you
   93 can use it, redistribute it, and/or modify it under the terms of the GNU
   94 General Public License as published by the Free Software Foundation; either
   95 version 3, or (at your option) any later version.
   96 
   97 This program is distributed in the hope that it will be useful, but WITHOUT ANY
   98 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
   99 PARTICULAR PURPOSE.  See the GNU General Public License for more details.