We have a intranet based app that we've been using successfully for over a month that prints out 8 1/2 X 11 pallet tags for our warehouse.
When printing, the app picks a group of labels from a database, loops through the datareader, and prints the labels one at a time by overwriting existing values in named data sources in the template. The app then chooses a printer, and prints the labels.
I have a batch of 4 labels in which only the first two will print. No errors are being reported by the app, nothing in the web server logs or server event viewer, and no errors being reported by the printer itself.
When I go to the BarTender History Explorer, I see that the 2 missing labels are being reported as errors with the following messages:
BarTender failed to create any printed items. Please check your setup and try again.
BarTender cannot use printer 'PRINTER' to design, print, or export a template due to a printer setup problem.
A Windows error code was returned: 6
Error message: The handle is invalid
I've had jobs with more labels from the same app that make it through just fine, and no matter how many times I reprint, it prints the first two, and fails on the second two.
The data on the 4 labels is identical, save two fields that are counters (1 of 4, 2 of 4, etc)
I've rewritten the template to use an embedded SQL statement, and changed the embedded data to database fields and was able to print all 4 without issue.
If it was the printer, printer driver, or network connection, I would expect all 4 to fail. I'm assuming there's something in the two records that repeatedly fail, but since all 4 print from my modified template, and BarTender is not throwing any errors back to the app, I have no idea on how to proceed to troubleshoot this. Any advice would be greatly appreciated.