Home Contact Research Tools LaTeX

Conversion and Printing Tools

EPS Tools

A collection of shell scripts for Linux/Unix to convert EPS files to PDF, PNG and JPEG (via Ghostscript).

Download (2015/08/01 version) Documentation

Required packages: coreutils, gawk, ghostscript, sed

FIG Tools

These shell scripts for Linux/Unix/MacOSX convert FIG files to EPS and PDF (via Ghostscript), allowing you to easily embed TeX output in your pictures.

Download (2015/08/01 version) Documentation Using Xfig

Required packages: coreutils, gawk, ghostscript, grep, sed, transfig, and a full LaTeX system with dvips and pdflatex (e.g. texlive)

Print Tools

These shell scripts for Linux/Unix print PS or PDF files with multiple pages per side at the optimal (largest possible) scale, which is determined automatically by calculating the space occupied by the page contents.

Download (2011/06/01 version) Documentation

Required packages: coreutils, cups, gawk, ghostscript, poppler-utils, psutils, sed


Extract the downloaded archive to ~/bin (the command tar -xzpf file.tgz will do the job). Make sure that you have execute permissions for the extracted scripts, and that ~/bin is in your PATH environment variable.


I thank all users who have helped me to keep these tools up to date, and for suggesting a number of improvements and new features.

New features/Bug fixes

EPS Tools • 2008 • better support for EPS files created on DOS or Mac platforms; esp2pdf now embeds and subsets all fonts in the output file • 2009 • support for HiRes Bounding Boxes added; bug in the -B option fixed; image size is now computed correctly when scaling or rotating; color rendering has been improved; the possibility to prepend PostScript files has been added; eps2png and eps2jpg can now scale images to a specific number of pixels; new PNG mode 48 added; new JPEG mode CMYK added; simpler and more efficient coding • 2010 • added the -C option • 2011 • added the -o option; added the -l option in eps2pdf; improved conversion to a different color model in eps2pdf • 2013 • PostScript scaling/rotation code is now properly protected inside a dictionary • 2015 • -C option removed because of changes in Ghostscripts color management system (support for icc profiles may be added in a future release)

FIG Tools • 2008 • fixed a bug occurring with some versions of transfig • 2009 • added the -F option to respect FIG font sizes; added the -k option to aid debugging; fixed the "illegal character" bug on Mac OS X • 2010 • fixed a bug in the error handling of fig2pdf; fixed the "invalid GenericResourceDir" problem occuring in OpenSuse 11.3 • 2011 • added the -i option; added FIG2EPS_CODE and FIG2PDF_CODE environment variables; added the -l option in fig2pdf; the tools are now able to handle larger figures (up to roughly 5×5 m or 17×17 feet) • 2013 • added the -o option; fixed the problem of large figures being clipped to Letter size in the eps output file • 2015 • the bounding box is now always determined by Ghostscript, and the -B option has been removed; fig2pdf no longer produces an eps file but generates the pdf directly; as a consequence, the images produced by fig2eps and fig2pdf can (in rare cases) differ in size; fig2eps no longer passes its output through Ghostscript, so the -d and -D and -o options have been removed; the -C option has been removed in favor of autodetection of colored special text; -t and -T generate cleaner tex output, and the picture environment now has the correct size to envelop the entire figure and special text

Print Tools • 2010 • filenames containing spaces are now handled correctly, and so are empty pages and pages whose bounding box starts exactly at (0,0); added the -r option • 2011 • the tools now point to the -h option for help