[Tex/LaTex] includepdf error message cannot find file


When I try to compile the file, I get this error message:


Package pdfpages Error: Cannot find file `-'. \includepdf[pages=-]{file.pdf}

When I change \includepdf[pages=-]{file.pdf} to \includepdf[pages={1}]{file.pdf} it will print the first page or any other page I want. It also does not work and show the error message when I try to print pages 7-11, so anytime I put – sign I get the message.

Does anyone know, why is that and how to fix it? Thanks.

Best Answer

Unfortunately - is made into an active shorthand character by the czech babel option, you can use


Just before the pdf inclusion to make - safe again. Normally this is inside a group so - will regain its babel meaning, or you could use \shorthandon to explicitly reset it.