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

Create PPD file from get-printer-attributes #5238

Closed
mfauvain opened this issue Jan 24, 2018 · 26 comments
Closed

Create PPD file from get-printer-attributes #5238

mfauvain opened this issue Jan 24, 2018 · 26 comments
Assignees
Labels
investigating Investigating the issue priority-medium
Milestone

Comments

@mfauvain
Copy link

Hi, trying to get a Canon Pixma Pro 10 to work with ubuntu 17.10 + cups 2.2.4. Not able to get anything working even with driverless ipp config in cups (which seems weird to me as ipp driverless printing works even with my iphone) Then I stumbled upon this excellent appimage and finally managed to get a printed photo out!
I have the complete printer attributes from ippsample ipptool -t -v ipp:https://....../ipp/print get-printer-attributes-2.0.test and was wondering if I could possibly get a .ppd file generated from ippsample to then use this when configuring the printer in cups.
Any help greatly appreciated

@KurtPfeifle
Copy link

Which appimage are you talking about?

@mfauvain
Copy link
Author

the appimage I used to get the photo printed out is ippsample. worked perfect. however when I want to print from cups directly it fails, even though cups discover the printer and has it as driverless ipp printer.. So my idea was that cups had a wrong .ppd file generated. On the other hand ippsample seems to have it right.

@mfauvain
Copy link
Author

With a bit more time into it, I realized ippsample is just a helper/sample that uses the ipptool function that comes with CUPS. Still, I don't understand why ipptool prints correctly but cups (from cups:631 web) doesnt. the only way to have a print is from cli tool ipptool. From any app (using gnome) it doesnt print, from cups web (print test page) it doesnt print.. so back to my doubt, is it a .ppd issue? is the one generated by cups wrong?

@michaelrsweet
Copy link
Collaborator

@mfauvain ipptool submits the file directly to the printer, while CUPS runs filters to generate a printable file. It is entirely possible that the filters or PPD are not right, particularly in CUPS 2.2.4 (current stable 2.2.x is 2.2.6), and since this particular printer doesn't support IPP Everywhere you are depending on unsupported (beta) code for generating Apple raster data for the printer when printing through CUPS. (the printer supports JPEG natively, which is why you can print via ipptool)

If possible, can you test against the current stable release (2.2.6)?

@michaelrsweet michaelrsweet self-assigned this Jan 26, 2018
@michaelrsweet michaelrsweet added the duplicate This issue or pull request already exists label Jan 26, 2018
@mfauvain
Copy link
Author

@michaelrsweet, thank you for the help. I tried cups 2.2.6 but still no printing. I've noticed though the cups-filter version is the same as when using cups 2.2.4. I see both using cups-filter 1.17.9.
You say the printer doesn't support IPP everywhere, but I can print jpeg, pdf etc from my phone (with no driver here), isn't this ipp everywhere?

@mfauvain
Copy link
Author

Installed cups-filter 1.19.0 but still no printing from cups...

@mfauvain
Copy link
Author

Installed Cups 2.3b2/ cups filter 1.19.0 but still no printing from cups.

@michaelrsweet
Copy link
Collaborator

@mfauvain This printer supports AirPrint, which is not the same as IPP Everywhere (two different, if related, standards). Your phone is converting PDFs to a raster format that is supported by the printer. Your CUPS system needs to the same, but it sounds like something isn't working properly.

It would be VERY helpful if you can attach the generated PPD to this issue - you'll find the PPD under /etc/cups/ppd.

Thank you!

@mfauvain
Copy link
Author

Here is the .ppd generated by cups 2.2.4/filter 1.17.9 from earlier. I'll post the one generated by the latest install (cups 2.3b2/filter 1.19.0) in a moment.

