"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:


Caution: As a special service "Fossies" has tried to format the requested manual source page into HTML format but links to other man pages may be missing or even erroneous. Alternatively you can here view or download the uninterpreted manual source code. A member file download can also be achieved by clicking within a package contents listing on the according byte size field. See also the latest Fossies "Diffs" side-by-side code changes report for "opt-pdf.1": 1.2.3_vs_1.2.4.

OPT-PDF

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
EXAMPLES
NOTES
CAVEATS
SEE ALSO
COPYRIGHT

NAME

opt-pdf − optimize PDF image files using Ghostscript or Poppler

SYNOPSIS

opt-pdf [−b(ackup)] [−c(olor) DPI] [−f(orce)] [−g(ray) DPI] [−h(elp)] [−m(ono) DPI] [−o(ptimize_for_web)] [−q(uiet)] [−t(ouch)] [−v(erbose)] file...

DESCRIPTION

opt-pdf runs existing PDF files through Ghostscript or Poppler in order to make them smaller. This is accomplished using the filesize, gs, pdfinfo, pdftocairo, and tempname utilities.

OPTIONS

−b

Retain the original file by adding a ".bak" suffix.

−c DPI

Downsample color bitmap images inside the PDF file to a pixel resolution of DPI.

−f

Force an overwrite of input files, even if the new version is larger. This is useful when the goal of an opt-pdf run is to create more proper PDF files rather than smaller ones. This flag also forces opt-pdf to process files that have already been run through Ghostscript or Poppler instead of skipping them as it normally does.

−g DPI

Downsample grayscale bitmap images inside the PDF file to a pixel resolution of DPI.

−h

Print help and quit.

−m DPI

Downsample monochrome bitmap images inside the PDF file to a pixel resolution of DPI.

−o

Write "web optimized" PDF documents, which puts elements of the file into a more linear order and adds "hint" pointers, much like Ghostscript’s pdfopt utility. Note that this option will actually make the PDF file slightly larger.

−q

Quiet output. No output commentary will be printed.

−t

Preserve timestamp on modified files.

−v

Print debugging output from Ghostscript.

EXAMPLES

Process a couple of PDF files:

opt-pdf image001.pdf image002.pdf

Process all PDF images in an entire directory tree:

find . −name "*.pdf" −exec opt-pdf {} \;

Or alternatively, process all PDF images this way:

find . −name "*.pdf" −print0 | xargs −0 opt-pdf

Fully utilize a quad-core system while process all PDF images:

find . −name "*.pdf" −print0 | xargs −0 −n 1 −P 4 opt-pdf
find . −name "*.pdf" | parallel opt-pdf

NOTES

The opt-pdf utility was originally written to reduce the size of overly-large PDF files generated by certain programs (here’s looking at you, Pro/Engineer). Additionally, it can sometimes correct files that are not fully compliant with PDF standards.

CAVEATS

The opt-pdf is not strictly lossless like the opt-gif, opt-jpg, and opt-png utilities. It completely rewrites the PDF file by running it through Ghostscript or Poppler, and it is possible that this will introduce subtle changes. Ghostscript and Poppler are far more complex than utilities that handle only bitmapped images. You have been warned.

SEE ALSO

filesize(1), gs(1), pdfinfo(1), pdfopt(1), pdftocairo(1), tempname(1)

COPYRIGHT

Copyright (C) 2013-2021 by Brian Lindholm. This program is free software; you can use it, redistribute it, and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.