Mathematica: Duplex Printing from button inside DialogNotebook on Mac

In summary, the user is facing an issue with printing a DialogNotebook with duplex settings. They have tried setting the print settings to duplex but it does not work for DialogNotebook. They are using MMA8 and are seeking help to find a solution. Two potential solutions are suggested: using the "PrintDuplexed" option in the NotebookPrint function or using the "PrintSettings" option to specify the desired print settings. The user is encouraged to refer to the documentation for more details and to seek further assistance if needed.
  • #1
ChristinaJ
Gold Member
35
1
All,

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.

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

DialogInput[
  DialogNotebook[
   Column[{PrintOut, 
     Row[{Button["Print", 
        DialogReturn[NotebookPrint[PrintOut, "filename.pdf"];
         NotebookPrint[
          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.
 
Physics news on Phys.org
  • #2


Hello,

Thank you for sharing your code and the problem you are facing. I can see that you have already identified the issue and have tried to solve it by setting the print settings to duplex. However, it seems that this setting is not applied to the DialogNotebook.

One potential solution could be to use the "PrintDuplexed" option in the NotebookPrint function. This option allows you to specify whether the notebook should be printed on both sides of the paper. You can set this option to "Automatic" to use the default setting from your print settings, or you can set it to "True" to force duplex printing.

Another option could be to use the "PrintSettings" option in the NotebookPrint function to specify the print settings you want to use, including the duplex setting. You can refer to the documentation for more details on how to use this option.

I hope this helps resolve the issue you are facing. If you continue to have trouble, please feel free to reach out for further assistance. Best of luck with your project!
 

What is Mathematica's Duplex Printing feature?

Mathematica's Duplex Printing feature allows users to print on both sides of a sheet of paper. This can save paper and reduce printing costs.

How can I print duplex from a button inside a DialogNotebook?

To print duplex from a button inside a DialogNotebook on Mac, you can use the "PrintDuplex" option in the NotebookPrint function. This will open a dialog box where you can select the duplex printing option before printing.

Can I customize the duplex printing settings?

Yes, you can customize the duplex printing settings by using the "PrinterSettings" option in the NotebookPrint function. This will allow you to specify the number of pages to print on each side of the paper, as well as other printing options.

Is duplex printing available on all printers?

No, duplex printing may not be available on all printers. The availability of this feature depends on the specific printer model and its capabilities. It is recommended to check with the printer's manufacturer for more information.

Can I use duplex printing for all types of documents in Mathematica?

Yes, duplex printing can be used for all types of documents in Mathematica, including notebooks, graphics, and text files. However, the printing options may vary depending on the type of document being printed.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
6
Views
3K
  • Computing and Technology
Replies
13
Views
6K
Replies
9
Views
10K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
17
Views
45K
Replies
26
Views
4K
Back
Top