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:

#!/bin/bash
file=`basename $1 '.pdf'`
pdfcrop ${file}.pdf
pdftops -eps ${file}-crop.pdf ${file}.eps
rm ${file}-crop.pdf

標籤: , , ,

發表迴響

在下方填入你的資料或按右方圖示以社群網站登入:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 變更 )

Twitter picture

You are commenting using your Twitter account. Log Out / 變更 )

Facebook照片

You are commenting using your Facebook account. Log Out / 變更 )

Google+ photo

You are commenting using your Google+ account. Log Out / 變更 )

連結到 %s


%d 位部落客按了讚: