From: Jorge Ramirez on
I am unable to print figures to my USB connected printer. However, I am able to print files from the Matlab m-file editor without problems. The problem only occurs when trying to print Matlab-generated figures from the Matlab figure editor. The printer is a Canon MP620 Series, and it is connected to my iMac via USB.

I have edited the file /etc/cups/cupsd.conf and added the line: Printcap /etc/printcap at the beginning of the file, as has been suggested in this forum. I have restarted Matlab and the computer many times but the problem still persists. I have made sure that the cupsd.conf file has indeed been changed and saved.

I am running Snow Leopard 10.6.1 on a 24" iMac. The error messages I get when trying to print figures from the figure editor window are:

??? Error using ==> print at 325
Problem sending file to output device, system returned error :
lpr: The printer or class was not found.


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

Thank you very much.
From: Richard Quist on
Jorge Ramirez wrote:
> I am unable to print figures to my USB connected printer. However, I am able to print files from the Matlab m-file editor without problems. The problem only occurs when trying to print Matlab-generated figures from the Matlab figure editor. The printer is a Canon MP620 Series, and it is connected to my iMac via USB.
>
> I have edited the file /etc/cups/cupsd.conf and added the line: Printcap /etc/printcap at the beginning of the file, as has been suggested in this forum. I have restarted Matlab and the computer many times but the problem still persists. I have made sure that the cupsd.conf file has indeed been changed and saved.
>
> I am running Snow Leopard 10.6.1 on a 24" iMac. The error messages I get when trying to print figures from the figure editor window are:
>
> ??? Error using ==> print at 325
> Problem sending file to output device, system returned error :
> lpr: The printer or class was not found.
>
>
> 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
>
> Thank you very much.

Does your /etc/printcap file have the entry for your printer?
What does your /etc/printcap file look like? If it's XML, try adding
PrintcapFormat BSD
underneath the Printcap /etc/printcap line in cupsd.conf, then restart
CUPS and MATLAB

--

Richard Quist
Software Developer
The MathWorks, Inc.
From: Jorge Ramirez on
Richard Quist <rquist_nospam(a)mathworks.com> wrote in message <hbmrij$4h$1(a)fred.mathworks.com>...
> Jorge Ramirez wrote:
> > I am unable to print figures to my USB connected printer. However, I am able to print files from the Matlab m-file editor without problems. The problem only occurs when trying to print Matlab-generated figures from the Matlab figure editor. The printer is a Canon MP620 Series, and it is connected to my iMac via USB.
> >
> > I have edited the file /etc/cups/cupsd.conf and added the line: Printcap /etc/printcap at the beginning of the file, as has been suggested in this forum. I have restarted Matlab and the computer many times but the problem still persists. I have made sure that the cupsd.conf file has indeed been changed and saved.
> >
> > I am running Snow Leopard 10.6.1 on a 24" iMac. The error messages I get when trying to print figures from the figure editor window are:
> >
> > ??? Error using ==> print at 325
> > Problem sending file to output device, system returned error :
> > lpr: The printer or class was not found.
> >
> >
> > 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
> >
> > Thank you very much.
>
> Does your /etc/printcap file have the entry for your printer?
> What does your /etc/printcap file look like? If it's XML, try adding
> PrintcapFormat BSD
> underneath the Printcap /etc/printcap line in cupsd.conf, then restart
> CUPS and MATLAB
>
> --
>
> Richard Quist
> Software Developer
> The MathWorks, Inc.

Thank you Richard. However, the problem persists. Below is what the printcap file has for the printer. I followed your suggestion of adding the line:
PrintcapFormat BSD
underneath the Printcap /etc/printcap line in cupsd.conf, then restart.

However, when I did so, the printer was listed as being offline and unavailable for printing. The problem still persists. Do you have any other suggestions?

