This repository was archived by the owner on Mar 21, 2026. It is now read-only.
Generate attributes for colour and paper size#34
Open
callumgare wants to merge 1 commit into
Open
Conversation
Ljzd-PRO
approved these changes
Jul 10, 2022
Author
|
@Ljzd-PRO Thanks for approving this. Were you expecting me to merge it? Unfortunately I do not have write permissions to this repo so I can't merge. |
|
I would suggest using Traceback (most recent call last):
File "/opt/./airprint-generate.py", line 289, in <module>
apg.generate()
File "/opt/./airprint-generate.py", line 184, in generate
if attrs['color-supported']:
KeyError: 'color-supported'Traceback (most recent call last):
File "/opt/./airprint-generate.py", line 289, in <module>
apg.generate()
File "/opt/./airprint-generate.py", line 189, in generate
if attrs['media-default'] == 'iso_a4_210x297mm':
KeyError: 'media-default' |
Author
|
To be honest, it’s been so long since i wrote this and I no longer have a printer set up using this, so it would be difficult for me to make those changes and test it. Happy for anyone else to make those changes if desired. |
|
Tested ok from iPad with cups-pdf virtual printer on Rocky Linux 9.3. Before applying the patch, iPad would only print in monochrome resulting in a monochrome PDF. After the patch was applied, color is available. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently the avahi service file generated doesn't include whether the printer can print colour or not which causes iOS to assume the printer can only print black and white. It also doesn't include the default paper size which causes iOS to default to US letter size. This PR will cause it to add the colour flag if the printer supports colour and set the paper size to A4 if that's the default paper size of the printer.