[Tex/LaTex] Import .pdf_tex images

graphicsinclude

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?

Best Answer

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