*PPD-Adobe: "4.3"
*FormatVersion: "4.3"
*FileVersion: "2.2"
*LanguageVersion: English
*LanguageEncoding: ISOLatin1
*PSVersion: "(3010.000) 705"
*LanguageLevel: "3"
*FileSystem: False
*PCFileName: "ippeve.ppd"
*Manufacturer: "Canon"
*ModelName: "Canon PRO-10 series"
*Product: "(Canon PRO-10 series)"
*NickName: "Canon PRO-10 series, driverless, cups-filters 1.17.9"
*ShortNickName: "Canon PRO-10 series"
*ColorDevice: True
*cupsVersion: 2.2
*cupsSNMPSupplies: False
*cupsLanguages: "en"
*cupsFilter2: "image/pwg-raster image/pwg-raster 0 -"
*cupsFilter2: "image/urf image/urf 100 -"
*cupsFilter2: "image/jpeg image/jpeg 0 -"
*OpenUI *PageSize: PickOne
*OrderDependency: 10 AnySetup *PageSize
*DefaultPageSize: Letter
*PageSize 3.5x5: "<</PageSize[252 360]>>setpagedevice"
*PageSize Postcard: "<</PageSize[283.464566929134 419.527559055118]>>setpagedevice"
*PageSize 4x6: "<</PageSize[288 432]>>setpagedevice"
*PageSize 5x7: "<</PageSize[360 504]>>setpagedevice"
*PageSize A5: "<</PageSize[419.527559055118 595.275590551181]>>setpagedevice"
*PageSize B5: "<</PageSize[515.905511811024 728.503937007874]>>setpagedevice"
*PageSize 8x10: "<</PageSize[576 720]>>setpagedevice"
*PageSize A4: "<</PageSize[595.275590551181 841.889763779528]>>setpagedevice"
*PageSize Letter: "<</PageSize[612 792]>>setpagedevice"
*PageSize Legal: "<</PageSize[612 1008]>>setpagedevice"
*PageSize B4: "<</PageSize[728.503937007874 1031.811023622047]>>setpagedevice"
*PageSize Tabloid: "<</PageSize[792 1224]>>setpagedevice"
*PageSize A3: "<</PageSize[841.889763779528 1190.551181102362]>>setpagedevice"
*CloseUI: *PageSize
*OpenUI *PageRegion: PickOne
*OrderDependency: 10 AnySetup *PageRegion
*DefaultPageRegion: Letter
*PageRegion 3.5x5: "<</PageSize[252 360]>>setpagedevice"
*PageRegion Postcard: "<</PageSize[283.464566929134 419.527559055118]>>setpagedevice"
*PageRegion 4x6: "<</PageSize[288 432]>>setpagedevice"
*PageRegion 5x7: "<</PageSize[360 504]>>setpagedevice"
*PageRegion A5: "<</PageSize[419.527559055118 595.275590551181]>>setpagedevice"
*PageRegion B5: "<</PageSize[515.905511811024 728.503937007874]>>setpagedevice"
*PageRegion 8x10: "<</PageSize[576 720]>>setpagedevice"
*PageRegion A4: "<</PageSize[595.275590551181 841.889763779528]>>setpagedevice"
*PageRegion Letter: "<</PageSize[612 792]>>setpagedevice"
*PageRegion Legal: "<</PageSize[612 1008]>>setpagedevice"
*PageRegion B4: "<</PageSize[728.503937007874 1031.811023622047]>>setpagedevice"
*PageRegion Tabloid: "<</PageSize[792 1224]>>setpagedevice"
*PageRegion A3: "<</PageSize[841.889763779528 1190.551181102362]>>setpagedevice"
*CloseUI: *PageRegion
*DefaultImageableArea: Letter
*DefaultPaperDimension: Letter
*ImageableArea 3.5x5: "18.141732283465 14.173228346457 234.141732283465 345.826771653543"
*PaperDimension 3.5x5: "252 360"
*ImageableArea Postcard: "18.141732283465 14.173228346457 265.606299212598 405.354330708661"
*PaperDimension Postcard: "283.464566929134 419.527559055118"
*ImageableArea 4x6: "18.141732283465 14.173228346457 270.141732283465 417.826771653543"
*PaperDimension 4x6: "288 432"
*ImageableArea 5x7: "18.141732283465 14.173228346457 342.141732283465 489.826771653543"
*PaperDimension 5x7: "360 504"
*ImageableArea A5: "18.141732283465 14.173228346457 401.669291338583 581.102362204724"
*PaperDimension A5: "419.527559055118 595.275590551181"
*ImageableArea B5: "18.141732283465 14.173228346457 498.047244094488 714.330708661417"
*PaperDimension B5: "515.905511811024 728.503937007874"
*ImageableArea 8x10: "18.141732283465 14.173228346457 558.141732283465 705.826771653543"
*PaperDimension 8x10: "576 720"
*ImageableArea A4: "18.141732283465 14.173228346457 577.417322834646 827.716535433071"
*PaperDimension A4: "595.275590551181 841.889763779528"
*ImageableArea Letter: "18.141732283465 14.173228346457 594.141732283465 777.826771653543"
*PaperDimension Letter: "612 792"
*ImageableArea Legal: "18.141732283465 14.173228346457 594.141732283465 993.826771653543"
*PaperDimension Legal: "612 1008"
*ImageableArea B4: "18.141732283465 14.173228346457 710.645669291339 1017.637795275591"
*PaperDimension B4: "728.503937007874 1031.811023622047"
*ImageableArea Tabloid: "18.141732283465 14.173228346457 774.141732283465 1209.826771653543"
*PaperDimension Tabloid: "792 1224"
*ImageableArea A3: "18.141732283465 14.173228346457 824.031496062992 1176.377952755905"
*PaperDimension A3: "841.889763779528 1190.551181102362"
*OpenUI *InputSlot: PickOne
*OrderDependency: 10 AnySetup *InputSlot
*DefaultInputSlot: Manual
*InputSlot Auto/Automatic: "<</MediaPosition 0>>setpagedevice"
*InputSlot Rear/Rear: "<</MediaPosition 18>>setpagedevice"
*InputSlot Manual/Manual: "<</MediaPosition 4>>setpagedevice"
*CloseUI: *InputSlot
*OpenUI *MediaType: PickOne
*OrderDependency: 10 AnySetup *MediaType
*DefaultMediaType: Photographic
*MediaType Photographic/Photo Paper: "<</MediaType(Photographic)>>setpagedevice"
*MediaType Stationery/Plain Paper: "<</MediaType(Stationery)>>setpagedevice"
*CloseUI: *MediaType
*OpenUI *ColorModel/Color Mode: PickOne
*OrderDependency: 10 AnySetup *ColorModel
*ColorModel RGB/Color: "<</cupsColorSpace 19/cupsBitsPerColor 8/cupsColorOrder 0/cupsCompression 0>>setpagedevice"
*ColorModel Gray/Grayscale: "<</cupsColorSpace 18/cupsBitsPerColor 8/cupsColorOrder 0/cupsCompression 0>>setpagedevice"
*DefaultColorModel: RGB
*CloseUI: *ColorModel
*DefaultResolution: 600dpi
*OpenUI *cupsPrintQuality/Print Quality: PickOne
*OrderDependency: 10 AnySetup *cupsPrintQuality
*DefaultcupsPrintQuality: 4
*cupsPrintQuality 4/Normal: "<</HWResolution[600 600]>>setpagedevice"
*cupsPrintQuality 5/High: "<</HWResolution[600 600]>>setpagedevice"
*CloseUI: *cupsPrintQuality

