Hack Of The Day: PDF Versions And Printers

➲  Date: Mon, 18 Apr 2011 15:25:42 +0200; Tags: [hack_of_the_day; pdf; printers].

The Problem:
Your PDF file looks awsome on screen, but once you send it to your printer: I did a few experiments with a bunch of printers I have access to. It seems that some of them simply do not handle the version 1.4 of the PDF standard (which is, 10 damn' years old, also the basis for the ISO 19005-1:2005 standard, and of course the version used by PDFLaTeX, XeLaTeX, Inkscape …).
The Solution:
Just use Ghostscript to convert to PDF 1.2:
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.2 \
  -sOutputFile=FILE_OUT.pdf FILE_IN.pdf
Or, if you think you're going to need it often:
pdfto12 () {
    if [ $# -ne 2 ]; then
        echo "usage: pdfto12 <pdf-in> <pdf-out>"
    gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.2  \
       -dNOPAUSE -dQUIET -dBATCH -sOutputFile=$2 $1

blog comments powered by Disqus

Sebastien Mondet


Site generated thanks to bracetax, camlmix, sebib, and more …
Updated on Sat, 10 Dec 2011 12:46:34 -0500.
Sebastien Mondet

Powered by Caml