Wednesday, July 30, 2008

pdf ps acm ieee




Dear me it was tough finding the right way to get my latest paper ready to submit to the ACM.

What they needed was basically are PS and PDF files created from TeX that had all the fonts embedded in them.

For PDFs, there were a lot of webpages that talked about adding the following line to: /usr/share/texmf/web2c/updmap.cfg


pdftexDownloadBase14 true


This did not work for me.

What did work for me was to use ghostscript to embed all the fonts in the PDF:

1) Generate PDF with pdflatex:


pdflatex in.tex


2) Embed all fonts with ghostscript


gs -sDEVICE=pdfwrite -q -dBATCH -dNOPAUSE -dSAFER -dPDFX -dPDFSETTINGS=/prepress -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -dAutoFilterGrayImages=false -dGrayImageFilter=/FlateEncode -sOutputFile=out.pdf -c "<</NeverEmbed []>> setdistillerparams" -f in.pdf -c quit


3) Make sure all the fonts are embedded


pdffonts out.pdf



For generating a Postscript file:

1. Add the following lines to /usr/share/texmf/web2c/updmap.cfg


sudo vi /usr/share/texmf/web2c/updmap.cfg

dvipsDownloadBase35 true
dvipsDownloadBase14 true


2. Update font map files for TeX output drivers.


sudo updmap


3. Create the .dvi file


latex file.tex


4. Create the .ps file


dvips file.dvi -o file.ps



You might not have to do steps 1 and 2, but I had a figure with an embedded Helvetica font in it, and the first two lines were necessary to properly embed that font as well.