snippetbashTip
pdftocairo — Convert PDF files to PNG/JPEG/TIFF/PDF/PS/EPS/SVG using cairo. More information: <https://manned.org
Viewed 0 times
commandpdftocairofilesconvertjpegclipdfpng
Problem
How to use the
pdftocairo command: Convert PDF files to PNG/JPEG/TIFF/PDF/PS/EPS/SVG using cairo. More information: <https://manned.org/pdftocairo>.Solution
pdftocairo — Convert PDF files to PNG/JPEG/TIFF/PDF/PS/EPS/SVG using cairo. More information: <https://manned.org/pdftocairo>.Convert a PDF file to JPEG:
pdftocairo {{path/to/file.pdf}} -jpegConvert to PDF expanding the output to fill the paper:
pdftocairo {{path/to/file.pdf}} {{output.pdf}} -pdf -expandConvert to SVG specifying the first/last page to convert:
pdftocairo {{path/to/file.pdf}} {{output.svg}} -svg -f {{first_page}} -l {{last_page}}Convert to PNG with 200ppi resolution:
pdftocairo {{path/to/file.pdf}} {{output.png}} -png -r 200Convert to grayscale TIFF setting paper size to A3:
pdftocairo {{path/to/file.pdf}} -tiff -gray -paper A3Convert to PNG cropping x and y pixels from the top-left corner:
pdftocairo {{path/to/file.pdf}} -png -x {{x_pixels}} -y {{y_pixels}}Code Snippets
Convert a PDF file to JPEG
pdftocairo {{path/to/file.pdf}} -jpegConvert to PDF expanding the output to fill the paper
pdftocairo {{path/to/file.pdf}} {{output.pdf}} -pdf -expandConvert to SVG specifying the first/last page to convert
pdftocairo {{path/to/file.pdf}} {{output.svg}} -svg -f {{first_page}} -l {{last_page}}Convert to PNG with 200ppi resolution
pdftocairo {{path/to/file.pdf}} {{output.png}} -png -r 200Convert to grayscale TIFF setting paper size to A3
pdftocairo {{path/to/file.pdf}} -tiff -gray -paper A3Context
tldr-pages: common/pdftocairo
Revisions (0)
No revisions yet.