Skip to content

Commit

Permalink
Generate attributes for colour and paper size
Browse files Browse the repository at this point in the history
  • Loading branch information
callumgare committed Nov 9, 2021
1 parent bddbdf5 commit 68d1d68
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions root/root/airprint-generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand Down

0 comments on commit 68d1d68

Please sign in to comment.