Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: [Help] Printing problem in Mac OSX Leopard
Date: Tue, 30 Oct 2007 19:04:15 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 149
Message-ID: <fg7v7f$8cd$1@fred.mathworks.com>
References: <fg5k90$6uk$1@fred.mathworks.com> <fg77g3$6jo$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1193771055 8589 172.30.248.38 (30 Oct 2007 19:04:15 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 30 Oct 2007 19:04:15 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1130080
Xref: news.mathworks.com comp.soft-sys.matlab:435309



Hi Richard,

  Thank you very much for your comment. I may not address my question 
clearly. My problem is about "Print" from the menu bar. When I create a 
figure, I choose File -> Print Preview... from menu bar. Then I center the 
figure, or stretch it to fill the page. Then I click the "Print" button. The error 
message appears at this moment. It doesn't print out the figure. Same 
condition happened when I click on the "Printer" icon on the tool bar. 
However, I can print the figure using command "print" in the command 
window. Following is an example of "print -DEBUG".

'------------------------------------
Debugging in PRINT, PrintJob object is:

pj = 

                Handles: {[7]}
                 Driver: 'ps2'
               FileName: '/tmp/tp480322.ps'
             PageNumber: 0
                 Active: 0
                 Return: 0
             AllFigures: [7x1 double]
            AllPointers: {7x1 cell}
            PrinterName: ''
          SimWindowName: ''
               Renderer: ''
         rendererOption: 0
            PrintOutput: 1
                Verbose: 0
            Orientation: ''
                 hgdata: []
             PaperUnits: ''
                PrintUI: 1
             nouiOption: 0
                 UIData: []
                    DPI: -1
              DriverExt: 'ps'
            DriverClass: 'PS'
           DriverExport: 0
            DriverColor: 0
         DriverColorSet: 0
            GhostDriver: ''
              GhostName: ''
             GhostImage: 0
            GhostExtent: []
       GhostTranslation: []
       PostScriptAppend: 0
       PostScriptLatin1: 1
         PostScriptCMYK: 0
    PostScriptTightBBox: 1
      PostScriptPreview: 0
            TiffPreview: 1
             TiledPrint: 0
               FromPage: 1
                 ToPage: 9999
             FramePrint: 0
               PrintCmd: 'lpr -r'
          DefaultDevice: '-dps2'
                  Error: 0
              DebugMode: 1
              Validated: 1
          XTerminalMode: 0

Printing handle: 7
Passing input args to hardcopy: '/tmp/tp480322.ps' '-dps2' 
PRINT debugging: print command = 'lpr -r "/tmp/tp480322.ps"'.
'-------------------------------------------------

So, it is confused to me that why command "print" works but not the "print" 
button. I prefer to use the "Print Preview..." and "Print" button from the figure 
window in case I want to adjust the figure position on the paper. This 
condition didn't happen in Mac OSX Tiger.

Any idea about this problem? Any comment is appreciated.


Oh, one more question. When I use command "print", the data is sent to the 
printer, but the printer doesn't print it out right away. The data receiving light 
is flashing on the printer panel, and I have to stop by the printer and press 
the print button to let the figure print out. If I don't, the figure will never be 
printed. This is Weird. I didn't have this condition for older Matlab version. 
This weird behavior happens both on Mac OXS Tiger and Leopard. Any idea ??


 I use Mac OSX Leopard, Matlab 2007a Student version.

Niner

 


Richard Quist <rquist_nospam@mathworks.com> wrote in message 
<fg77g3$6jo$1@fred.mathworks.com>...
> Niner wrote:
> > Hi, my Macbook Pro had upgraded to Leopard. I found that Matlab can't 
print 
> > out the figure I created. I got this error message:
> > 
> > '-----------------------------------------
> > ??? Error using ==> graphics/private/send at 307
> > Error using ==> graphics/private/send at 129
> > Problem sending file to output device, system returned error :
> > lpr: The printer or class was not found.
> > 
> > 
> > Error in ==> printdlg>LocalInitFig at 469
> >   if LocalJavaPrintDlg( Data, Dlgname )
> > 
> > Error in ==> printdlg at 100
> >    Dlg=LocalInitFig(Data);
> > 
> > Error in ==> graphics/private/ppreview>onPrint at 906
> > printdlg(fig);
> > '-------------------------------------------
> > 
> > I can see the printer in the Print Window. But I can't print out the file. 
> > Although I can save the figure as a PDF file and print it out without 
problem, I 
> > still want to print the file directly under Matlab. Do I need to re-install 
> > Matlab? Any idea to fix this problem? Thank you very much for your help.
> > 
> > I use Mac OSX Leopard, Matlab 2007a Student version
> > 
> > 
> 
> You will probably need to contact support to resolve this. It may help 
> if you provide the info above as well as the output from the following:
>    figure;
>    plot(1:10);
>    print -DEBUG
> 
> Note: if you're trying to print to something other than the default 
> printer then change the print command to
> 
>    print -DEBUG -P<printername>
> 
> where <printername> would be replaced by whatever name is assigned to 
> that printer.
> 
> The printcap entry for that printer may also be of use...
> 
> -- 
> 
> Richard Quist
> Software Developer
> The MathWorks, Inc.