Skip to content
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

[RFE] Include fax-specific options in "job-creation-attributes-supported" and "ipp-features-supported" if the queue is fax queue #459

Closed
TinyTrebuchet opened this issue Aug 23, 2022 · 17 comments
Assignees
Labels
enhancement New feature or request priority-medium
Milestone

Comments

@TinyTrebuchet
Copy link

The fax-specific options (like phone number, etc) are not appearing as job-settable:

job-settable-attributes-supported (1setOf keyword) = copies,finishings,job-hold-until,job-name,job-priority,media,media-col,multiple-document-handling,number-up,output-bin,orientation-requested,page-ranges,print-color-mode,print-quality,printer-resolution,sides

Furthermore, the printer attributes list generated using ipptool -tv <PRINT-QUEUE> get-printer-attributes.test > attrs.txt shows no mention of any fax-related option (other than in the name of print-queue itself). There is also no attribute for telling whether the print-queue is a fax or not.

This is problematic for CPD CUPS backend, as it uses "job-creation-attributes" to get a fetch and forward list of CUPS options to the CPD frontend.

The attached PPD file is for a fax queue, generated with driverless-fax: hp8730fax.ppd.txt

@tillkamppeter
Copy link
Member

Not only for CPDB but also in general for PPD-less printing (CUPS 3.x, New Architecture) one needs some hint that a print queue is actually a fax queue in the response to the get-printer-attributes IPP request.

@tillkamppeter
Copy link
Member

My printer's answer to the get-printer-attributes IPP request on its fax URI is here:
HP-OfficeJet-Pro-8730-fax-ipp-attrs.txt
Here are the lines which contain "fax":

        printer-uri (uri) = ipp://HP18602408C229.local:631/ipp/faxout
        printer-fax-log-uri (uri) = http://HP18602408C229.local/ipp/log/faxout.txt
        printer-uri-supported (1setOf uri) = ipp://HP18602408C229.local/ipp/faxout,ipps://HP18602408C229.local:443/ipp/faxout
        ipp-features-supported (1setOf keyword) = airprint-1.5,faxout

What is the "official" indicator that this is the fax queue of the printer? Is it the faxout item in ipp-features-supported? Then CUPS should add this item, too.

@michaelrsweet
Copy link
Member

@tillkamppeter Yes, the 'faxout' in the "ipp-features-supported" attribute is what you want to look for when querying a particular URI. For DNS-SD, the presence of the "rfo" key tells you the printer also supports facsimile.

@tillkamppeter
Copy link
Member

@michaelrsweet thanks. But then the bug in CUPS is that if we have a fax queue (with appropriate attributes in the PPD) CUPS must advertise it properly, adding the ipp-features-supported = faxout bit to the get-printer-attributes IPP response.

@tillkamppeter
Copy link
Member

Note that in the subject and in the initial posting most probably job-creation-attributes-supported was meant and not job-settable-attributes-supported,

@TinyTrebuchet
Copy link
Author

Yes, I accidentally mixed the two terms. What is the difference between them?

@tillkamppeter tillkamppeter changed the title Fax-specific options not included in "job-settable-attributes-supported" Fax-specific options not included in "job-creation-attributes-supported" Aug 23, 2022
@zdohnal
Copy link
Member

zdohnal commented Aug 24, 2022

@TinyTrebuchet IIUC job-settable-attributes are the attributes which can be set on job object as a whole, and job-creation-attributes are the attributes which you can set to the job object only if you are about to do Print-Job, Create-Job, Validate-Job and Print-URI requests.

@zdohnal zdohnal changed the title Fax-specific options not included in "job-creation-attributes-supported" [RFE] Include Fax-specific options in "job-creation-attributes-supported" and "ipp-features-supported" if the queue is fax queue Aug 24, 2022
@zdohnal zdohnal added enhancement New feature or request priority-medium labels Aug 24, 2022
@zdohnal zdohnal added this to the v2.5 milestone Aug 24, 2022
@zdohnal zdohnal changed the title [RFE] Include Fax-specific options in "job-creation-attributes-supported" and "ipp-features-supported" if the queue is fax queue [RFE] Include fax-specific options in "job-creation-attributes-supported" and "ipp-features-supported" if the queue is fax queue Aug 24, 2022
@zdohnal
Copy link
Member

zdohnal commented Aug 24, 2022

Marking this as RFE, since we haven't been sharing anything related to fax till now, and ipp-features-supported is hard-coded only to subscription-object.

@michaelrsweet
Copy link
Member

@zdohnal Indeed, ipp-features-supported should definitely include ipp-everywhere.

@TinyTrebuchet From an IPP perspective, job-settable-attributes-supported specifies which Job attributes can be changed by a Set-Job-Attributes request after submission, while job-creation-attributes-supported specifies which attributes are supported in Create-Job and Print-Job requests.

@tillkamppeter
Copy link
Member

@zdohnal this should be simple to fix and not cause any regression risks. And this is very useful, as with this print dialogs can tell print and fax queues apart without resorting to PPD files. And as the current work on the Common Print Dialog Backends by @TinyTrebuchet is already working without PPDs and therefore full prepared for the New Architecture (CUPS 3.x) we should do this change soon. I do not want @TinyTrebuchet to re-introduce PPD support solely for determining whether a CUPS queue is a fax queue or not.

@tillkamppeter
Copy link
Member

@michaelrsweet could you do that little change of CUPS queues which are fax queues (appropriate fax attributes in their PPD files) include the ipp-features-supported = faxout in their get-printer-attributes IPP response? This would help us a lot to create correct print dialogs and this without accessing the queue's PPD, making the dialog future-proof for the transition to CUPS 3.x.

@michaelrsweet
Copy link
Member

@tillkamppeter I’ll take a look…

@TinyTrebuchet
Copy link
Author

TinyTrebuchet commented Sep 20, 2022

The above PR should fix this.
Let me know if any changes need to be made.

@zdohnal
Copy link
Member

zdohnal commented Sep 20, 2022

@tillkamppeter @TinyTrebuchet afaik the PR fixes the one part of the issue - sharing faxout in the ipp-features-supported, but the original problem, sharing fax-related attributes in the job-creation-attributes-supported hasn't been fixed yet - this is the one which gives me the biggest problem - I have a time for studying the PWG 5100.15 only once and I wasn't able to tell which fax attributes should fall into the category, so I could create a proper PR for it.

If you can provide the list of attributes which are suited for job-creation-attributes-supported it would help me with this.

@tillkamppeter
Copy link
Member

My printer, get-printer-attributes IPP response attached to an earlier comment here, has no job-creation-attributes-supported attribute at all, but has other fax-specific attributes, like destination-uri... ones. Seems that in IPP one has to supply the phone number via destination-uri=tel:0123456789. There are also input-... attributes which describe the scanner, they seem to be for sending a fax right from the scanner, classic faxing with the computer remote-controlling via IPP instead of sending a fax job via IPP. These are probably not actually relevant for us.

@tillkamppeter
Copy link
Member

@michaelrsweet do you know what a CUPS queue which faxes the job has to put into the get-printer-attributes response so that for a client it is like a network multi-function printer's fax queue?

@michaelrsweet
Copy link
Member

[master 4e260e195] Add IPP FaxOut attributes and values for fax queues (Issue #459)

[master 37d6d37] Map destination-uris to phone and faxPrefix options (Issue #459)

@michaelrsweet michaelrsweet modified the milestones: v2.5, v2.4.3 Sep 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority-medium
Projects
None yet
Development

No branches or pull requests

4 participants