I am currently working on my PhD thesis, and I am having trouble including a pdf_tex and pdf file created using Inkscape. I am using TeXStudio and PDFLaTeX.

The relevant files are:


The svg has added annotations to the png file. This is exported as a pdf and pdf_tex file for use in the thesis.

The command to include the file with the diagram is in thesis.tex.

    % Chapter 5

The figure import command in Chapter05/teleoperation.tex is:

    \caption{\SolidWorks Model with Coordinate Systems Highlighted}

When I try to compile the document, it comes up with the error:


LaTeX Warning: File `solidworks_model_view.pdf' not found on input line 52.

! Package pdftex.def Error: File `solidworks_model_view.pdf' not found.

See the pdftex.def package documentation for explanation.
Type  H <return>  for immediate help.

l.52 ...length,page=1]{solidworks_model_view.pdf}}

In other words, it is finding the .pdf_tex file just fine, but is choking on the \includegraphics command inside to get the pdf file. I thought the \import command modified the search paths for files in its command. My graphicspath is set so I can import graphics file from that directory tree just fine.

If I change the figure inclusion to:


Everything works perfectly fine. Why can I not do the same with \import and pdf_tex files?

For completeness, here is the pdf_tex file generated by Inkscape. THe offending \includegraphics directive is on line 52.

    %% Creator: Inkscape 0.91_64bit, www.inkscape.org
    %% PDF/EPS/PS + LaTeX output extension by Johan Engelen, 2010
    %% Accompanies image file 'solidworks_model_view.pdf' (pdf, eps, ps)
    %% To include the image in your LaTeX document, write
    %%   \input{<filename>.pdf_tex}
    %%  instead of
    %%   \includegraphics{<filename>.pdf}
    %% To scale the image, write
    %%   \def\svgwidth{<desired width>}
    %%   \input{<filename>.pdf_tex}
    %%  instead of
    %%   \includegraphics[width=<desired width>]{<filename>.pdf}
    %% Images with a different path to the parent latex file can
    %% be accessed with the `import' package (which may need to be
    %% installed) using
    %%   \usepackage{import}
    %% in the preamble, and then including the image with
    %%   \import{<path to file>}{<filename>.pdf_tex}
    %% Alternatively, one can specify
    %%   \graphicspath{{<path to file>/}}
    %% For more information, please see info/svg-inkscape on CTAN:
    %%   http://tug.ctan.org/tex-archive/info/svg-inkscape
        \errmessage{(Inkscape) Color is used for the text in Inkscape, but the package 'color.sty' is not loaded}%
        \errmessage{(Inkscape) Transparency is used (non-zero) for the text in Inkscape, but the package 'transparent.sty' is not loaded}%
          \setlength{\unitlength}{\unitlength * \real{\svgscale}}%
  • 1
    just use standard \input{solidworks_model_view.pdf_tex} and make sure that the directory with your tex/image combination is in your TEXINPUTS path Commented Jul 15, 2015 at 9:24
  • you can't use page key with \includegraphics[width=\unitlength,page=1]{solidworks_model_view.pdf} use \includegraphics[width=\unitlength]{solidworks_model_view.pdf}
    – touhami
    Commented Jul 15, 2015 at 9:30
  • @touhami page should work with pdf files. Commented Jul 15, 2015 at 9:38
  • @DavidCarlisle i did not know
    – touhami
    Commented Jul 15, 2015 at 9:56
  • @DavidCarlisle, thanks fort he tip but I would prefer to not to alter environment variables, as I want to keep all my compilation steps portable between different computers (my University computer uses Windows and my home computer uses Linux).
    – bjem
    Commented Jul 15, 2015 at 22:23

4 Answers 4


Ok, I've just been battling the same problem.

My solution was to add a \graphicspath{{figs/}} in the beginning of the file, so that it know where to look for the .pdf file. I'm not sure why, but adding figs/ in the beginning of the input command \input{figs/AMB-SyRM4d.pdf_tex} was not enough.

Hope this helps.


I faced the same problem. Here is what worked for me. I first saved the Texmaker file into some folder, say figures. Then I generated Inkscape pdf_tex file and saved it in the same figures folder. Then I simply run \input{filename.pdf_tex} in the tex file.


If anyone is still wondering about this, I believe the reason why it didn't work in the original question is because the \import command was used incorrectly. you should include the package import at the beginning of the document


and then import command is used like this


for me this is working fine and I don't need to change the graphicspath at the beginning of the document.


Maybe this still helps someone.

/graphicspath did not work for me on Overleaf (and I did not want to use import with specific paths all the time, after all my folder structure might change throughout a project). But one workaround they mention is described here.

In short, create an empty file (I did this on the same level as main.tex, but I don't know if this is required) without any extension, call it latexmkrc and add


with graphics being your most upper level folder of interest.

As mentioned, I use Overleaf, but something similar should work on other platforms or at home too.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .