Allow direct printing without browser dialog. Receive PDF and ESC/P file with an API on http://127.0.45.12:3400/ then sent them to printer.
# Query printer
printer = requests.get('http://127.0.45.12:3400/printer').json()['printer'][0]['name']
# Send print job
requests.post('http://127.0.45.12:3400/print', params={ # Query string
'printer': printer, # printer name from response above
'type': "escp", # ENUM: escp / pdf
'job_name': "Work Order #0001", # Meaningful to display to user in print queue
}, data=pdf_content) # HTTP Body is binary data of pdf or escpIt might need headers: {'Access-Control-Request-Private-Network': true } to make Google Chrome allow sending request to localhost.
- Force printer: Force all job to print to the selected printer in the right-hand list
- Draft Mode: Force dot matrix printer to use draft font
- Unidirection: Force dot matrix printer to print in one direction, better for table printing, but it will print slower.
- Dry Run: Don't print. It will display first page content in popup.
- Start on Boot: Start when Windows boots.