Jason (jcreed) wrote,

ηὕρηκα! I think I solved this PDF problem well enough for my purposes. The key is PDF/X, a family of subsets of PDF meant for, as far as I can tell, actually doing what PDF is supposed to do, i.e. unambiguously describing a document.

So if you ever find yourself with an existing PDF file that doesn't have base 14 fonts embedded, and you don't have access to the PS or whatever that generated that PDF, and a round-trip through pdf2ps and ps2pdf rasterizes all the fonts and makes them look hideous, do this instead:

gs -sOutputFile=output.pdf -dNOPAUSE -q -sDEVICE=pdfwrite -dPDFX=true input.pdf -c quit

The bold part is the important part. The gray parts are just boilerplate to make gs not do a bunch of bullshit pausing and displaying and waiting for input.
Tags: embedding, fonts, pdf

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded