8000 File uploading support by so-saf · Pull Request #597 · ctalkington/python-ipp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

File uploading support #597

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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
0