One possible cause of the problem is that no printer is connected.
Another possible cause is that the printer is incorrectly registered. Execute the following script in the Command Window:
defaultSvc = javax.print.PrintServiceLookup.lookupDefaultPrintService()
dflavor = javaObject('javax.print.DocFlavor$SERVICE_FORMATTED', 'java.awt.print.Printable');
services = javax.print.PrintServiceLookup.lookupPrintServices(dflavor,[]);
for i = 1 : size(services,1)
if (~isempty(defaultSvc) & defaultSvc.toString.compareTo(services(i).toString) == 0)
fprintf('DEFAULT: %s\n', services(i).toString.toCharArray());
else
fprintf(' : %s\n', services(i).toString.toCharArray());
end
end
The name of the default MATLAB printer will appear twice in the output of the script. Check to see if both names of the printer are the same, i.e.,
win32 printer : printername
where "printername" is some string. There might be a problem with "printername", which should correspond to the registry change file for the default printer. For example, "printername" might be registered in lowercase, when the printer name is actually uppercase "PRINTERNAME". Update the registry value to exactly match the printer name appearing in the list of all printers. Following article describes the steps to be taken to update the registry with the printername.
<http://support.microsoft.com/kb/156212>
Please restart MATLAB after you have updated the registry value for the default printer.
Best Answer