2014-02-13

Linux: ps to pdf lossless


I came to the requirement to convert pdf to ps. However I noticed ps2pdf without any options will do some compression which in my case largely reduced the quality. So I needed to find a way to do it lossless, here it is:

ps2pdf -dAutoFilterColorImages=false -dAutoFilterGrayImages=false -dColorImageFilter=/FlateEncode -dGrayImageFilter=/FlateEncode source.ps destination.pdf