How to include pdf image in tikzpicture enviroment?


If the example is run with pdflatex, the following warning appears:

Package pdftex.def Warning: Option `bb' does not make sense,
(pdftex.def)                using `viewport' instead on input line 30.

Remove the wrong option with the empty bounding box/viewport bb=0 0 0 0.

If you want to put the math stuff on top of the image, then move the image node at the beginning before the math stuff nodes.


Related videos on Youtube

Heiko Oberdiek
Author by

Heiko Oberdiek

Updated on August 01, 2022


  • Heiko Oberdiek
    Heiko Oberdiek over 1 year

    with the following script the pdf image does not appear..., why not?

    \usepackage{tikz,amsmath, amssymb,bm,color}
    % needed for BB
    \tikzset{every picture/.style={font issue=\footnotesize},
            font issue/.style={execute at begin picture={#1\selectfont}}
    \node[draw=none,fill=none] at (3.7,3.7) {${\bm\varepsilon }$};
    \node[draw=none,fill=none] at (2.4,0.3) {${\bm\varepsilon ^{\rm{e}}}$};
    \node[draw=none,fill=none] at (5.1,0.3) {${\bm\varepsilon ^{\rm{i}}}$};
    \node[draw=none,fill=none] at (3.7,3.1) {${\bf{C}}$};
    \node[draw=none,fill=none] at (2.7,1.6) {${{\bf{C}}^{\rm{M}}}$};
    \node[draw=none,fill=none] at (4.8,1.6) {${{\bf{C}}^{\rm{V}}}$};
    \node[draw=none,fill=none] at (7.7,1.9) {${\bm\sigma }$};
    \node[draw=none,fill=none] at (-0.2,1.9) {${\bm\sigma }$};
    \node[draw=none,fill=none] at (0,0){\includegraphics[bb=0 0 0 0]{sls.pdf}};
    • John Kormylo
      John Kormylo about 8 years
      BTW, you have tikz installed twice, and color is redundant. I had to remove the preview package (whatever that does) in order to get a useful PDF. Your geometry settings make me wonder if the standalone class might be more useful.
  • John Kormylo
    John Kormylo about 8 years
    Or use the backgrounds tikzlibrary.