Thread Subject: Matlab crashes on pressing print button in editor (R14 OS X)

Subject: Matlab crashes on pressing print button in editor (R14 OS X)

From: =?ISO-8859-1?Q?Markus_H=E4nchen?=

Date: 26 Jan, 2006 23:30:54

Message: 1 of 9

Matlab crashes every time on pressing print button in editor (Matlab
7.1 R14 SP3 Mac OS X 10.4.x).

cmd-P shows no response.
File -> Print shows no response either.

Anybody else with the same problem?
Any solutions?

Subject: Matlab crashes on pressing print button in editor (R14 OS X)

From: Daniel Ennis

Date: 27 Jan, 2006 12:12:55

Message: 2 of 9

I accidently posted a response in another post. You can see the
original post here:

David Stewart, "Matlab on OSX (Tiger)" #, 26 Jan 2006 8:34 pm </WebX?14@@.ef26d03>


Or here...

Printing on OS X with R14 seems to really stink! Sorry TMW, but its
true...at least more me...and others...
 
You can read some of the complaints here:
 
twigster, "Matlab on Mac OS X Tiger?" #, 1 May 2005 5:06 am
 
 
And here:
 
Karen Lipkow, "R14sp3 and Mac OS X 10.4.2" #, 30 Sep 2005 7:12 am
 
 
The only thing that works *somewhat* reliably for me right now is to
print from the command line to a TIFF. I do a lot of "high-end"
graphical rendering and the print function (menu or command line
driven) barfs all the time. My favorite error today...after many
hours of wrestling with printing a figure for a manuscript is the
following:
 
setting PBuffer for OpenGL printing: invalid drawable
 
The result is a completely black image. It will be difficult to
convince the reviewers that this is meaningful.
 
</begin rant...if it didn't begin already>
Fortunately, I can back up to Matlab 7.0 (rather than 7.1)...oh
wait...that gives me license manager errors ever since I switched to
7.1...I could always uninstall, then reinstall, perhaps downgrade to
Oroborosx...
</end rant>
 
So as to be a bit more helpful I'll offer this as a starting point
for something that should work:
 
>> figure; [x,y,z]=sphere; s=surf(x,y,z);
>> print(gcf,'-dtiff','-r600','test');
setting PBuffer for OpenGL printing: invalid drawable
 
Ta dah! Black test.tif!!!!! What is PBuffer? Is it supposed to be
ZBuffer?
 
Printing at lower resolutions works fine, but this quality is minimal

for publications. I'd be happy to detail other problems.

Subject: Matlab crashes on pressing print button in editor (R14 OS X)

From: =?ISO-8859-1?Q?Markus_H=E4nchen?=

Date: 27 Jan, 2006 20:13:28

Message: 3 of 9

On 2006-01-27 18:12:55 +0100, "daniel ennis" <daniel.ennis@comcast.net> said:
>
> Printing on OS X with R14 seems to really stink! Sorry TMW, but its
> true...at least more me...and others...

For figure printing, I curently either save as eps or png via the menu
or use the following code:

% -------------------------------------------------
% Convert & save figure to a pdf and print directly
% -------------------------------------------------
set(gcf,'PaperOrientation','portrait');
set(gcf, 'PaperUnits', 'centimeters');
set(gcf, 'PaperType', 'A4');
set(gcf, 'PaperPosition', [1.5, 2, 18, 27]); % for portrait orientation
% set(gcf, 'PaperPosition', [1.5, 5, 18, 12]); % for landscape orientation
filenamestring_ct = ['Plot_R' num2str(exp_num, '%3.0f') 'conc_over_time.pdf'];
print(gcf, '-dpdf', filenamestring_ct);
if open_pdf ==1
    open_string = ['open -a Texshop ', filenamestring_ct];
system(open_string);
end
if print_pdf == 1
    print_string = ['open -a /Applications/Utilities/Printer\ Setup\
Utility.app ', filenamestring_ct];
    system(print_string);
end

Subject: Matlab crashes on pressing print button in editor (R14 OS X)

From: Daniel Ennis

Date: 27 Jan, 2006 14:36:52

Message: 4 of 9

> For figure printing, I curently either save as eps or png via the
> menu or use the following code:

The problem is that printing from the menu gives you no control over
the ouput resolution...unless there is a setting I don't know about.
The result of EPS and PDF outputs are loew-resolution bitmaps which
look really cruddy when you print them on a laser printer.
Furthermore, the Adobe Illustrator option barfs with this message:

Error using ==> hgexport
Error using ==> print
Error using ==> print
Error using ==> graphics/private/render
Error using ==> hardcopy
Adobe Illustratory driver does not print Z-buffer or OpenGL Mode.

If you switch to Painters, then I get this error:

Warning: RGB color data not yet supported in Painter's mode.

And the colored patches in my figure disappear.

