Skip to content

Commit

Permalink
Merge pull request #7 from callumgare/add-colour-and-size-attribs
Browse files Browse the repository at this point in the history
Generate attributes for colour and paper size
  • Loading branch information
chuckcharlie authored Jan 13, 2022
2 parents 74f72a1 + 68d1d68 commit 2671de6
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 2671de6

Please sign in to comment.