Printing issues on a Mac
Show older comments
I have installed MATLAB R2010b on a Mac OS 10.6.6. Although my printers are working fine with all other applications, I am unable to print directly from MATLAB. Do you have any idea why there could be this communication failure?
Below is the return in my Command Window:
Error in ==> printdlg>LocalJavaPrintDlg at 759
print(Data.Fig, pOpts{:});
Error in ==> printdlg>LocalInitFig at 479
if LocalJavaPrintDlg( Data, Dlgname )
Error in ==> printdlg at 104
Dlg=LocalInitFig(Data);
??? Error while evaluating uimenu Callback
5 Comments
Jan
on 31 Jan 2011
What happens if you open the printer dialog in the command window? Can you open the dialog? Can you select a printer? Is its status valid?
Natalie Ceperley
on 31 Jan 2011
Jan
on 31 Jan 2011
You can enable the debugger: "dbstop if all error" and start the printing again. Then Matlab stops in the failing line and you can inspect the contents of "pOpts" in the command line. Hopefully this will reveal any importante details.
Natalie Ceperley
on 31 Jan 2011
fame Li
on 12 Sep 2012
The issue is due to the name of the printer is different from the device name given by the system. Thus, matlab cannot find the device using the name that you specified in the print window. To solve the issue, you need to match the name of the printer with its device name.
You can find out the device name: system preference -> print & scan -> double click the printer, it will pop out a window to show the condition of the printer now, click the 'settings'. You will find the device name there and change the name of the printer to match with the device name. Then you are good to go.
Answers (3)
ramesh jallu
on 31 Jan 2011
0 votes
To print a plot or a m-file from a Macintosh, just click on the plot or m-file, select Print under the File menu, and hit return.
1 Comment
Natalie Ceperley
on 31 Jan 2011
Sean de Wolski
on 31 Jan 2011
0 votes
I've never had it work on my Mac (R2009b, 64bit).
the cyclist
on 31 Jan 2011
0 votes
I have the identical setup as you do (same versions of MATLAB and Mac OS X), and printing works for me, from both command line and figure window. At one point I did have your problem, though.
You might want to try this solution:
http://www.mathworks.com/support/solutions/en/data/1-5DRO9Z/?solution=1-5DRO9Z
Note in particular the final paragraph, about the (slightly bizarre) prohibition of square brackets in the name of the printer. That was the problem for me.
If you can't get it to work, remember you can always print to file, and then print the resulting file. (I generally got good results using the PNG format.)
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!