I use the wallpaper package to put a PDF document in the background of my document.

I want the user to be able to select in the preamble which PDF should be use as background image like this:

\output{print} or \output{screen}

I thought I can write the command like this:


But this does not work. I have found out that this, however, works:


which works nicely, but I really want to know what the problem is with my initial approach.

I have also tried the approach described here but without success.

I'm not much into LaTeX programming so any help is highly appreciated.

  • Welcome to TeX.sx! Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. What “does not work”? What happens? Error messages? Different output than expected? Have you tried another macro name instead of \output which may already be defined (though this would come up in an error message, as well)? – Qrrbrbirlbel Mar 1 '13 at 19:00

The macro \output is already defined (it is a TeX primitive, → Why can't I use \newfloat more than once?) as one can see in the log:

! LaTeX Error: Command \output already defined.
               Or name \end... illegal, see p.192 of the manual.

You will need to use a different macro name, say \Output.


     \ULCornerWallPaper{1}{example-image-A.pdf}% example-image-? is from the mwe package
Nothing to see here.
  • Great, thanks a lot. I missed the info in the log. – Frank Mar 1 '13 at 19:37

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.