(Answer) (Category) OSU Physics Faq's : (Category) Computing (general) : (Category) TeX and LaTeX :
How do I reduce the size of postscript figure files?
The following answer is taken vertabim from the FAQ at the Front for the Mathematics ArXiv http://front.math.ucdavis.edu/ifaq#3.3; check there for updates.

 ------------------------ begin answer ---------------------------------
3.3 My Postscript figure files are bloated.

You can usually reduce or eliminate Postscript bloat if you understand your Postscript. Computers cannot understand Postscript well enough to do it automatically, because Postscript, like TeX, is a full-fledged programming language. However, two Unix utilities can often fix the problem:

 * convert is a bitmap-based image conversion program which is part of the 
    ImageMagick graphics package. It interconverts nearly 100 different image 
    formats, including several kinds of Postscript. 
 * eps2eps, which is part of the ghostscript package, converts fancy Postscript    
    to simple Postscript. The output is frequently much shorter than the input, 
    even though it is functionally identical. However, it does not help much 
    with bitmaps.
Here are three possible reasons that your Postscript might be bloated, together with suggested remedies.
    * The file is a huge bitmap. This is usually because the resolution is  
 substantially higher than necessary, because it is a black-and-white diagram 
 saved as a full-color photograph, or because it is encoded inefficiently (using 
 as many as 12 bytes per pixel). If you include the figure in your TeX document 
 without rescaling it, then you should try:
convert -density 300x300 fig.old.eps eps2:fig.new.eps
With these options, convert produces 300dpi output in Postscript Level 2 format. Occassionally 600dpi is necessary for fine detail or 150dpi is necessary to further save space; resolutions other than these three are rarely the best choice. If you rescale the figure when you include it in your TeX document, you should change the parameters in convert so that the scaled resolution matches one of these values, or at least so that it's in a reasonable range.
* The file has a huge header with a lot of macros or fonts. This is typical for commercial illustration programs such as Adobe Illustrator. Try the following conversion:
eps2eps fig.old.eps fig.new.eps
You should check the size of the output (preferably after compressing both the old and new figures) to make sure that it really is smaller.
* The file is an extremely complicated figure with tens of thousands of vertices, each given with many digits of precision. Sometimes you can fix the problem by changing the settings of the program that generated the figure. For example, a 3D plotting program might have an option to omit points that are hidden from view. Alternatively, you can convert it to a bitmap.
Note that if you create the Postscript judiciously a priori, you might not need to convert it all. For example, the free illustration program xfig produces very lean Postscript output. As another example, it is easy to produce huge files with commercial photography software such as Adobe Photoshop, but more careful use may produce better results. You can also first produce some other format (such as TIFF or JPEG) and then use convert to make the Postscript.

2001-Oct-09 1:57pm furnstahl.1@osu.edu
[Append to This Answer]
2001-Oct-09 1:57pm
Previous: (Answer) Where do I get RevTeX?
Next: (Answer) How do I find out the LaTeX page layout parameters?
This document is: http://www.physics.ohio-state.edu/cgi-bin/fom?file=181
[Search] [Appearance] [Show Expert Edit Commands]
This is a Faq-O-Matic 2.721.