TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I wish to append some pdf documents to the end of a larger document I'm writing, but find that using the \includepdf command provided by pdfpages always crashes pdflatex.

The following example exibits the behaviour:

First create a test pdf, which we will append to the main doc:



This is some text






  This is the text in the main doc.



This causes pdflates to crash with a 'pdflatex has encountered a problem' message. In this case I'm using MikTeX 2.9 on windows XP Pro 32 Bit with Texniccenter 1.0 as my editor (although Texworks also fails, not that I think the editor has anything to do with it, but you never know). I haven't tried on other platforms. In case it's relevent I do not normally have admin access on this PC.

Is this a known problem, and is there a latex work around? I'm aware of other non-latex methods to append the pdfs if necessary.

share|improve this question
You should be using pages={-} or pages=-, not pages={~}. – egreg May 20 '12 at 11:11
Hooray! I'm embarrassed that it was so simple, but also a bit dissappointed that this can actually crash pdflatex. If you put this as an answer below I'll give you the credit. – crobar May 20 '12 at 11:17
up vote 6 down vote accepted

The error message is

!pdfTeX error: pdflatex (file \protect \unhbox \voidb@x \penalty \@M \ {}.pdf):
 cannot find image file

which is caused by calling the option


rather than the correct


I don't think there's a really safe protection against such errors.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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