[OS X TeX] Distiller
Siep Kroonenberg
siepo at cybercomm.nl
Sun Jan 29 15:16:06 EST 2006
On Sun, Jan 29, 2006 at 05:04:25PM +0100, Siep Kroonenberg wrote:
> On Sun, Jan 29, 2006 at 03:34:24PM +0000, Jonathan Kew wrote:
> > On 29 Jan 2006, at 2:14 pm, Siep Kroonenberg wrote:
>
> But for conversion to pdf it may not be necessary to rewrite the
> original file: just feed Ghostscript a file with code which defines
> page size and translating the eps to a (0,0) origin, then the
> original file, and then a `-c grestore' keyword.
It is in fact better not to think about fixing the eps but about
building a PostScript page around it.
The code below is a PostScript file with an eps included according
Adobe recommendations:
%!PS-Adobe-3.0
%%BoundingBox: 0 0 72 72
<< /PageSize [72 72] >> setpagedevice
gsave
72 10 translate
save
/showpage {} def
%%BeginDocument
%% 8< snip
%!PS-Adobe-3.0 EPSF-3.0
%%Title: square.eps
%%BoundingBox: -72 -10 0 62
newpath
-72 -10 moveto
0 -10 lineto
0 62 lineto
-72 62 lineto
closepath
.5 setgray fill
%% 8< snip
%%EndDocument
restore
grestore
showpage
The middle part is the unmodified original eps, except for stripping
a preview header if necessary.
It should be safe to assume that if a boundingbox comment
doesn't occur in the first 1000000 bytes, and a deferred boundingbox
comment not in the last 1000000, then it won't be there. So you
don't have to slurp the entire eps in the search for boundingbox
comments.
--
Siep Kroonenberg
------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
& FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
More information about the MacOSX-TeX
mailing list