I have a pdf-figure which I want to include in my tex-file. I wrote the following line of code to insert the figure in my file:

\includegraphics[width=.8\textwidth, bb=0cm 12.5cm 26cm 15.5cm]{./images/FA/subsystems.pdf}

The result I get in my file is that the figure is overlapping with text.

Output of tex

Somewhere else in the code, I used the exact same way of including another pdf-figure in the file and this worked fine, without overlap:

\includegraphics[width=.4\textwidth, bb=0cm 25cm 8.5cm 29cm]{./images/BladePitch.pdf}

Does anybody have an idea on how to position the figure somewhere without overlapping text?

  • 3
    why are you specifying a bounding box? bb= Presumably that is not the same as the natural size of the figure which is why it is overprinting. – David Carlisle Apr 2 '14 at 14:11
  • PDF figures can have either a transparent background or a white (or other color) background. Perhaps you want one with transparency to allow the text to show through? – cslstr Apr 2 '14 at 14:17
  • Actually, I want the figure not to overprint the text at all. I use the bounding box because the pdf-file I use is just white apart from the part I am bounding here. I made this figure in PowerPoint and saved it as a pdf, so the size of the pdf-file is the same as a ppt-sheet. – Josif Apr 2 '14 at 14:21
  • you might try using the pdf-crop tool to get rid of the extra blank space around the edges. make sure there isn't a page number on the powerpoint output. – barbara beeton Apr 2 '14 at 14:39

The preferred option is to crop the whitespace from the PDF file directly. If for some reason this is not possible, I provide a few options in this answer.

Using the bb option by design does overprinting. If you want the portion outside the specified bounding box to not be printed, you have to set the clip option or equivalently, use the starred form \includegraphics*[<options>]{<basename>}.

Here are some examples, where the \fbox{} is only added to show the specified bounding box area:


\test{}{bb=0cm 1cm 5cm 9cm}
\test{}{bb=0cm 1cm 5cm 9cm,clip}
\test{*}{bb=0cm 1cm 5cm 9cm}

enter image description here

In any case, it's not really clear what is overprinting anyway: if you correctly specified bb to include only the printed content, nothing should overprint because according to your comments there was only whitespace outside the supposed specified bb.

For debugging the setting of bb, you can temporarily wrap \includegraphics with \fbox{} to see the area contained by bb as I have shown here. Or, as I said at the beginning: go the easy route and just crop the original PDF file (or a copy of it).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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