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

CUPS queues emulate IPP Everywhere printers: Required IPP attributes not provided #4950

Closed
tillkamppeter opened this issue Jan 31, 2017 · 4 comments
Assignees
Labels
unable-to-reproduce Unable to reproduce

Comments

@tillkamppeter
Copy link

I have connected an HP Color LaserJet CM3530 MFP to my network and set it up the standard way in Ubuntu, using HP's PostScript PPD file (attached).

Inspired by the discussion about deprecation of PPD files on the CUPS mailing list, thread "PPD API: Status, future and alternatives to handle printer-specific options", I have tried to access this queue as it was an IPP Everywhere printer, for example running the commands

till@till-x1carbon:/printing/cups/bzr/y$ lpadmin -p ippcupstest -E -v ipp://till-x1carbon.local:631/printers/printer -m everywhere
lpadmin: Unable to create PPD file: No such file or directory
till@till-x1carbon:
/printing/cups/bzr/y$ driverless ipp://till-x1carbon.local:631/printers/printer > x.ppd
ERROR: Unable to create PPD file: IPP attribute "pwg-raster-document-resolution-supported" missing, needed for PWG Raster output format, not generating PPD file.
ERROR: Unable to generate PPD file.
till@till-x1carbon:~/printing/cups/bzr/y$

The "lpadmin" command with "-m everywhere" is supposed to create a new CUPS queue with a PPD file generated from printer capabilities info polled via IPP. As CUPS queues are supposed to emulate IPP Everywhere printers a queue with PPD file should have been created here. As the error message did not say a lot, I ran the "driverless" command of cups-filters, which, in the way how I called it, is supposed to simply generate the PPD based on the IPP capability info with a near identical PPD generator as CUPS uses. The error message lead me to what the problem is: The PWG-Raster-specific attributes are missing.

So I ran

ipptool -tv ipp://till-x1carbon.local:631/printers/printer get-printer-attributes.test > cups-queue-hp-clj-cm3530.txt

Output file is attached and the three "pwg-raster-document-...-supported" attributes are missing.

These attributes always have to be included, even if basic options like "Resolution", "ColorModel", or "Duplex" in the original queue's PPD file are missing. If needed, default values, like "300dpi" should be used.

This is especially important if one wants to have print dialogs not use PPD files (deprecate PPD API) as they could approach enumerating printers and options with IPP Everywhere methods then.

PPD file used for my HP Color LaserJet CM3530 MFP:
printer.ppd.txt

Output of ipptool command:
cups-queue-hp-clj-cm3530.txt

@tillkamppeter
Copy link
Author

Note that I am using CUPS 2.2.2 where Issue #4428 is fixed.

For other queues, like for example an HP inkjet with PPD from HPLIP the IPP-based PPD file is generated without problems (minor cupstestppd failures but works with CUPS).

@michaelrsweet
Copy link
Collaborator

Investigating, but it does look like the current code should be providing default values...

@michaelrsweet michaelrsweet self-assigned this Feb 1, 2017
@michaelrsweet michaelrsweet added this to the 2.2 milestone Feb 1, 2017
@michaelrsweet
Copy link
Collaborator

OK, I just tested this PPD with the current Github code (which for this is the same as 2.2.2) and I got:

lpadmin -p Test -E -i ~/Downloads/printer.ppd.txt 
ipptool -tv ipp://localhost/printers/Test get-printer-attributes.test | grep pwg
        document-format-supported (1setOf mimeMediaType) = application/octet-stream,application/pc-eps,application/pdf,application/postscript,application/tpog-ps,application/vnd.apple-postscript,application/vnd.cups-banner,application/vnd.cups-command,application/vnd.cups-postscript,application/vnd.cups-raster,application/vnd.cups-raw,application/x-cshell,application/x-csource,application/x-perl,application/x-shell,application/xhtml+xml,image/fuji-raw,image/gif,image/imageio,image/jp2,image/jpeg,image/minolta-raw,image/openexr,image/pict,image/png,image/pwg-raster,image/rad,image/tiff,image/urf,image/x-alias,image/x-bitmap,image/x-bmp,image/x-ico,image/x-icon,image/x-photocd,image/x-portable-anymap,image/x-portable-bitmap,image/x-portable-graymap,image/x-portable-pixmap,image/x-psd,image/x-qtif,image/x-sgi-rgb,image/x-sun-raster,image/x-tga,image/x-xbitmap,image/x-xpixmap,text/html,text/plain
        pwg-raster-document-type-supported (1setOf keyword) = black_1,sgray_8,srgb_8
        pwg-raster-document-resolution-supported (resolution) = 1200dpi
        pwg-raster-document-sheet-back (keyword) = normal
        pdf-versions-supported (1setOf keyword) = adobe-1.2,adobe-1.3,adobe-1.4,adobe-1.5,adobe-1.6,adobe-1.7,iso-19005-1_2005,iso-32000-1_2008,pwg-5102.3

So things appear to be working correctly. Make sure you do not have old cached data, either by deleting and re-adding the queue or by creating a new queue.

@michaelrsweet michaelrsweet added unable-to-reproduce Unable to reproduce and removed priority-low labels Feb 1, 2017
@michaelrsweet michaelrsweet removed this from the 2.2 milestone Feb 1, 2017
@tillkamppeter
Copy link
Author

I have now installed the CUPS from the current state of the GIT which still did not solve the problem. Then I have (with stopped cupsd and stopped cups-browsed) deleted the queue's cache file /var/cache/cups/printer.data and after starting the daemons again, the IPP record contains all pwg-raster-document-... attributes as expected and "lpadmin -m everywhere" and "driverless" correctly create the PPD file. Problem seems to be solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
unable-to-reproduce Unable to reproduce
Projects
None yet
Development

No branches or pull requests

2 participants