The following error is received when a test page is sent to the printer by Windows:
(virtual_env) C:\Users\m3\repos\virtualPrinter>python myPrinter.py
GHOSTSCRIPT_APP="C:\Program Files\gs\gs10.03.0\bin\gswin64c.exe"
Starting printer... [CTRL+C to stop]
Opening 127.0.0.1:51349
b'Microsoft (R) Windows Script Host Version 5.812\r\nCopyright (C) Microsoft Corporation. All rights reserved.\r\n\r\nCreated/updated port Print to Image Port\r\n'
['rundll32', 'printui.dll,PrintUIEntry', '/if', '/b', 'Print to Image', '/r', 'Print to Image Port', '/m', 'HP Color LaserJet 2800 Series PS', '/Z']
b''
b''
Listening for incoming print job...
Incoming job... spooling...
Traceback (most recent call last):
File "C:\Users\m3\repos\virtualPrinter\myPrinter.py", line 97, in <module>
p.run()
File "C:\Users\m3\repos\virtualPrinter\printer.py", line 140, in run
self._server.run()
File "C:\Users\m3\repos\virtualPrinter\printServer.py", line 157, in run
header='@'+combinedBuf.split('%!PS-',1)[0].split('@',1)[1]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range
The following error is received when a test page is sent to the printer by Windows: