[texhax] Using pages from a PDF document as graphics

Karl Berry karl at freefriends.org
Wed Feb 2 14:33:50 CET 2005

    print-to-file alternative in Acrobat ends up in a PostScript file. Is 
    this a valid EPS file?

One would hope so, but I guess there's no telling with any particular
document unless you try.

    disk space is an issue here).

Perhaps compressing the EPS would be useful.  Then you have to
explicitly specify the bounding box in your document, but you save a lot
of space.

    How do I crop a EPS file 

I can't recall a utility to do it directly.  I always either run
epstopdf and then pdfcrop (though there are several pdfcrop's around), 
or pstopnm | pnmcrop.

    and get its bounding box?
If you're lucky enough to have software that produces a good bounding box:
grep BoundingBox foo.eps

If you're not that lucky, there's the bbox device in Ghostscript, or I
have a funky little bbfig program (not written by me) from years ago
which still mostly works.  It draws an outline around the actual bbox
and prints the values.  I'll attach it just for fun.

    3. How to include a PDF so that it works in a DVI file, that is, without 
    using pdfTeX? 

As far as I know, you don't.  In practice, only EPS will work with DVI files.
Am I missing something?

So you have to convert pdf to eps for tex/xdvi to be happy.

    I also use pstricks, which means trouble when I use pdfLaTeX (yes,
    this can be solved too, but I still want to be able to create DVI files
    and use xpdf/yap/whatever).

Do you mean xdvi?

pstricks and dvi go together.  It's creating pdf with pstricks that
takes extra work, either ps4pdf.sty, or dvipdfm[x] or dvips|ps2pdf or ...

You might also look into Petr Sojka's GraphicP package, which has a lot
of scripts and \includegraphics-compatible macros for handling this stuff.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: bbfig
Type: application/octet-stream
Size: 481 bytes
Desc: not available
Url : http://tug.org/pipermail/texhax/attachments/20050202/3f1bb0f5/bbfig.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bb.ps
Type: application/postscript
Size: 11989 bytes
Desc: not available
Url : http://tug.org/pipermail/texhax/attachments/20050202/3f1bb0f5/bb.ps

More information about the texhax mailing list