[Tex/LaTex] How to include PDF file in LaTex Doc from folder location

external filesgraphicspdfpages

I'm using the \usepackage{pdfpages} to include PDF files.

I'm using the following convention: \includepdf[pages={1-7}]{myFile.pdf}

My question is, how can you include a link to a folder that contains the PDF?

I tried this with no luck: \includepdf[pages={1-7}]{Resources/myFile.pdf}

My folder "Resources" is in the same folder as my Tex doc and the error I get trying to find the location is this:

Missing $ inserted ../Resources/myFile.pdf}.

Best Answer

You either need to specify the full path e.g.:

\includepdf[pages={1-7}]{/home/bob/Documents/MyFolder/Resources/myfile.pdf}

or specify it relative to the current directory e.g. suppose your document is /home/jane/mydirectory/mydoc.tex and you need to include /home/jane/myotherdirectory/Resources/myfile.pdf then:

\includepdf[pages={1-7}]{../myotherdirectory/Resources/myfile.pdf}

If Resources is a sub-directory of your current directory, try:

\includepdf[pages={1-7}]{./Resources/myfile.pdf}