@michaelrsweet
Copy link
Collaborator

This PPD isn't from CUPS or is using some unsupported fork of the CUPS PPD generator. I don't believe that this particular printer actually supports PWG Raster files for printing (which is what the PPD says), and thus when you try to print the printer is rejecting what is being sent to it.

Try using:

lpadmin -p printer-name -E -v ipp:https://printer-address/ipp/print -m everywhere

@michaelrsweet michaelrsweet added the third-party This issue is in a third-party component label Jan 29, 2018
@mfauvain
Copy link
Author

I am away and printer is not connected at moment so cant try lpadmin line. I did however tried that excat same line last week with no succes (maybe was with cups 2.2.4 still though).. Will connect printer and report asap.
In the meantime, here is the .ppd generated by cups 2.3b2/filter 1.19 (weird it still has cups version as 2.2 when I confirm the running version is 2.3b2)

[x@Archie ~]$ cups-config --version
2.3b2

*PPD-Adobe: "4.3"
*FormatVersion: "4.3"
*FileVersion: "1.19.0"
*LanguageVersion: English
*LanguageEncoding: ISOLatin1
*PSVersion: "(3010.000) 0"
*LanguageLevel: "3"
*FileSystem: False
*PCFileName: "drvless.ppd"
*Manufacturer: "Canon"
*ModelName: "Canon PRO-10 series"
*Product: "(Canon PRO-10 series)"
*NickName: "Canon PRO-10 series, driverless, cups-filters 1.19.0"
*ShortNickName: "Canon PRO-10 series"
*ColorDevice: True
*cupsVersion: 2.2
*cupsSNMPSupplies: False
*cupsLanguages: "en"
*APSupplies: "http:https://000000F8A378.local./index.html?PAGE_AAP"
*cupsFilter2: "image/pwg-raster image/pwg-raster 0 -"
*cupsFilter2: "image/urf image/urf 100 -"
*cupsFilter2: "image/jpeg image/jpeg 0 -"
*OpenUI *PageSize/Media Size: PickOne
*OrderDependency: 10 AnySetup *PageSize
*DefaultPageSize: A4
*PageSize 3.5x5/3.5 x 5": "<</PageSize[252 360]>>setpagedevice"
*PageSize 4x6/4 x 6": "<</PageSize[288 432]>>setpagedevice"
*PageSize 5x7/5 x 7": "<</PageSize[360 504]>>setpagedevice"
*PageSize 8x10/8 x 10": "<</PageSize[576 720]>>setpagedevice"
*PageSize A3/A3: "<</PageSize[841.889763779528 1190.551181102362]>>setpagedevice"
*PageSize A4/A4: "<</PageSize[595.275590551181 841.889763779528]>>setpagedevice"
*PageSize A5/A5: "<</PageSize[419.527559055118 595.275590551181]>>setpagedevice"
*PageSize B4/JIS B4: "<</PageSize[728.503937007874 1031.811023622047]>>setpagedevice"
*PageSize B5/JIS B5: "<</PageSize[515.905511811024 728.503937007874]>>setpagedevice"
*PageSize Legal/US Legal: "<</PageSize[612 1008]>>setpagedevice"
*PageSize Letter/US Letter: "<</PageSize[612 792]>>setpagedevice"
*PageSize Postcard/Hagaki: "<</PageSize[283.464566929134 419.527559055118]>>setpagedevice"
*PageSize Tabloid/11 x 17": "<</PageSize[792 1224]>>setpagedevice"
*CloseUI: *PageSize
*OpenUI *PageRegion/Media Size: PickOne
*OrderDependency: 10 AnySetup *PageRegion
*DefaultPageRegion: A4
*PageRegion 3.5x5/3.5 x 5": "<</PageSize[252 360]>>setpagedevice"
*PageRegion 4x6/4 x 6": "<</PageSize[288 432]>>setpagedevice"
*PageRegion 5x7/5 x 7": "<</PageSize[360 504]>>setpagedevice"
*PageRegion 8x10/8 x 10": "<</PageSize[576 720]>>setpagedevice"
*PageRegion A3/A3: "<</PageSize[841.889763779528 1190.551181102362]>>setpagedevice"
*PageRegion A4/A4: "<</PageSize[595.275590551181 841.889763779528]>>setpagedevice"
*PageRegion A5/A5: "<</PageSize[419.527559055118 595.275590551181]>>setpagedevice"
*PageRegion B4/JIS B4: "<</PageSize[728.503937007874 1031.811023622047]>>setpagedevice"
*PageRegion B5/JIS B5: "<</PageSize[515.905511811024 728.503937007874]>>setpagedevice"
*PageRegion Legal/US Legal: "<</PageSize[612 1008]>>setpagedevice"
*PageRegion Letter/US Letter: "<</PageSize[612 792]>>setpagedevice"
*PageRegion Postcard/Hagaki: "<</PageSize[283.464566929134 419.527559055118]>>setpagedevice"
*PageRegion Tabloid/11 x 17": "<</PageSize[792 1224]>>setpagedevice"
*CloseUI: *PageRegion
*DefaultImageableArea: A4
*DefaultPaperDimension: A4
*ImageableArea 3.5x5: "18.141732283465 14.173228346457 234.141732283465 345.826771653543"
*PaperDimension 3.5x5: "252 360"
*ImageableArea 4x6: "18.141732283465 14.173228346457 270.141732283465 417.826771653543"
*PaperDimension 4x6: "288 432"
*ImageableArea 5x7: "18.141732283465 14.173228346457 342.141732283465 489.826771653543"
*PaperDimension 5x7: "360 504"
*ImageableArea 8x10: "18.141732283465 14.173228346457 558.141732283465 705.826771653543"
*PaperDimension 8x10: "576 720"
*ImageableArea A3: "18.141732283465 14.173228346457 824.031496062992 1176.377952755905"
*PaperDimension A3: "841.889763779528 1190.551181102362"
*ImageableArea A4: "18.141732283465 14.173228346457 577.417322834646 827.716535433071"
*PaperDimension A4: "595.275590551181 841.889763779528"
*ImageableArea A5: "18.141732283465 14.173228346457 401.669291338583 581.102362204724"
*PaperDimension A5: "419.527559055118 595.275590551181"
*ImageableArea B4: "18.141732283465 14.173228346457 710.645669291339 1017.637795275591"
*PaperDimension B4: "728.503937007874 1031.811023622047"
*ImageableArea B5: "18.141732283465 14.173228346457 498.047244094488 714.330708661417"
*PaperDimension B5: "515.905511811024 728.503937007874"
*ImageableArea Legal: "18.141732283465 14.173228346457 594.141732283465 993.826771653543"
*PaperDimension Legal: "612 1008"
*ImageableArea Letter: "18.141732283465 14.173228346457 594.141732283465 777.826771653543"
*PaperDimension Letter: "612 792"
*ImageableArea Postcard: "18.141732283465 14.173228346457 265.606299212598 405.354330708661"
*PaperDimension Postcard: "283.464566929134 419.527559055118"
*ImageableArea Tabloid: "18.141732283465 14.173228346457 774.141732283465 1209.826771653543"
*PaperDimension Tabloid: "792 1224"
*HWMargins: "18.141732283465 14.173228346457 17.858267716535 14.173228346457"
*ParamCustomPageSize Width: 1 points 252.283464566929 1008
*ParamCustomPageSize Height: 2 points 360 1916.220472440945
*ParamCustomPageSize WidthOffset: 3 points 0 0
*ParamCustomPageSize HeightOffset: 4 points 0 0
*ParamCustomPageSize Orientation: 5 int 0 3
*CustomPageSize True: "pop pop pop <</PageSize[5 -2 roll]/ImagingBBox null>>setpagedevice"
*OpenUI *InputSlot/Media Source: PickOne
*OrderDependency: 10 AnySetup *InputSlot
*DefaultInputSlot: Rear
*InputSlot Auto/Automatic: "<</MediaPosition 0>>setpagedevice"
*InputSlot Rear/Rear: "<</MediaPosition 18>>setpagedevice"
*InputSlot Manual/Manual: "<</MediaPosition 4>>setpagedevice"
*CloseUI: *InputSlot
*OpenUI *MediaType/Media Type: PickOne
*OrderDependency: 10 AnySetup *MediaType
*DefaultMediaType: Photographic
*MediaType Photographic/Photo Paper: "<</MediaType(Photographic)>>setpagedevice"
*MediaType Stationery/Stationery: "<</MediaType(Stationery)>>setpagedevice"
*CloseUI: *MediaType
*OpenUI *ColorModel/Print Color Mode: PickOne
*OrderDependency: 10 AnySetup *ColorModel
*ColorModel RGB/Color: "<</cupsColorSpace 19/cupsBitsPerColor 8/cupsColorOrder 0/cupsCompression 0>>setpagedevice"
*ColorModel Gray/Grayscale: "<</cupsColorSpace 18/cupsBitsPerColor 8/cupsColorOrder 0/cupsCompression 0>>setpagedevice"
*DefaultColorModel: RGB
*CloseUI: *ColorModel
*DefaultResolution: 600dpi
*OpenUI *cupsPrintQuality/Print Quality: PickOne
*OrderDependency: 10 AnySetup *cupsPrintQuality
*DefaultcupsPrintQuality: 4
*cupsPrintQuality 4/Normal: "<</HWResolution[600 600]>>setpagedevice"
*cupsPrintQuality 5/High: "<</HWResolution[600 600]>>setpagedevice"
*CloseUI: *cupsPrintQuality
*OpenUI *print-scaling/Print Scaling: PickOne
*OrderDependency: 10 AnySetup *print-scaling
*Defaultprint-scaling: auto
*print-scaling none/None: ""
*print-scaling fill/Fill: ""
*print-scaling fit/Fit: ""
*print-scaling auto-fit/Auto Fit: ""
*print-scaling auto/Automatic: ""
*CloseUI: *print-scaling