Thank you for your help.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>printer-name</key>
<string>Canon_MP620_series</string>
<key>printer-info</key>
<string>Canon MP620 series</string>
<key>printer-is-accepting-jobs</key>
<true/>
<key>printer-location</key>
<string>Jorge A Ramirez<E2><80><99>s iMac</string>
<key>printer-make-and-model</key>
<string>Canon MP620 series</string>
<key>printer-state</key>
<integer>3</integer>
<key>printer-state-reasons</key>
<array>
</array>
<key>printer-type</key>
<integer>75534348</integer>
<key>device-uri</key>
<string>usb://Canon/MP620%20series?serial=20BB87</string>
</dict>
From: Richard Quist on
Jorge Ramirez wrote:
> Richard Quist <rquist_nospam(a)mathworks.com> wrote in message <hbmrij$4h$1(a)fred.mathworks.com>...
>> Jorge Ramirez wrote:
>>> I am unable to print figures to my USB connected printer. However, I am able to print files from the Matlab m-file editor without problems. The problem only occurs when trying to print Matlab-generated figures from the Matlab figure editor. The printer is a Canon MP620 Series, and it is connected to my iMac via USB.
>>>
>>> I have edited the file /etc/cups/cupsd.conf and added the line: Printcap /etc/printcap at the beginning of the file, as has been suggested in this forum. I have restarted Matlab and the computer many times but the problem still persists. I have made sure that the cupsd.conf file has indeed been changed and saved.
>>>
>>> I am running Snow Leopard 10.6.1 on a 24" iMac. The error messages I get when trying to print figures from the figure editor window are:
>>>
>>> ??? Error using ==> print at 325
>>> Problem sending file to output device, system returned error :
>>> lpr: The printer or class was not found.
>>>
>>>
>>> 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
>>>
>>> Thank you very much.
>> Does your /etc/printcap file have the entry for your printer?
>> What does your /etc/printcap file look like? If it's XML, try adding
>> PrintcapFormat BSD
>> underneath the Printcap /etc/printcap line in cupsd.conf, then restart
>> CUPS and MATLAB
>>
>> --
>>
>> Richard Quist
>> Software Developer
>> The MathWorks, Inc.
>
> Thank you Richard. However, the problem persists. Below is what the printcap file has for the printer. I followed your suggestion of adding the line:
> PrintcapFormat BSD
> underneath the Printcap /etc/printcap line in cupsd.conf, then restart.
>
> However, when I did so, the printer was listed as being offline and unavailable for printing. The problem still persists. Do you have any other suggestions?
>
> Thank you for your help.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
> <plist version="1.0">
> <array>
> <dict>
> <key>printer-name</key>
> <string>Canon_MP620_series</string>
> <key>printer-info</key>
> <string>Canon MP620 series</string>
> <key>printer-is-accepting-jobs</key>
> <true/>
> <key>printer-location</key>
> <string>Jorge A Ramirez<E2><80><99>s iMac</string>
> <key>printer-make-and-model</key>
> <string>Canon MP620 series</string>
> <key>printer-state</key>
> <integer>3</integer>
> <key>printer-state-reasons</key>
> <array>
> </array>
> <key>printer-type</key>
> <integer>75534348</integer>
> <key>device-uri</key>
> <string>usb://Canon/MP620%20series?serial=20BB87</string>
> </dict>

The printcap file content you show (above) is still in XML format, so it looks
like the PrintcapFormat BSD change didn't "take" when you made the change
(unless there's a later conflicting entry in the configuration file).

If you edit the configuration settings from the CUPS configuration page
(http://localhost:631) then when you save/apply them the CUPS printing service
should be restarted and the printcap file should be regenerated.

MATLAB will need to be restarted after you have updated the CUPS configuration
and restarted that service.


You should also take a look at this solution:
http://www.mathworks.com/support/solutions/en/data/1-5DRO9Z/index.html?solution=1-5DRO9Z


--

Richard Quist
Software Developer
The MathWorks, Inc.