[OS X TeX] OT: looking for a public-domain EPS file editor

Chris Goedde cgoedde at condor.depaul.edu
Wed Apr 25 21:37:07 CEST 2007


On Apr 25, 2007, at 4:28 AM, Bruno Voisin wrote:


> The short story
> ===============
>
> Is anybody aware of a public-domain EPS file editor, offering  
> similar functionality to Adobe Illustrator and running on Linux?
>
> The long story: why
> ===================
>
> Yesterday a student of my research lab asked about ways to crop an  
> EPS file, removing unwanted white space around a figure (the  
> streamlines of a flow) produced by Tecplot on Linux.
>

The problem is the line:

initmatrix

in the original file. The redbook says the following: "There are few  
situations in which a PostScript language program should execute  
initmatrix explicitly. A page description that executes initmatrix  
usually produces incorrect results if it is embedded within another,  
composite page."

If I comment out that line (i.e. put a % at the front), then run

gs -sDEVICE=bbox -dNOPAUSE -dBATCH bulle-orig.eps

ghostscript gives me the right bounding box. If I then paste that  
bounding box into bulle-orig.eps in place of the existing bounding  
box, then

epstopdf bulle-orig.eps

produces a correctly cropped figure.

Automating this is left as an exercise for the graduate student. :-)

BTW, whoever wrote the driver that created that postscript code is  
truly twisted.

Also, if you need to actually get rid of the white rectangle for some  
reason, I think it is sufficient to comment out the line:

1 432 4032 30240 20160 er

You can verify that this produced the rectangle by replacing the  
initial '1' with, e.g., '0.5':

0.5 432 4032 30240 20160 er

-- 

Chris Goedde



------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/





More information about the macostex-archives mailing list