Include path in pdfpages

My TeX file is in `C:\Users\ustjo\Desktop\Finance Report\2017\Report`

While the pdf file is in `C:\Users\ustjo\Desktop\Finance Report\2017`

I tried `\includepdf{C:/Users/ustjo/Desktop/Finance Report/2017/DecReport.pdf}`.

It does not work. It said

``````Package pdfpages Error: Cannot find file `C:/Users/ustjo/Desktop/Finance Report/2017/DecReport.pdf'.

...Desktop/Finance Report/2017/DecReport.pdf}`
``````

How can I solve this?

• Can you try with a relative path instead of an absolut one? `\includepdf{../DecReport.pdf}` – user36296 Jan 14 '18 at 11:57

One reason is that the file path includes a space. This is not supported by package `graphics` by default that is used by package `pdfpages`. Adding package `grffile` should solve this issue:

``````\usepackage{grffile}
\usepackage{pdfpages}
``````
• \includepdf[page=-, width = \linewidth]{C:/Users/ustjo/Desktop/Finance Report/2017/U9171331_201712_201712.pdf} When I tried this, it said Missing \$ inserted. ...ce Report/2017/U9171331_201712_201712.pdf} Why is that? – JOHN Jan 14 '18 at 9:53
• @JOHN A possible reason is that package `grffile` is not loaded before `pdfpages`. – Heiko Oberdiek Jan 14 '18 at 10:03

Heikos comment above is worth an answer in bold print, because the manual of grffile doesn't state that:

Load `grffile` before `pdfpages`, otherwise it will not work!

I just encountered this, because I used pdfpages, got the usual message

Missing \$ inserted

added the grffile package behind pdfpages to my preamble and the error remained!