Printing issues on a Mac

8 views (last 30 days)
Natalie Ceperley
Natalie Ceperley on 31 Jan 2011
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
Natalie Ceperley
Natalie Ceperley on 31 Jan 2011
Thank you for that tip about the dubugger, but I am still not sure what it means:
Caught-error breakpoint was hit in graphics/private/send at line 129. The error was:
Error using ==> send at 129
Problem sending file to output device, system returned error :
lpr: The printer or class was not found.
129 error('MATLAB:print:ProblemSendingFile', 'Problem sending file to output device, system returned error :\n%s', r )
129 error('MATLAB:print:ProblemSendingFile', 'Problem sending file to output device, system returned error :\n%s', r )
fame Li
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.

Sign in to comment.

Answers (3)

ramesh jallu
ramesh jallu on 31 Jan 2011
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
Natalie Ceperley on 31 Jan 2011
Yes, that is not working. For some reason, the printer does not print files sent from Matlab although it is printing from all other applications without any problems.

Sign in to comment.


Sean de Wolski
Sean de Wolski on 31 Jan 2011
I've never had it work on my Mac (R2009b, 64bit).

the cyclist
the cyclist on 31 Jan 2011
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!