Ghostscript also can convert PDFs to EPS:
gswin32c.exe ^
-o output.eps ^
-sDEVICE=epswrite ^
d:/path/to/input.pdf
If Ghostscript's default media size (which is letter
) doesn't match your needs, you can specify any other one like that:
gswin32c.exe ^
-o output.eps ^
-sDEVICE=epswrite ^
-sPAPERSIZE=a5 ^
d:/path/to/input.ps
A list of PAPERSIZE
-values known to Ghostscript is here. Even more fine-tuned control you can gain by using -dDEVICEWIDTHPOINTS=w -dDEVICEHEIGHTPOINTS=h
like this:
gswin32c.exe ^
-o output.eps ^
-sDEVICE=epswrite ^
-dDEVICEWIDTHPOINTS=175 ^
-dDEVICEHEIGHTPOINTS=267 ^
d:/path/to/input.pdf
Width and height are given in 'points' (72 pt == 1 inch). OK, but now you have multi-page PDFs and EPS inherently is a 1-page format only? Additionally, you want to shift images to the left and to the top? Try this:
gswin32c.exe ^
-o input_page_%03d.eps ^
-sDEVICE=epswrite ^
-dDEVICEWIDTHPOINTS=227 ^
-dDEVICEHEIGHTPOINTS=354 ^
-dPDFFitPage ^
-c "<</PageOffset [-72 100]>> setpagedevice" ^
d:/path/to/input.pdf
For each PDF page Ghostscript will create a separate EPS file, named input_page_001.eps
, input_page_002.eps
, etc.
Update
While the above was the best answer that was available (when it comes to Ghostscript usage for the task at hand) during the time of writing in 2010, this is no longer true today, in 2015.
Today the current Ghostscript is 9.16/9.17. The epswrite
output device is no longer available. The new eps2write
device replaced it. (epswrite
generated PostScript Level 1, which can lead to rather large file sizes; eps2write
generates Level 2 PostScript, which is far more efficient, sizewise.)
@Tal Yes it does. See also http://gnuwin32.sourceforge.net/packages/xpdf.htm
– Peter Smit – 2010-08-30T07:17:53.387I liked your solution the most - thank you – Tal Galili – 2010-08-30T18:06:13.317