Printing via REST API: expecting a bad response if printer is disconnected
Hello,
I succeded printing via REST API, but I was expecting an error if the printer is offline, instead if the spooling is enabled, I get a successful response (RanToCompletion), even if the property WaitForJobToComplete="true" and there is a timeout defined in the request. If I disable the spooling and set the driver to print directly, the job remains in Running status forever. Is there the possibility to get the information that the print cannot be sent to the printer?
I also don't want that when the printer goes online again, prints that job, because it is an obsolete print..
Thanks for help
Marco
-
S1mhall
★ BarTender Hero ★
were you interrogating the job with a GET request after the initial POST? Apparently job activity in the system remain in the system for 60 minutes, so you can to a GET with the generated ID of the original job to determine the status....
If for some reason you need to not print it before the printer come back online then, (I assuming) you would need to determine all the jobs that are in the state waiting that you want to cancel and use a PATCH to kill them.
0
请先登录再写评论。
评论
1 条评论