[Tex/LaTex] including tif/eps/pdf fails due to bounding box/dimensions

bounding boxdimensionsgraphics

when inserting an image into my *.tex-file, I get the error

Dimension too large

the command was (reduced to the important lines)

\begin{figure}[tbp]
\includegraphics{graphics/3-1-23}
\end{figure}

where graphics/3-1-23.pdf is the file I want to include. Also tried to

  • include the original tif or as eps (and left the extension of course), and
  • rename the file and avoid numbers at the beginning of the line.

nothing worked out. The processing way of the image was

  1. get tif from oscillosope
  2. crop it using linux commandline tool "convert"
  3. converted to either eps or pdf

The package graphicx is included, when including as pdf I'm using pdflatex, otherwise latex.

Do you know such a problem or do you have a solution?
Thanks in advance 🙂

P.S.: Cannot provide an image yet – currently not enough reputation 😉

Best Answer

One of the reasons why pdfTeX doesn't support TIFF image inclusion is that there are really many different TIFF formats. So a conversion is needed to a format that pdfTeX (or TeX) understands.

For TIFF generated by an oscilloscope the best format should probably be PNG; as your example shows there can be resolution problems and indeed your conversion ended with a file which is 18072bp high and 14472bp wide (72bp = 1in), which is approximately 6.3 meters high and 5.1 meters wide.

Add the resolution parameter to the conversion process:

convert -density 300 -units PixelsPerInch 3-1-23.tif 3-1-23.png

should be what's needed. A resolution of 600 dpi might also be good: it depends on the resolution of your printer which one to choose, but usually 300 is a good choice.