This content has been marked as final. Show 3 replies
no, if printer name is invalid, you should receive an exception message like this:
javax.xml.ws.soap.SOAPFaultException: java.lang.IllegalArgumentException: Printer name "....." is invalid!
However, if you don't set any printer name in the call then the default printer will be used.
I have confirmed that passing a printer name of \\nonexistant\nonexistant will tell me it printed successfully, passing it a \\realserver\realprint1 or \\realserver\realprint2 will print and it says printed successfully.
\\realserver is an actual print server
\\realprintx is an actual printer.
\\nonexistant does not really exist and I still get a successful print.
Is there a way I can tell Autovue to fail a job that has a bad or nonexistent printer? Is there a configuration option I need to set or not set?
BTW: I have tried this with both C# .net 2.0 AND java netbeans. In both cases I get the same behaviour a valid string or printed successfully returned from the print method and no exception thrown.
Thank you for your reply.
There seems to be a bug in the DPS code that causes the print request goes to default printer when the printer name is wrong and the paper is not defined.1 person found this helpful
Until it gets fixed you can try this workaround by including the paper size in your request (e.g options.setPaper("Letter"); )
By setting the paper size in your request the DPS code tries to verify if the requested printer supports that paper or not and if the printer doesn't exist you will get the error message that you expected and the print won't go through the default printer.
The print will only go through if the printer exists and supports the paper.