[texhax] Using pages from a PDF document as graphics

Reinhard Kotucha reinhard.kotucha at web.de
Fri Feb 4 03:16:02 CET 2005

>>>>> "Karl" == Karl Berry <karl at freefriends.org> writes:

  >      [EPS files] work with most (all?) flavours of TeX.  Arbitrary
  > EPS files are not supported by pdftex, since PDF format is
  > inherently (and intentionally) limited.

  > If an EPS is restricted enough, it can be used.  In particular, I
  > read that the PostScript output by MetaPost can be used in pdftex.
  > I haven't tried it myself, and don't know what the general rules
  > are.

Hi Karl,
the PostScript output from Metapost is not understood by pdftex
directly.  Instead, the PS code is converted to PDF (\pdfliteral)
first.  This is done by Hans Hagen's macro file
  texmf*/tex/context/base/supp-pdf.tex .

It only supports a small subset of PostScript operators:

curveto, lineto, moveto, showpage, newpath, fshow, closepath, fill,
stroke, clip, rlineto, setlinejoin, setlinecap, setmiterlimit,
setgray, setrgbcolor, setcmykcolor, setdash, gsave, grestore,
translate, scale, concat, dtransform, setlinewidth, pop

fshow takes a so-called Berry-name for a font as an argument,
   (some text) pplr8r 8.96632 fshow

I doubt that any other program than Metapost supports fshow.  And I do
not see in supp-pdf.tex that findfont, scalefont, setfont or show are
supported.  So it is limited to EPS produced by Metapost.


Reinhard Kotucha			              Phone: +49-511-4592165
Marschnerstr. 25
D-30167 Hannover	                      mailto:reinhard.kotucha at web.de
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.

More information about the texhax mailing list