Situation:
I have a PDF file which was generated by using a combination of tikz/pgf and Inkscape. It has all the correctly embedded fonts. It can be downloaded here. For example, using
pdffonts correct.pdf
gives
name type emb sub uni object ID
------------------------------------ ----------------- --- --- --- ---------
UWTJCQ+CMR9 Type 1 yes yes no 38 0
JXYBIE+CMR10 Type 1 yes yes no 42 0
VUTWNB+CMMI10 Type 1 yes yes no 46 0
DDXSBZ+CMR6 Type 1 yes yes no 50 0
VNIEYM+CMSY9 Type 1 yes yes no 58 0
UJXQAK+CMR8 Type 1 yes yes no 54 0
AEBRGF+CMMI9 Type 1 yes yes no 62 0
Goal: I have been asked to change this pdf to eps (for journal publication). I would like to do so with two versions:
- Outlined fonts
- Embedded fonts
The final eps should have correct bounding boxes
Attempts for Outlined Fonts:
The solution by Maarten here and by the StackExchange people here proposes a solution by using GhostScript:
gs -dNOPAUSE -dNOCACHE -dBATCH -sDEVICE=epswrite -sOutputFile=your-output-file.eps your-source-file.eps
This seems to work. The fonts look awful on screen, but seem to print correctly.
Attempts for Embedded Fonts: The guide here suggests that the following commands will convert a pdf to an eps, and then adjust the bounding box with the embedded fonts. The commands are
pdftops -eps test.pdf
cat test.eps | ps2eps > test2.eps
and then the final output can be transferred back to pdf form and the embedded fonts verified
ps2pdf test.eps
pdffonts test.pdf
However, I tried this on the above file and it does not work. An eps is created using pdftops, and then the eps is changed back to a pdf, but the fonts have disappeared (using pdffonts). Can someone tell me how to change from pdf to eps and preserve embedded fonts?
UPDATE
Lev Bishop (below) discovered that the pdf had transparencies involved, which was causing pdftops to rasterize the image. In tracking down the transparency issue, I discovered a very strange bug in the 2010 version of pdflatex (or some other program pdflatex was calling).
Takes a pdf image with an embedded font. And then compile a document with
\includegraphics{image.pdf}
The resultant pdf seems to have transparencies depending on whether one uses texlive2009, texlive2010, or texlive2011! Using the 2009 version, the resultant image is fine and does not have any transparencies. Using the 2010 version gives transparencies and using the 2011 version gives back something without transparencies.
Note: I don't have a direct way to check for transparencies, so I'm simply using
pdftops file.pdf test.eps
ps2pdf test.eps test.pdf
And then checking that test.pdf has or doesn't have embedded fonts. Thus, 2010 gives me a version with NO embedded fonts while 2009 and 2011 work fine.
Best Answer
Two points: 1) according to acrobat pro your file uses transparency. See this answer for why pdftoeps cannot convert that properly to eps and instead rasterizes it. Since it seems that the figure doesn't really require transparency, but rather some preprocessing step you've done has put everything in a transparency group, you should be able to fix this. 2) rather than ps2eps I would generally prefer epstool. For correcting the bounding box (if it is even necessary, which it shouldn't be here) you can use
epstool --copy --bbox filetocorrect.eps correctedfile.eps
.