dymosoftware / dymo-connect-framework

DYMO Connect Framework for Javascript.
Other
88 stars 54 forks source link

printAsync results in "Failed To Execute" with many labels #21

Open hunkydoryrepair opened 3 years ago

hunkydoryrepair commented 3 years ago

When creating a LabelSetBuilder of many labels (50+) that also print barcodes (so printing is not fast), calling printAsync seems to time out quickly (10 seconds?) and give an error: "Failed to Execute WebService: printAsync, Error: -1"

However, printing continues until all labels are printed. The webservice appears to be working fine, but the javascript connecting to it gives up too quickly. The default timeout should probably be increased for a large number of labels, or allow us to specify a timeout value.

This occurs with the new library or the older DYMO.label library, as well as with either the older DymoLabel WebService or the newest DYMO Connect WebService.

I attempted to also use print2Async, which seems to print faster but still has the exact same issue.

EDIT: Enabling Print Spooling on the printer appears to resolve the problem. DYMO printers seem to be installed by default with Spooling disabled? Also, I found the global (!) variable in the dymo library that can be set to change the timeout: WS_COMMAND_TIMEOUT