Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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 have the following code which generates a window containing the variable PrintOut and a Print button. When the print button is pressed the contents of the window are sent to the printer and simultaneously a pdf is generated.

PrintOut = "Some stuff - plots, tables etc.";

        DialogReturn[NotebookPrint[PrintOut, "filename.pdf"];
          CreateDocument[PrintOut, Visible -> False, 
           PageHeaders -> {{"a", "b", DateString[]}, {"a", "b", 
              DateString[]}}]]]], CancelButton[]}]}]], 
  ShowStringCharacters -> False, 
  WindowTitle -> "This Window " <> DateString[]];

The problem arises when PrintOut contains enough stuff to be spread over multiple pages. I wish to have the pages print on both sides but can't figure out how to do it.

I have the print settings within MMA set to duplex and when I print a notebook using the front end I get duplex but it does not work for DialogNotebook. I am using MMA8

Help appreciated.

share|improve this question

Your Answer


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

Browse other questions tagged or ask your own question.