Wednesday, January 27, 2010

Embedding fonts in Gnuplot generated PDFs

I have recently submitted two papers to an IEEE conference, and in doing so I had to make sure that _all_ fonts were embedded within the PDFs I submitted. This was not the case with one of my papers, and after some detective work I found out that this pertained to my using Gnuplot's PDF terminal to generate PDF graphs for my paper. Apparently Gnuplot is incapable of embedding fonts into the generated PDFs...

I found this solution though. You need to pass the PDF that Gnuplot generated through ghostscript with the following command:
gs -q -dSAFER -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=tmp.pdf\
-dCompatibilityLevel=1.5 -dPDFSETTINGS=/prepress -c .setpdfwrite\
-f infile.pdf
Where 'infile.pdf' is your Gnuplot graph. If you follow the link to where I found this hack, you may notice that I have changed the commandline slightly, so that it now creates PDF 1.5 compatible output. This is a requirement of IEEE papers I think.

No comments:

Post a Comment