1

For importing pdf images \includegraphics works withouth any problem.

Now, in the same document I need to import pdf_tex.

I am using this:

\documentclass[12pt,twoside]{report}
\usepackage[headheight=18pt,a4paper, width=150mm, top=25mm, bottom=25mm, bindingoffset=6mm, headsep=18pt]{geometry}
\usepackage[spanish,es-noquoting]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc} 
\usepackage{adjustbox}
\usepackage{graphicx}
\usepackage[rgb]{xcolor}

\begin{document}
\begin{figure}[H]
\input{imagenes/image.pdf_tex}
\end{figure}
\end{document}

It returns:

! Package pdftex.def Error: File `image.pdf' not found.
See the pdftex.def package documentation for explanation.
Type H <return> for immediate help.
...
l.106 ...cs[width=\unitlength,page=28]{image.pdf}}
%
Using draft setting for this image.
Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.

What can I do?

7
  • 1
    it's a tex file \input it not \includegraphics also do not use the minipage (which is not doing anything)` (it is simplest if it is in the same document so that the internal reference to the graphic works) Sep 6, 2017 at 19:55
  • Thanks for the comment. I have tried with \input as is written at the end of the post; and need minipage to add a short note below the image..@DavidCarlisle
    – user134500
    Sep 6, 2017 at 19:57
  • Good, I have changed that, but doesn't produce the image..@DavidCarlisle
    – user134500
    Sep 6, 2017 at 20:02
  • But I have showed it..@DavidCarlisle. It is at the end of the post
    – user134500
    Sep 6, 2017 at 20:06
  • as I said in the initial comment it's easiest if you use \input{image.pdf_tex} with image.pdf_tex and image.pdf in the same directory as your document Sep 6, 2017 at 20:07

1 Answer 1

2

The problem is that image.pdf_tex uses \includegraphics{image.pdf}, so if image.pdf is not placed on main directory (where main.tex is) Latex finds no file.

The easiest way to fix the problem is to place image.pdf_tex and image.pdf where main.tex is.

The resulting code is:

\documentclass[12pt,twoside]{report}
\usepackage[headheight=18pt,a4paper, width=150mm, top=25mm, bottom=25mm, bindingoffset=6mm, headsep=18pt]{geometry}
\usepackage[spanish,es-noquoting]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc} 
\usepackage{adjustbox}
\usepackage{graphicx}
\usepackage[rgb]{xcolor}

\begin{document}
\begin{figure}
\centering
\input{image.pdf_tex}
\end{figure}    
\end{document}

To scale the image you can use \def\svgwidth{<desired width>} inside figure environment

You must log in to answer this question.