Like I said earlier, the only option that works reasonably well is to
print to a hi-res TIFF, which is okay, but leaves a lot to be desired.

Subject: Matlab crashes on pressing print button in editor (R14 OS X)

From: =?ISO-8859-1?Q?Markus_H=E4nchen?=

Date: 28 Jan, 2006 00:32:52

Message: 5 of 9

> The problem is that printing from the menu gives you no control over
> the ouput resolution...
True, but for a quick and dirty solution, and what else are bitmaps
good for, the default resolution, of pngs at least, is good enough.
>
> The result of EPS and PDF outputs are loew-resolution bitmaps which
> look really cruddy when you print them on a laser printer.
> Furthermore, the Adobe Illustrator option barfs with this message:

My eps and pdf files work fine, in Illustrator 11, Acrobat 7, Latex
(not in preview, though) and are true vector graphics, no matter how I
produce them.

Subject: Matlab crashes on pressing print button in editor (R14 OS X)

From: Bill Moldestad

Date: 27 Feb, 2006 18:17:54

Message: 6 of 9

I had the same problem and contacted Matlab tech support. I'm
running Mac OS X 10.4.5., and using the same version of Matlab. What
they thought the problem was and told me to do about is:

'The printing may be failing because it is expecting a Mac OS
'libTIFF.dylib', but finding the already loaded MATLAB supplied
library, which isn't the same or compatible.'

'To workaround this issue, rename the MATLAB supplied library so that
printing uses the library file which comes with the Mac OS.
1. Open the Mac OS Terminal application, and type the following:
cd <matlabroot>/bin/mac ( where <matlabroot> is the
directory in which MATLAB is installed.
mv libtiff.3.7.1.dylib libtiff.old'

All I can say is based on my situation this fix worked, I can now
print. I hope that helps.

Bill

Markus Hänchen wrote:
>
>
> Matlab crashes every time on pressing print button in editor
> (Matlab
> 7.1 R14 SP3 Mac OS X 10.4.x).
>
> cmd-P shows no response.
> File -> Print shows no response either.
>
> Anybody else with the same problem?
> Any solutions?
>
>
>

Subject: Matlab crashes on pressing print button in editor (R14 OS X)

From: Martijn Henriquez

Date: 21 Mar, 2010 01:11:03

Message: 7 of 9

=?ISO-8859-1?Q?Markus_H=E4nchen?= wrote in message <43d94d85@news1.ethz.ch>...
> Matlab crashes every time on pressing print button in editor (Matlab
> 7.1 R14 SP3 Mac OS X 10.4.x).
>
> cmd-P shows no response.
> File -> Print shows no response either.
>
> Anybody else with the same problem?
> Any solutions?
>
>

Adding the option '-zbuffer' in the print command solved it for me.

Subject: Matlab crashes on pressing print button in editor (R14 OS X)

From: andrej

Date: 30 Dec, 2011 20:06:08

Message: 8 of 9

"Bill Moldestad" <bill.verus@gmail.com> wrote in message <ef26cce.4@webx.raydaftYaTP>...
> I had the same problem and contacted Matlab tech support. I'm
> running Mac OS X 10.4.5., and using the same version of Matlab. What
> they thought the problem was and told me to do about is:
>
> 'The printing may be failing because it is expecting a Mac OS
> 'libTIFF.dylib', but finding the already loaded MATLAB supplied
> library, which isn't the same or compatible.'
>
> 'To workaround this issue, rename the MATLAB supplied library so that
> printing uses the library file which comes with the Mac OS.
> 1. Open the Mac OS Terminal application, and type the following:
> cd <matlabroot>/bin/mac ( where <matlabroot> is the
> directory in which MATLAB is installed.
> mv libtiff.3.7.1.dylib libtiff.old'
>
> All I can say is based on my situation this fix worked, I can now
> print. I hope that helps.
>
> Bill
>
> Markus Hänchen wrote:
> >
> >
> > Matlab crashes every time on pressing print button in editor
> > (Matlab
> > 7.1 R14 SP3 Mac OS X 10.4.x).
> >
> > cmd-P shows no response.
> > File -> Print shows no response either.
> >
> > Anybody else with the same problem?
> > Any solutions?
> >
> >
> >
Just wanted to mention that I'm running osx 10.6.8 w/R2011a and this fix worked for me too.

Subject: Matlab crashes on pressing print button in editor (R14 OS X)

From: Thomas Clark

Date: 4 Jan, 2012 17:14:08

Message: 9 of 9

I'm experiencing the same issue on OSX 10.6.8 with R2011a

Being a 64 bit system, I changed the library in the /<matlabroot>/bin/maci64 folder rather than the /mac folder.

The fix above did NOT work; it instead led to invalid MEX file issues.

*begin rant - optional reading*
Printing and exporting figures has _never_ been easy in MATLAB. When, oh when will TMW get it right!!!

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Contact us at files@mathworks.com