@mfauvain
Copy link
Author

Here is the .ppd generated with lpadmin command (ColorJetTest.ppd I've just added a .txt extension to be able to upload it here). I've also managed to find the .ppd generated (upon driver install) on an OSX machine I have here. I've also setup this printer as AirPrint on OSX but cant find the corresponding .ppd..

ColorJetTest.ppd.txt
MACOSX-CanonIJPRO10series.ppd.txt

@mfauvain
Copy link
Author

Maybe another piece to this puzzle, avahi broswe shows the only file format advertised by the printer are : TXT pdl = application/octet-stream,image/urf,image/jpeg

@michaelrsweet
Copy link
Collaborator

@mfauvain Can you run the following command and attach the output to this issue?

ipptool -tv ipp:https://printer-address/ipp/print get-printer-attributes.test >attributes.txt

Thanks!

@michaelrsweet michaelrsweet added Waiting on Review investigating Investigating the issue priority-medium and removed duplicate This issue or pull request already exists third-party This issue is in a third-party component labels Feb 20, 2018
@michaelrsweet michaelrsweet added this to the CUPS 2.3.x milestone Feb 20, 2018
@michaelrsweet
Copy link
Collaborator

Closing for lack of a response; can re-open if we have the information requested above...

@mfauvain
Copy link
Author

mfauvain commented Mar 8, 2018

Hi Michael, sorry was out for some time, back in 2d and will send requested info.

@mfauvain
Copy link
Author

Printer attributes as requested.
attributes.txt

@michaelrsweet michaelrsweet reopened this Mar 12, 2018
@michaelrsweet
Copy link
Collaborator

Reopening for now; my guess is that while this printer reports support for PWG Raster, it may not implement it correctly.

@mfauvain
Copy link
Author

So printing from phone uses jpeg? or a different implementation of pwg-raster format?

@michaelrsweet
Copy link
Collaborator

Printing a photo will typically use JPEG directly.

For other types of output, PWG Raster is used from Android phones while iPhones use Apple Raster - both share a common heritage and compression codec...

@mfauvain
Copy link
Author

ok. I tried printing any document (photo, pdf, docx) from iphone and it works. Any chance to get this working from linux or dead end?

@michaelrsweet
Copy link
Collaborator

That's why I reopened the bug... :)

Short term fix: remove the line reading:

*cupsFilter2: "image/pwg-raster image/pwg-raster 100 -"

from the PPD file and then update with:

lpadmin -p queuename -i filename.ppd

where "queuename" is the print queue name and "filename.ppd" is the PPD file you edited.

(the "ColorJetTest.ppd.txt" you attached should work once you remove the pwg-raster line)

@mfauvain
Copy link
Author

thank you, will try later on today. So essentially that would allow jpeg and apple image/urf printing, correct?

@michaelrsweet
Copy link
Collaborator

Right, and tell CUPS to convert everything else into image/urf.

@mfauvain
Copy link
Author

works perfect, thank you vmuch.

@michaelrsweet
Copy link
Collaborator

[master e6062e8] Fix printing to some IPP Everywhere printers (Issue #5238)

[branch-2.2 b237ae8] Fix printing to some IPP Everywhere printers (Issue #5238)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigating Investigating the issue priority-medium
Projects
None yet
Development

No branches or pull requests

3 participants