From b9eacbbb855c151f6cfc2fc23364e1042e5d80f4 Mon Sep 17 00:00:00 2001 From: Callum Gare Date: Tue, 9 Nov 2021 11:34:06 +0000 Subject: [PATCH] Generate attributes for colour and paper size --- airprint-generate.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/airprint-generate.py b/airprint-generate.py index 9fb5895..146e3f2 100755 --- a/airprint-generate.py +++ b/airprint-generate.py @@ -181,6 +181,16 @@ def generate(self): ptype.text = 'printer-type=%s' % (hex(v['printer-type'])) service.append(ptype) + if attrs['color-supported']: + color = Element('txt-record') + color.text = 'Color=T' + service.append(color) + + if attrs['media-default'] == 'iso_a4_210x297mm': + max_paper = Element('txt-record') + max_paper.text = 'PaperMax=legal-A4' + service.append(max_paper) + pdl = Element('txt-record') fmts = [] defer = []