eps figures from Visio

I draw the illustrations in Visio. To include them into the paper, I must convert it to pdf or eps first. I need whitespaces to be properly cropped but I’m not aware of any easy way to do it. So here’s how I do it:

To get a pdf file:

  1. I select the figure I want to print in Visio, and then print the selection to PDF Creator.
  2. Save that as a pdf file, but then I need to crop it, using Acrobat Professional 6. (pdfcrop also works, see below)

To get an eps file, it’s not as straightforward.

  • If I print the selection to a “Generic PostScript Printer", I get bitmap font that looks jaggy, no matter how I tweaked with the settings. Same for PDF Creator.
  • If I first print it as pdf, then convert it to ps with pdf2ps (from the ghostscript package), the same thing happen.

I tried a few methods before getting the right one. pdfcrop together with pdftops (this is from the poppler-utils / xpdf-utils package) works. No more bitmap fonts.

  • pdfcrop figure.pdf
  • pdftops -eps figure-crop.pdf figure.eps

Of course putting them into a script is even better:

file=`basename $1 '.pdf'`
pdfcrop ${file}.pdf
pdftops -eps ${file}-crop.pdf ${file}.eps
rm ${file}-crop.pdf


標籤: , , ,



WordPress.com 標誌

您的留言將使用 WordPress.com 帳號。 登出 /  變更 )

Google+ photo

您的留言將使用 Google+ 帳號。 登出 /  變更 )

Twitter picture

您的留言將使用 Twitter 帳號。 登出 /  變更 )


您的留言將使用 Facebook 帳號。 登出 /  變更 )


連結到 %s

%d 位部落客按了讚: