manpagez: man pages & more
man pdfquant(1)
Home | html | info | man
pdfquant(1)                 General Commands Manual                pdfquant(1)


NAME

       pdfquant - reduce the size of the colormap used by bitmap images
       embedded in PDF files.


SYNOPSIS

       pdfquant [-h(elp)] [-f(loyd-steinberg)] [-n colors] [-o(ptimize)]
       [-q(uiet)] [-s(ingle_threaded)] file...


DESCRIPTION

       pdfquant extracts the main bitmap images from one or more PDF files and
       writes out new PDF files that contain alternate versions of the bitmaps
       with reduced colormaps.  This is accomplished using the pdfseparate,
       pdfimages, pngquant, img2pdf, and tempname utilities.  It is targeted
       at PDF files generated by document scanning software.


OPTIONS

       -h     Print help and quit.

       -f     Use Floyd-Steinberg dithering instead of ordered dithering.
              This significantly improves the appearance of color images, but
              also increases the size of the output files substantially.

       -n colors
              Reduce the number of colors used on each page to the value
              specified.  Only a number between 2 and 256 can be used, and the
              default value is 8.

       -o     Use opt-pdf to minimize the filesize of intermediate PNG files
              (using opt-png) before assembling the final PDF file.  This
              significantly increases computation time.

       -q     Cause pdfquant to silence the progress information that is
              normally printed during operation.

       -s     The pdfquant utility will normally utilize GNU parallel (if
              present on the system) to perform operations in parallel to
              reduce computation time.  Using this option will force single-
              threaded operation.


CAVEATS

       The pdfquant utility only uses the first bitmap image extracted from
       each page of the PDF file.  It does not extract text or vector
       graphics, nor does it utilize any additional bitmaps extracted.
       Generally speaking, the only PDF files that contain a single whole-page
       bitmap on each page are those generated by document scanning software.
       If you use pdfquant on PDF files exported from office suites, CAD
       packages, desktop publishing software, etc., you will almost certainly
       be disappointed.

       Also, if you plan to use pdfquant to convert embedded bitmaps to
       strictly black-and-white (not grayscale), the pdfbw4 utility should be
       used instead.  It yields better results.


SEE ALSO

       img2pdf(1), parallel(1), pdfimages(1), pdfseparate(1), pngquant(1),
       pdfbw4(1)


COPYRIGHT

       Copyright (C) 2021-2026 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.

littleutils                       2026 Jan 01                      pdfquant(1)

littleutils 1.4.0 - Generated Wed Feb 18 07:38:11 CST 2026
© manpagez.com 2000-2026
Individual documents may contain additional copyright information.