3
$\begingroup$

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?

$\endgroup$
  • $\begingroup$ 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. $\endgroup$ – s.s.o Oct 29 '12 at 22:55
  • $\begingroup$ @s.s.o: That seems to print the whole notebook. Is there a way to get it ti print a specific expression? Which options? $\endgroup$ – orome Oct 29 '12 at 23:03
  • $\begingroup$ Yes, if a cell is selected it'll print the selected cell only. $\endgroup$ – s.s.o Oct 29 '12 at 23:34
  • $\begingroup$ @No selection, I'm passing the expression to be printed as an argument to NotebookPrint. $\endgroup$ – orome Oct 29 '12 at 23:36
  • $\begingroup$ I can think of only 2 options either as in the previous answer just create a new notebook or select the cell programmatically. $\endgroup$ – s.s.o Oct 29 '12 at 23:52
6
$\begingroup$

NotebookPrint[expr, Interactive -> True]

$\endgroup$
  • 2
    $\begingroup$ How did I miss that? $\endgroup$ – orome Nov 27 '12 at 21:16

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.