Monday, August 19, 2013

How to remove white space from eps and pdf figures!

When we store figures as pdf, they are stored with high quality in a vector format.  But generally the whole page is stored, with lot of white space around the actual figure. There are two ways to remove this space.

1. Convert to eps and remove space from eps

Do NOT use GIMP autocrop feature for removing the space. GIMP converts the images into bitmaps (non-vectored) which is bad quality. 

Follow the steps below to create high quality eps figures and remove space:
  • pdftops file_with_space.pdf file_with_space.eps
  • cat file_with_space.eps | ps2eps > file_without_space.eps

2. Remove space directly from pdf

To do that, use the pearl script given at For instructions, read the README file.

No comments:

Post a Comment