TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a PDF that contains one page, with a vector image on it.

I want to use the left half of the image on the backside of the front cover-page of my work, and the right half on the front of the back cover-page (since the back of the back cover-page will be on the "outside" of my work). In other words: If my work were just the front and back cover-pages (nothing in between), you'd see the entire image on the inside of both covers.

I used pdfinfo from xpdf (as per this answer) to get the dimensions of the original image pdf (163 * 77 pts). Using pdfcrop (as per this question) I managed to create both halves, with dimensions 81.5 * 77 pts.

However, inspecting the cropped images with Inkscape, I see that the cropped-out part of the image is still contained in the pdf.

Is there a way to crop out-of-view vertices of a vector graphic? Right now, when they both exist in the same document, the entire image will be included in the final document twice, which makes the file big, and my computer slow when viewing it.

share|improve this question
Or this or this. – kiss my armpit Oct 9 '13 at 7:59
up vote 4 down vote accepted

save it in a box and then use the optional argument trim for `\includegraphics:

\sbox\mybox{\includegraphics{tiger}}% to get the width
\includegraphics[trim=0 0 0.5\wd\mybox{} 0,clip]{tiger}% the left

\includegraphics[trim=0.5\wd\mybox{} 0 0 0,clip]{tiger}% the right

enter image description here

However, in the pdf file the image is saved once and showed two times with the full width but a different view port.

share|improve this answer
This is basically a different flavor of the solution I described in the original question. I was hoping for a solution that does not keep any hidden information (especially if it's stored twice), and tries to clip out-of-view shapes and vertices as best as it can. Maybe my question is not worded clearly enough. – derabbink Oct 8 '13 at 13:13
sorry, I was not clear enough: The image is included once but the cropping is not a real crop it changes only the view port. However, you have included the image once but show the whole image twice with a different view port. – Herbert Oct 8 '13 at 13:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.