table of contents
other versions
- wheezy 0.18.4-6
- wheezy-backports 0.26.5-2+deb8u1~bpo70+1
- jessie 0.26.5-2+deb8u1
- testing 0.48.0-2
- unstable 0.48.0-2
pdftoppm(1) | General Commands Manual | pdftoppm(1) |
NAME¶
pdftocairo - Portable Document Format (PDF) to PNG/JPEG/PDF/PS/EPS/SVG using cairoSYNOPSIS¶
pdftocairo [options] PDF-file [output-file]DESCRIPTION¶
pdftocairo converts Portable Document Format (PDF) files, using the cairo output device of the poppler PDF library, to any of the following output formats:- •
- Portable Network Graphics (PNG)
- •
- JPEG Interchange Format (JPEG)
- •
- Portable Document Format (PDF)
- •
- PostScript (PS)
- •
- Encapsulated PostScript (EPS)
- •
- Scalable Vector Graphics (SVG)
OPTIONS¶
- -png
- Generates a PNG file(s)
- -jpeg
- Generates a JPEG file(s)
- Generates a PDF file
- -ps
- Generate a PS file
- -eps
- 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.
- -svg
- Generate a SVG (Scalable Vector Graphics) file
- -f number
- Specifies the first page to convert.
- -l number
- Specifies the last page to convert.
- -o
- Generates only the odd numbered pages.
- -e
- Generates only the even numbered pages.
- -singlefile
- Writes only the first page and does not add digits.
- -r number
- Specifies the X and Y resolution, in pixels per inch of image files (or rasterized regions in vector output). The default is 150 PPI.
- -rx number
- Specifies the X resolution, in pixels per inch of image files (or rasterized regions in vector output). The default is 150 PPI.
- -ry number
- Specifies the Y resolution, in pixels per inch of image files (or rasterized regions in vector output). The default is 150 PPI.
- -scale-to number
- Scales each page to fit in scale-to*scale-to pixel box (PNG/JPEG only).
- -scale-to-x number
- Scales each page horizontally to fit in scale-to-x pixels (PNG/JPEG only).
- -scale-to-y number
- Scales each page vertically to fit in scale-to-y pixels (PNG/JPEG only).
- -x number
- Specifies the x-coordinate of the crop area top left corner in pixels (image output) or points (vector output)
- -y number
- Specifies the y-coordinate of the crop area top left corner in pixels (image output) or points (vector output)
- -W number
- Specifies the width of crop area in pixels (image output) or points (vector output) (default is 0)
- -H number
- Specifies the height of crop area in pixels (image output) or points (vector output) (default is 0)
- -sz number
- Specifies the size of crop square in pixels (image output) or points (vector output) (sets -W and -H)
- -cropbox
- Uses the crop box rather than media box when generating the files
- -mono
- Generate a monochrome file (PNG only).
- -gray
- Generate a grayscale file (PNG and JPEG only).
- -transp
- Use a transparent page color instead of white (PNG only).
- -icc icc-file
- Use the specified ICC file as the output profile (PNG only). The profile will be embedded in the PNG file.
- -level2
- Generate Level 2 PostScript (PS only).
- -level3
- Generate Level 3 PostScript (PS only). This enables all Level 2 features plus shading patterns and masked images. This is the default setting.
- -origpagesizes
- Generate a file with variable page sizes and orientations (PS and PDF only). The size of each page will be the original page in the PDF file. If the output is PS the file will contain %%DocumentMedia and %%PageMedia DSC comments specifying the size of each page. Any specification of the page size via -paper, -paperw, or -paperh will get overridden as long as each page of the PDF file has a defined paper size.
- -paper size
- 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 to match the size specified in the PDF file. -origpagesizes overrides this setting if the PDF file has defined page sizes.
- -paperw size
- Set the paper width, in points (PS,PDF,SVG only). -origpagesizes overrides this setting if the PDF file has defined page sizes.
- -paperh size
- Set the paper height, in points (PS,PDF,SVG only). -origpagesizes overrides this setting if the PDF file has defined page sizes.
- -nocrop
- By default, output is cropped to the CropBox specified in the PDF file. This option disables cropping.
- -expand
- Expand PDF pages smaller than the paper to fill the paper (PS,PDF,SVG only). By default, these pages are not scaled.
- -noshrink
- 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.
- -nocenter
- 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).
- -duplex
- Adds the %%IncludeFeature: *Duplex DuplexNoTumble DSC comment to the PostScript file (PS only). This tells the print manager to enable duplexing.
- -opw password
- Specify the owner password for the PDF file. Providing this will bypass all security restrictions.
- -upw password
- Specify the user password for the PDF file.
- -q
- Don't print any messages or errors.
- -v
- Print copyright and version information.
- -h
- Print usage information. (-help and --help are equivalent.)
EXIT CODES¶
The poppler tools use the following exit codes:- 0
- No error.
- 1
- Error opening a PDF file.
- 2
- Error opening an output file.
- 3
- Error related to PDF permissions.
- 4
- Error related to ICC profile.
- 99
- Other error.