3

As near as I can tell, NotebookPrint goes directly to the default printer, without employing the system standard process of opening a print dialog first.

Specifically, I'd like to he able to use NotebookPrint, or an alternative function, somePrintFunction to print an arbitrary expression, expr, using the form

somePrintFunction[expr]

and have the standard system dialog for printing appear.

Is there a way to force NotebookPrint to do this? Is there some other function that does?

orome
  • 12,819
  • 3
  • 52
  • 100
  • did you check FrontEndExecute[FrontEndToken["PrintDialog"]], FrontEndExecute[FrontEndToken["PrintOptionsDialog"]], alternatively you may set global options for the front end or Options for Notebooks then call NotebookPrint. – s.s.o Oct 29 '12 at 22:55
  • @s.s.o: That seems to print the whole notebook. Is there a way to get it ti print a specific expression? Which options? – orome Oct 29 '12 at 23:03
  • Yes, if a cell is selected it'll print the selected cell only. – s.s.o Oct 29 '12 at 23:34
  • @No selection, I'm passing the expression to be printed as an argument to NotebookPrint. – orome Oct 29 '12 at 23:36
  • I can think of only 2 options either as in the previous answer just create a new notebook or select the cell programmatically. – s.s.o Oct 29 '12 at 23:52

1 Answers1

6

NotebookPrint[expr, Interactive -> True]

M.R.
  • 31,425
  • 8
  • 90
  • 281