I am trying to create a latex document that has a graphic: temp.pdf


This works fine if the graphic file is present, however if it is not, I get the text:

temp.pdf in the document.

How can I switch this off so that if temp.pdf is not present, then latex simply ignores the includegraphics command.


Redefine the command:



  • Thank you very much. I tried this, but I now get a blank page if there is no graphic. How can I remove this blank page? – adam.888 Nov 28 '15 at 20:43
  • How should I know what you did? As you can see in my example there is no blank page, if you run it. – user2478 Nov 28 '15 at 20:47

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