Skip to content

Conversation

@so-saf
Copy link
Contributor

@so-saf so-saf commented Aug 20, 2024

I looked through the CUPS Implementation of IPP documentation and found a few comments:

https://opensource.apple.com/source/cups/cups-218/cups/doc/help/spec-ipp.html#PRINT_JOB

Print-Job Request
...
The Print-Job request is followed by a file to be printed.

https://opensource.apple.com/source/cups/cups-218/cups/doc/help/spec-ipp.html#CUPS_ADD_MODIFY_PRINTER

CUPS-Add-Modify-Printer Request
...
The CUPS-Add-Modify-Printer request can optionally be followed by a PPD file or System V interface script to be used for the printer. ...

So I added the following two lines to the end of the encode_dict function:

if isinstance(data.get("file"), bytes):
    encoded += data["file"]

I've checked printing files and adding printers with a driver on my CUPS server - everything works as expected!

I checked printing files and adding printers with a driver on my CUPS server - everything works as expected!

Furthermore, I know that similar functionality was added in one of the recent PRs, but in addition to changing the encode_dict function, I added another test case and several examples.

And, of course, thanks for the project! Waiting for your reply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant