python-ipp
python-ipp copied to clipboard
Support for "sides" job-attribute-tag for double-sided printing
Problem:
The document I try to print double-sided comes out of the printer single-sided.
What I tried:
When executing the PRINT_JOB, where I added the following to the message:
"job-attributes-tag": {
"sides": "two-sided-long-edge",
}
What I saw:
I note that the output is NOT double-sided
Analysis:
I checked the output of get-printer-attributes, and it contains:
"sides-default": "one-sided",
"sides-supported": [
"one-sided",
"two-sided-long-edge",
"two-sided-short-edge"
],
In the debug logging when I execute the print_example, I see:
2024-07-12 11:19:34,960 - pyipp.serializer - DEBUG - Unknown IppTag for sides
Code inspection:
Indeed, src/pyipp/tags.py does not contain "sides" in the ATTRIBUTE_TAG_MAP
So I think the problem is caused by not completely serializing the request.
Suggestion/Request
- Include "sides" in
src/pyipp/tags.py
- Set the proper value - Should this be
"sides": IppTag.KEYWORD,
orIppTag.TEXT
, or something else? - Other functional changes if required
- Write tests
Note
While I feel comfortable programming in Python, I'm also new to IPP and this library. I would gladly contribute to this library but require some pointers for a high-quality solution.