Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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?

share|improve this question
    
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? –  raxacoricofallapatorius 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. –  raxacoricofallapatorius 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
add comment

1 Answer 1

up vote 5 down vote accepted

NotebookPrint[expr, Interactive -> True]

share|improve this answer
2  
How did I miss that? –  raxacoricofallapatorius Nov 27 '12 at 21:16
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.