Thank you for sharing this! Using your source, I have created a virtual printer that allows an industrial ink-jet printer to act like a label printer, streamlining the process of printing barcodes onto parts directly from an ERP.
Now, I would like to add the ability to cancel jobs partway through. Is this a feature you can add, or can you tell me where to start? In particular, how to set up printServer.py to listen for a job cancellation signal while self.printCallbackFn(buf) is running?