# [pdftex] Clipping graphics

Michael Malak mmalak at commercehub.com
Fri Sep 13 13:26:24 CEST 2002

Edward Thome wrote:
>
> However, if you use pdflatex, you can include only a portion of the
> graphic.
>
That's not what Stéphane was asking about.  He noted that, although you
can _clip_ the included image, the resulting PDF file produced by
pdf[La]TeX still contains the _entire_ included PDF file, including the
pieces that were clipped off.  Heiko's answer here means that pdfTeX
doesn't know how to physically remove the parts of the included file
that fall outside the clipping area.

> \input graphix.sty
> \includegraphics[bb= 1in 1in 3in 4in,scale=1.25]{nameofpicture.pdf}

As Heiko just pointed out, this is not the right way to clip.
>
> On Friday, September 13, 2002, at 05:28  AM, Heiko Oberdiek wrote:
>
> > On Fri, Sep 13, 2002 at 11:51:19AM +0200, Stéphane Mancini wrote:
> >
> >> I would like to know why, while clipping a pdf page to view
> >> only a part of it, the whole page is kept in the produced pdf.
> >
> > pdfTeX is not a PDF interpreter, so it does not understand
> > the contents of a page object and therefore embeds the full
> > page.
> >
It really does require a complete interpreter to remove the clipped-off
parts.  Consider: what if the clipping region consisted of only the left
half of the letter "G" from Helvetica?  Removing the right half would
require the program to understand the Bezier-curve charpaths, and
replace then with paths that ended at the clipping boundary.
(Hmmm...Metafont can do that....)

Mike