MATLAB: Am I able to print to a specific printer using the MATLAB command prompt but cannot find that same printer using “File-> Print” in a figure window

configureddowndroplinuxMATLABnoprinterprintersproperlyUbuntu

I am using the CUPS printing infrastructure with several network printers. When I click on "File->Print" from a figure window or an Editor window, I see only one printer in the drop down menu. Worse still, the only printer that populates is not even my default printer. I click on the Print button to print, however, nothing is printed to the printer.
On the other hand, I used the PRINT function to print from the MATLAB command prompt and the printing was fine. I thought that this is a Java issue and so I took the following approach:
1)I started MATLAB as follows:
MATLAB -nojvm
However, this does not help at all. I am still not able to print when I click "File-> Print".
2) I also tried modifying the 'AuthType' defined in the file /etc/cups/cupsd.conf(default location) to be 'None'. This has no effect either.

Best Answer

The main problem (printers not showing up in the drop-down) was due
to a corrupted /var/cache/cups/remote.cache file. The
corrupt file seems to be a consequence of upgrading CUPS at some point
to a different version.
The solution is as follows:
Stop cupsd: /etc/init.d/cupsys stop
Delete the corrupt file: rm /var/cache/cups/remote.cache
Start cupsd: /etc/init.d/cupsys start
Now all the printers show up in the drop-down menu in the Print dialog box.