I'm writing a thesys Using LyX, it worked fine up to now. I need to insert a PDF of 4 pages in Appendix, so I looked for a solution. Here in StackOverflow I found a possible solution, using a pdfpages package and a command to add the file. Unfortunately this solution doesn't work, lyx reports the following error: !pdfTeX error: pdflatex (file test.pdf): cannot find image file

I package is correctly declared in preample, file test.pdf is in the same folder of my thesys files. I tried to substitute the file with a 1 page PDF, and change \includepdf{test.pdf} with \includepdf{test} and \includepdf{./test.pdf}. The resulting error is always the same :-(

Is there a solution? Is it really possible importing a PDF in LyX? Thanks in advance

1 Answer 1


I would suggest undoing your changes to the preamble and going to

Insert -> File -> External Material

Then under Template change to "PDF pages" then use browse to find your pdf.

I agree with the above statement because I followed it with success, but in order to insert more than one page like you said that you have under the description in the "PDF pages" if you want all of the pages you need to go to the "LaTeX and LYX Options" tab and in the options bar paste "pages=-". You should also remember that whenever you edit the preamble, you need to immediately go to Tools -> Reconfigure then restart the program in order for the changes to apply, otherwise your problems will not go away. After that, while I don't know how you have your line in the Appendix section set-up, but I used the "standard" set-up; I have not experimented further, but I don't see how the other set-ups would make a difference.

I hope this helps, I wish you luck.

  • Really tnaks Xu Wang for your help, now my appendix.Lyx file loads the PDF correctly. However, when I try to launch view - PDF (pdflatex) from the main file, thesys.lyx, it returns this error: Latex error: option clash in package graphicX I checked in the thesys.lyx preample wheter the package pdfpages was present, but it seems ok. If I exclude appendix.lyx from files loaded by thesys.lyx, View - PDF (pdflatex) loads it correctly (obviouslly without appendix). Why this wrong behavior?
    – user900978
    Mar 7, 2012 at 13:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.