499 lines
15 KiB
HTML
499 lines
15 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of pdftocairo</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>pdftocairo</H1>
|
|
Section: User Commands (1)<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
pdftocairo - Portable Document Format (PDF) to PNG/JPEG/TIFF/PDF/PS/EPS/SVG using cairo
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>pdftocairo</B>
|
|
|
|
[options]
|
|
<I>PDF-file</I>
|
|
|
|
[<I>output-file</I>]
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<B>pdftocairo</B>
|
|
|
|
converts Portable Document Format (PDF) files, using the cairo output device of the poppler PDF library, to any of the following output formats:
|
|
<DL COMPACT>
|
|
<DT id="1">•<DD>
|
|
Portable Network Graphics (PNG)
|
|
<DT id="2">•<DD>
|
|
JPEG Interchange Format (JPEG)
|
|
<DT id="3">•<DD>
|
|
Tagged Image File Format (TIFF)
|
|
<DT id="4">•<DD>
|
|
Portable Document Format (PDF)
|
|
<DT id="5">•<DD>
|
|
PostScript (PS)
|
|
<DT id="6">•<DD>
|
|
Encapsulated PostScript (EPS)
|
|
<DT id="7">•<DD>
|
|
Scalable Vector Graphics (SVG)
|
|
<DT id="8">•<DD>
|
|
Windows Printer
|
|
</DL>
|
|
<P>
|
|
|
|
<B>pdftocairo</B>
|
|
|
|
reads the PDF file,
|
|
<I>PDF-file</I>,
|
|
|
|
and writes to
|
|
<I>output-file</I>.
|
|
|
|
The image formats (PNG, JPEG, and TIFF) generate one file per page with the page number and file type appended to
|
|
<I>output-file</I>.
|
|
|
|
When -singlefile is used with the image formats, the file type is appended to
|
|
<I>output-file</I>.
|
|
|
|
When the output format is a vector format (PDF, PS, EPS, and SVG),
|
|
<I>output-file</I>
|
|
|
|
is the full filename.
|
|
<P>
|
|
If the
|
|
<I>PDF-file</I>
|
|
|
|
is ``-'' , the PDF is read from stdin.
|
|
If the
|
|
<I>output-file</I>
|
|
|
|
is ``-'' , the output file will be written to stdout. Using stdout is not valid with image formats unless -singlefile is used.
|
|
If
|
|
<I>output-file</I>
|
|
|
|
is not used, the output filename will be derived from the
|
|
<I>PDF-file</I>
|
|
|
|
filename.
|
|
<P>
|
|
|
|
Not all options are valid with all output formats. One (and only one) of the output format options (-png, -jpeg, -tiff, -pdf, -print, -ps, -eps, or -svg) must be used.
|
|
<P>
|
|
|
|
The resolution options (-r, -rx, -ry) set the resolution of the
|
|
image output formats. The image dimensions will depend on the PDF page
|
|
size and the resolution. For the vector outputs, regions of the page
|
|
that can not be represented natively in the output format (eg
|
|
translucency in PS) will be rasterized at the resolution specified by
|
|
the resolution options.
|
|
<P>
|
|
|
|
The -scale-to options may be used to set a fixed image size. The
|
|
image resolution will vary with the page size.
|
|
<P>
|
|
|
|
The cropping options (-x, -y, -W, and -H) use units of pixels with
|
|
the image formats and PostScript points (1/72 inch) with the vector
|
|
formats. When cropping is used with vector output the cropped region is
|
|
centered unless -nocenter is used in which case the cropped region is
|
|
at the top left (SVG) or bottom left (PDF, PS, EPS).
|
|
<P>
|
|
|
|
<A NAME="lbAE"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="9"><B>-png</B>
|
|
|
|
<DD>
|
|
Generates a PNG file(s)
|
|
<DT id="10"><B>-jpeg</B>
|
|
|
|
<DD>
|
|
Generates a JPEG file(s). See also -jpegopt.
|
|
<DT id="11"><B>-tiff</B>
|
|
|
|
<DD>
|
|
Generates a TIFF file(s)
|
|
<DT id="12"><B>-pdf</B>
|
|
|
|
<DD>
|
|
Generates a PDF file
|
|
<DT id="13"><B>-ps</B>
|
|
|
|
<DD>
|
|
Generate a PS file
|
|
<DT id="14"><B>-eps</B>
|
|
|
|
<DD>
|
|
Generate an EPS file. An EPS file contains a single image, so if you
|
|
use this option with a multi-page PDF file, you must use -f and -l
|
|
to specify a single page. The page size options (-origpagesizes,
|
|
-paper, -paperw, -paperh) can not be used with this option.
|
|
<DT id="15"><B>-svg</B>
|
|
|
|
<DD>
|
|
Generate a SVG (Scalable Vector Graphics) file
|
|
<DT id="16"><B>-print</B>
|
|
|
|
<DD>
|
|
(Windows only) Prints to a system printer. See also -printer and -printeropt.
|
|
<BR> If an output file is not specified, the output will be sent to the printer.
|
|
<BR> The output file '-' can not be used with this option.
|
|
<DT id="17"><B>-printdlg</B>
|
|
|
|
<DD>
|
|
(Windows only) Prints to a system printer. Displays the print dialog to allow
|
|
the print options to be modified before printing.
|
|
<DT id="18"><B>-f</B><I> number</I>
|
|
|
|
<DD>
|
|
Specifies the first page to convert.
|
|
<DT id="19"><B>-l</B><I> number</I>
|
|
|
|
<DD>
|
|
Specifies the last page to convert.
|
|
<DT id="20"><B>-o</B>
|
|
|
|
<DD>
|
|
Generates only the odd numbered pages.
|
|
<DT id="21"><B>-e</B>
|
|
|
|
<DD>
|
|
Generates only the even numbered pages.
|
|
<DT id="22"><B>-singlefile</B>
|
|
|
|
<DD>
|
|
Writes only the first page and does not add digits.
|
|
<DT id="23"><B>-r</B><I> number</I>
|
|
|
|
<DD>
|
|
Specifies the X and Y resolution, in pixels per inch of image files (or rasterized regions in vector output). The default is 150 PPI.
|
|
<DT id="24"><B>-rx</B><I> number</I>
|
|
|
|
<DD>
|
|
Specifies the X resolution, in pixels per inch of image files (or rasterized regions in vector output). The default is 150 PPI.
|
|
<DT id="25"><B>-ry</B><I> number</I>
|
|
|
|
<DD>
|
|
Specifies the Y resolution, in pixels per inch of image files (or rasterized regions in vector output). The default is 150 PPI.
|
|
<DT id="26"><B>-scale-to</B><I> number</I>
|
|
|
|
<DD>
|
|
Scales the long side of each page (width for landscape pages, height
|
|
for portrait pages) to fit in scale-to pixels. The size of the short
|
|
side will be determined by the aspect ratio of the page (PNG/JPEG/TIFF only).
|
|
<DT id="27"><B>-scale-to-x</B><I> number</I>
|
|
|
|
<DD>
|
|
Scales each page horizontally to fit in scale-to-x pixels. If
|
|
scale-to-y is set to -1, the vertical size will determined by the
|
|
aspect ratio of the page (PNG/JPEG/TIFF only).
|
|
<DT id="28"><B>-scale-to-y</B><I> number</I>
|
|
|
|
<DD>
|
|
Scales each page vertically to fit in scale-to-y pixels. If scale-to-x
|
|
is set to -1, the horizontal size will determined by the aspect ratio
|
|
of the page (PNG/JPEG/TIFF only).
|
|
<DT id="29"><B>-x</B><I> number</I>
|
|
|
|
<DD>
|
|
Specifies the x-coordinate of the crop area top left corner in pixels (image output) or points (vector output)
|
|
<DT id="30"><B>-y</B><I> number</I>
|
|
|
|
<DD>
|
|
Specifies the y-coordinate of the crop area top left corner in pixels (image output) or points (vector output)
|
|
<DT id="31"><B>-W</B><I> number</I>
|
|
|
|
<DD>
|
|
Specifies the width of crop area in pixels (image output) or points (vector output) (default is 0)
|
|
<DT id="32"><B>-H</B><I> number</I>
|
|
|
|
<DD>
|
|
Specifies the height of crop area in pixels (image output) or points (vector output) (default is 0)
|
|
<DT id="33"><B>-sz</B><I> number</I>
|
|
|
|
<DD>
|
|
Specifies the size of crop square in pixels (image output) or points (vector output) (sets -W and -H)
|
|
<DT id="34"><B>-cropbox</B>
|
|
|
|
<DD>
|
|
Uses the crop box rather than media box when generating the files (PNG/JPEG/TIFF only)
|
|
<DT id="35"><B>-mono</B>
|
|
|
|
<DD>
|
|
Generate a monochrome file (PNG and TIFF only).
|
|
<DT id="36"><B>-gray</B>
|
|
|
|
<DD>
|
|
Generate a grayscale file (PNG, JPEG, and TIFF only).
|
|
<DT id="37"><B>-antialias</B>
|
|
|
|
<DD>
|
|
Set the cairo antialias option used for text and drawing in image files (or rasterized regions in vector output). The options are:
|
|
<DL COMPACT><DT id="38"><DD>
|
|
<DL COMPACT>
|
|
<DT id="39"><B>default</B>
|
|
|
|
<DD>
|
|
Use the default antialiasing for the target device. This is the default setting if -antialias is not used.
|
|
<DT id="40"><B>none</B>
|
|
|
|
<DD>
|
|
Antialiasing is disabled.
|
|
<DT id="41"><B>gray</B>
|
|
|
|
<DD>
|
|
Perform single-color antialiasing using shades of gray.
|
|
<DT id="42"><B>subpixel</B>
|
|
|
|
<DD>
|
|
Perform antialiasing by taking advantage of the order of subpixel elements on devices such as LCD.
|
|
<DT id="43"><B>fast</B>
|
|
|
|
<DD>
|
|
Hint that the backend should perform some antialiasing but prefer speed over quality.
|
|
<DT id="44"><B>good</B>
|
|
|
|
<DD>
|
|
The backend should balance quality against performance.
|
|
<DT id="45"><B>best</B>
|
|
|
|
<DD>
|
|
Hint that the backend should render at the highest quality, sacrificing speed if necessary.
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="46"><B>-transp</B>
|
|
|
|
<DD>
|
|
Use a transparent page color instead of white (PNG and TIFF only).
|
|
<DT id="47"><B>-icc</B><I> icc-file</I>
|
|
|
|
<DD>
|
|
Use the specified ICC file as the output profile (PNG only). The profile will be embedded in the PNG file.
|
|
<DT id="48"><B>-jpegopt</B><I> jpeg-options</I>
|
|
|
|
<DD>
|
|
When used with -jpeg, takes a list of options to control the jpeg compression. See
|
|
<B>JPEG OPTIONS</B>
|
|
|
|
for the available options.
|
|
<DT id="49"><B>-level2</B>
|
|
|
|
<DD>
|
|
Generate Level 2 PostScript (PS only).
|
|
<DT id="50"><B>-level3</B>
|
|
|
|
<DD>
|
|
Generate Level 3 PostScript (PS only). This enables all Level 2 features plus
|
|
shading patterns and masked images. This is the default setting.
|
|
<DT id="51"><B>-origpagesizes</B>
|
|
|
|
<DD>
|
|
This option is the same as "-paper match".
|
|
<DT id="52"><B>-paper</B><I> size</I>
|
|
|
|
<DD>
|
|
Set the paper size to one of "letter", "legal", "A4", or "A3"
|
|
(PS,PDF,SVG only). This can also be set to "match", which will set
|
|
the paper size of each page to match the size specified in the PDF
|
|
file. If none the -paper, -paperw, or -paperh options are
|
|
specified the default is to match the paper size.
|
|
<DT id="53"><B>-paperw</B><I> size</I>
|
|
|
|
<DD>
|
|
Set the paper width, in points (PS,PDF,SVG only).
|
|
<DT id="54"><B>-paperh</B><I> size</I>
|
|
|
|
<DD>
|
|
Set the paper height, in points (PS,PDF,SVG only).
|
|
<DT id="55"><B>-nocrop</B>
|
|
|
|
<DD>
|
|
By default, printing output is cropped to the CropBox specified in the PDF
|
|
file. This option disables cropping (PS,PDF,SVG only).
|
|
<DT id="56"><B>-expand</B>
|
|
|
|
<DD>
|
|
Expand PDF pages smaller than the paper to fill the paper (PS,PDF,SVG only). By
|
|
default, these pages are not scaled.
|
|
<DT id="57"><B>-noshrink</B>
|
|
|
|
<DD>
|
|
Don't scale PDF pages which are larger than the paper (PS,PDF,SVG only). By default,
|
|
pages larger than the paper are shrunk to fit.
|
|
<DT id="58"><B>-nocenter</B>
|
|
|
|
<DD>
|
|
By default, PDF pages smaller than the paper (after any scaling) are
|
|
centered on the paper. This option causes them to be aligned to the
|
|
lower-left corner of the paper instead (PS,PDF,SVG only).
|
|
<DT id="59"><B>-duplex</B>
|
|
|
|
<DD>
|
|
Adds the %%IncludeFeature: *Duplex DuplexNoTumble DSC comment to the
|
|
PostScript file (PS only). This tells the print manager to enable duplexing.
|
|
<DT id="60"><B>-printer</B><I> printer-name</I>
|
|
|
|
<DD>
|
|
(Windows only). When used with -print, specifies the name of the printer to be used, instead of the system default.
|
|
<DT id="61"><B>-printopt</B><I> printer-options</I>
|
|
|
|
<DD>
|
|
(Windows only). When used with -print, takes a list of options to be used to configure the printer. See
|
|
<B>WINDOWS PRINTER OPTIONS</B>
|
|
|
|
for the available options.
|
|
<DT id="62"><B>-setupdlg</B>
|
|
|
|
<DD>
|
|
(Windows only). When used with -print, the printer properties dialog is displayed
|
|
allowing the print settings to be modified before printing. The paper size selected
|
|
in the print properties dialog will be used except when -origpagesizes is specified.
|
|
<DT id="63"><B>-opw</B><I> password</I>
|
|
|
|
<DD>
|
|
Specify the owner password for the PDF file. Providing this will
|
|
bypass all security restrictions.
|
|
<DT id="64"><B>-upw</B><I> password</I>
|
|
|
|
<DD>
|
|
Specify the user password for the PDF file.
|
|
<DT id="65"><B>-q</B>
|
|
|
|
<DD>
|
|
Don't print any messages or errors.
|
|
<DT id="66"><B>-v</B>
|
|
|
|
<DD>
|
|
Print copyright and version information.
|
|
<DT id="67"><B>-h</B>
|
|
|
|
<DD>
|
|
Print usage information.
|
|
(<B>-help</B>
|
|
|
|
and
|
|
<B>--help</B>
|
|
|
|
are equivalent.)
|
|
</DL>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>EXIT CODES</H2>
|
|
|
|
The poppler tools use the following exit codes:
|
|
<DL COMPACT>
|
|
<DT id="68">0<DD>
|
|
No error.
|
|
<DT id="69">1<DD>
|
|
Error opening a PDF file.
|
|
<DT id="70">2<DD>
|
|
Error opening an output file.
|
|
<DT id="71">3<DD>
|
|
Error related to PDF permissions.
|
|
<DT id="72">4<DD>
|
|
Error related to ICC profile.
|
|
<DT id="73">99<DD>
|
|
Other error.
|
|
</DL>
|
|
<A NAME="lbAG"> </A>
|
|
<H2>JPEG OPTIONS</H2>
|
|
|
|
When JPEG output is specified, the -jpegopt option can be used to control the JPEG compression parameters.
|
|
It takes a string of the form "<opt>=<val>[,<opt>=<val>]". Currently the available options are:
|
|
<DL COMPACT>
|
|
<DT id="74"><B>quality</B>
|
|
|
|
<DD>
|
|
Selects the JPEG quality value. The value must be an integer between 0 and 100.
|
|
<DT id="75"><B>progressive</B>
|
|
|
|
<DD>
|
|
Select progressive JPEG output. The possible values are "y", "n",
|
|
indicating progressive (yes) or non-progressive (no), respectively.
|
|
<DT id="76"><B>optimize</B>
|
|
|
|
<DD>
|
|
Sets whether to compute optimal Huffman coding tables for the JPEG output, which
|
|
will create smaller files but make an extra pass over the data. The value must
|
|
be "y" or "n", with "y" performing optimization, otherwise the default Huffman
|
|
tables are used.
|
|
</DL>
|
|
<A NAME="lbAH"> </A>
|
|
<H2>WINDOWS PRINTER OPTIONS</H2>
|
|
|
|
In Windows, you can use the -print option to print directly to a system printer. Additionally, you can use the -printopt
|
|
option to configure the printer. It takes a string of the form "<opt>=<val>[,<opt>=<val>]". Currently the available options are:
|
|
<DL COMPACT>
|
|
<DT id="77"><B>source</B>
|
|
|
|
<DD>
|
|
Selects the source paper tray to be used (bin). The possible values are "upper", "onlyone", "lower", "middle", "manual", "envelope",
|
|
"envmanual", "auto", "tractor", "smallfmt", "largefmt", "largecapacity", "formsource", or a numeric value to choose a driver specific source.
|
|
<DT id="78"><B>duplex</B>
|
|
|
|
<DD>
|
|
Sets the duplex mode of the printer. The possible values are "off", "short" or "long",
|
|
indicating no duplexing, short-edge binding, or long-edge binding, respectively.
|
|
General option -duplex is a synonym of "duplex=long". If both options are specified,
|
|
-printopt has priority.
|
|
</DL>
|
|
<A NAME="lbAI"> </A>
|
|
<H2>AUTHOR</H2>
|
|
|
|
The pdftocairo software and documentation are copyright 1996-2004 Glyph
|
|
& Cog, LLC and copyright 2005-2011 The Poppler Developers.
|
|
<A NAME="lbAJ"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+pdfdetach">pdfdetach</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+pdffonts">pdffonts</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+pdfimages">pdfimages</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+pdfinfo">pdfinfo</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+pdftohtml">pdftohtml</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+pdftoppm">pdftoppm</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+pdftops">pdftops</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+pdftotext">pdftotext</A></B>(1)
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+pdfseparate">pdfseparate</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+pdfsig">pdfsig</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+pdfunite">pdfunite</A></B>(1)
|
|
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="79"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="80"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="81"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="82"><A HREF="#lbAE">OPTIONS</A><DD>
|
|
<DT id="83"><A HREF="#lbAF">EXIT CODES</A><DD>
|
|
<DT id="84"><A HREF="#lbAG">JPEG OPTIONS</A><DD>
|
|
<DT id="85"><A HREF="#lbAH">WINDOWS PRINTER OPTIONS</A><DD>
|
|
<DT id="86"><A HREF="#lbAI">AUTHOR</A><DD>
|
|
<DT id="87"><A HREF="#lbAJ">SEE ALSO</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:22 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|