Thursday 11 August 2011

Loosless ps-to-pdf conversion in Linux

The easiest way to do convert your eps/ps figures to pdf in Linux (without a quality loss) is to use epstopdf script. It calls ghostview with several compression options as default and it's not possible to change that just from the command line. The quick solution is to change epstopdf itself. It is usually located in /usr/bin/ directory. Line

$GSOPTS = "-dUseFlateCompression=false " unless $::opt_compress;

should be changed to

$GSOPTS = "-dUseFlateCompression=false -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode " unless $::opt_compress;

After the change is made, you can convert your eps to pdf with

epstopdf --nocompress file.eps

No comments:

Post a Comment