diff --git a/cpdfmanual.pdf b/cpdfmanual.pdf index 0925711..4016d4a 100644 Binary files a/cpdfmanual.pdf and b/cpdfmanual.pdf differ diff --git a/cpdfmanual.tex b/cpdfmanual.tex index 4142770..ed1971d 100644 --- a/cpdfmanual.tex +++ b/cpdfmanual.tex @@ -2160,9 +2160,27 @@ The \texttt{-dump-attachments} operation, when given a PDF file and a directory \begin{framed} \noindent\small\verb!cpdf -image-resolution in.pdf []! -%\vspace{1.5mm} -%\noindent\small\verb!cpdf -extract-images in.pdf [] -o ! +\vspace{1.5mm} +\noindent\small\verb!cpdf -extract-images in.pdf [] [-im ] [-p2p ! \end{framed} + +\section{Extracting images} + +Cpdf can extract the raster images to a given location. JPEG, JPEG2000 and JBIG2 images are extracted directly. Other images are written as PNGs, processed with either ImageMagick's ``magick'' command, or NetPBM's ``pnmtopng'' program, whichever is installed. + + \begin{framed} + \noindent\small\verb@cpdf -extract-images in.pdf [] [-im ] [-p2p @ + \end{framed} + +\noindent The \texttt{-im} or \texttt{-p2p} option is used to give the path to the external tool, one of which must be installed. The output specifer, e.g \verb!-o output/%%%! gives the number format for numbering the images. Output files are named serially from 0, and include the page number too. For example, output files might be called \texttt{output/000-p1.jpg}, \texttt{output/001-p1.png}, \texttt{output/002-p3.jpg} etc. Here is an example invocation: + + \begin{framed} + \noindent\small\verb@cpdf -extract-images in.pdf -im magick -o output/%%%@ + \end{framed} + +\noindent The \texttt{output} directory must already exist. + + \section{Detecting Low-resolution Images}\label{imageres} To list all images in the given range of pages which fall below a given resolution (in dots-per-inch), use the \verb!-image-resolution! function: \begin{framed}