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 -
Ken Barron
★ BarTender Hero ★
Yep same issue here
The automation isn't that useful if passing the request to the spool is enough to return a RanToCompletion status
I need to make sure that an out of paper error isnt going to mess up our production line, but as far as i can see there is no way to detect that via API - I might try and workaround using seagull status monitor to create a change database entry event and then make an SQL query to that database entry, but its a very clunky solution
0
Please sign in to leave a comment.
Comments
2 comments