Closed porst17 closed 1 year ago
Could you run the command
ipptool -tv ipp://CP1500fa052c.local:631/ipp/print get-printer-attributes.test > attrs.txt
and attach the output file attrs.txt
here?
On the Ubuntu machine (now running CUPS 2.4.2), the command fails:
"/usr/share/cups/ipptool/get-printer-attributes.test":
Get-Printer-Attributes:
attributes-charset (charset) = utf-8
attributes-natural-language (naturalLanguage) = en
printer-uri (uri) = ipp://CP1500fa052c.local:631/ipp/print
requested-attributes (1setOf keyword) = all,media-col-database
Get printer attributes using get-printer-attributes [FAIL]
RECEIVED: 0 bytes in response
status-code = server-error-internal-error (Unable to read response.)
IPP request failed with status server-error-internal-error (Unable to read response.)
However, on an older MacBook running CUPS 2.2.9, the command results in:
"/usr/share/cups/ipptool/get-printer-attributes.test":
Get-Printer-Attributes:
attributes-charset (charset) = utf-8
attributes-natural-language (naturalLanguage) = en
printer-uri (uri) = ipp://localhost:6310/ipp/print
Get printer attributes using Get-Printer-Attributes [PASS]
RECEIVED: 6399 bytes in response
status-code = successful-ok (successful-ok)
attributes-charset (charset) = utf-8
attributes-natural-language (naturalLanguage) = en-us
charset-configured (charset) = utf-8
charset-supported (1setOf charset) = utf-8,us-ascii
color-supported (boolean) = true
compression-supported (keyword) = none
copies-default (integer) = 1
copies-supported (rangeOfInteger) = 1-99
document-format-default (mimeMediaType) = image/urf
document-format-supported (1setOf mimeMediaType) = image/urf,application/octet-stream,image/jpeg,image/pwg-raster
finishings-default (enum) = none
finishings-supported (enum) = none
generated-natural-language-supported (naturalLanguage) = en-us
ipp-versions-supported (1setOf keyword) = 1.1,2.0
job-creation-attributes-supported (1setOf keyword) = copies,finishings,job-name,media,media-col,orientation-requested,output-bin,print-color-mode,print-quality,printer-resolution,sides,ipp-attribute-fidelity
jpeg-k-octets-supported (rangeOfInteger) = 0-32768
jpeg-x-dimension-supported (rangeOfInteger) = 64-15000
jpeg-y-dimension-supported (rangeOfInteger) = 64-15000
landscape-orientation-requested-preferred (enum) = 5
media-col-default (collection) = {media-size={x-dimension=10000 y-dimension=14800} media-bottom-margin=370 media-left-margin=250 media-right-margin=250 media-top-margin=370 media-type=photographic media-source=photo}
media-bottom-margin-supported (1setOf integer) = 0,370,340,640
media-left-margin-supported (1setOf integer) = 0,250
media-right-margin-supported (1setOf integer) = 0,250
media-top-margin-supported (1setOf integer) = 0,370,340,640
media-col-supported (1setOf keyword) = media-size,media-bottom-margin,media-left-margin,media-right-margin,media-top-margin,media-type,media-source
media-default (keyword) = jpn_hagaki_100x148mm
media-supported (1setOf keyword) = jpn_hagaki_100x148mm,om_dsc-photo_89x119mm,om_card_54x86mm,custom_min_53x85mm,custom_max_102x153mm
media-source-supported (keyword) = photo
media-size-supported (1setOf collection) = {x-dimension=10000 y-dimension=14800},{x-dimension=8900 y-dimension=11900},{x-dimension=5400 y-dimension=8600},{x-dimension=5300-10200 y-dimension=8500-15300}
media-ready (keyword) = jpn_hagaki_100x148mm
media-col-ready (1setOf collection) = {media-size={x-dimension=10000 y-dimension=14800} media-bottom-margin=370 media-left-margin=250 media-right-margin=250 media-top-margin=370 media-type=photographic media-source=photo},{media-size={x-dimension=10000 y-dimension=14800} media-bottom-margin=0 media-left-margin=0 media-right-margin=0 media-top-margin=0 media-type=photographic media-source=photo}
media-type-supported (keyword) = photographic
natural-language-configured (naturalLanguage) = en-us
operations-supported (1setOf enum) = Print-Job,Validate-Job,Create-Job,Send-Document,Cancel-Job,Get-Job-Attributes,Get-Jobs,Get-Printer-Attributes,Identify-Printer
orientation-requested-default (enum) = portrait
orientation-requested-supported (1setOf enum) = portrait,landscape,reverse-landscape,reverse-portrait
output-bin-default (keyword) = face-up
output-bin-supported (keyword) = face-up
output-mode-default (keyword) = color
output-mode-supported (1setOf keyword) = auto,color,monochrome,auto-monochrome
pages-per-minute (integer) = 1
pages-per-minute-color (integer) = 1
pdf-versions-supported (keyword) = none
pdl-override-supported (keyword) = attempted
print-color-mode-default (keyword) = color
print-color-mode-supported (1setOf keyword) = auto,color,monochrome,auto-monochrome
print-quality-default (enum) = normal
print-quality-supported (enum) = normal
print-scaling-default (keyword) = auto
print-scaling-supported (1setOf keyword) = auto,auto-fit,fill,fit,none
printer-icons (1setOf uri) = http://localhost:6310/ipp/icons/48_48.png,http://localhost:6310/ipp/icons/128_128.png,http://localhost:6310/ipp/icons/512_512.png
printer-is-accepting-jobs (boolean) = true
printer-info (textWithoutLanguage) = Canon SELPHY CP1500
printer-location (textWithoutLanguage) =
printer-make-and-model (textWithoutLanguage) = Canon SELPHY CP1500 HTTP
printer-more-info (uri) = http://localhost:8008/index.html
printer-name (nameWithoutLanguage) = Canon SELPHY CP1500
printer-resolution-default (resolution) = 300dpi
printer-resolution-supported (resolution) = 300dpi
printer-supply-info-uri (uri) = http://localhost:8008/supply/ink_content.html
printer-up-time (integer) = 474
printer-uri-supported (1setOf uri) = ipp://localhost:631/ipp/print,ipps://localhost:443/ipp/print
printer-uuid (uri) = urn:uuid:8d5c2600-762e-4d80-8d80-5c625afa052c
queued-job-count (integer) = 0
sides-default (keyword) = one-sided
sides-supported (keyword) = one-sided
urf-supported (1setOf keyword) = W8,SRGB24,V1.5,RS300,IS7,MT11,PQ4,OB9,IFU0,OFU0,CP99
uri-authentication-supported (1setOf keyword) = none,none
uri-security-supported (1setOf keyword) = none,tls
printer-device-id (textWithoutLanguage) = MFG:Canon;CMD:URF;MDL:SELPHY CP1500;CLS:PRINTER;URF:W8,SRGB24,V1.5,RS300,IS7,MT11,PQ4,OB9,IFU0,OFU0,CP99;
identify-actions-default (keyword) = flash
identify-actions-supported (keyword) = flash
printer-kind (keyword) = photo
printer-state (enum) = idle
printer-state-reasons (keyword) = none
multiple-operation-time-out (integer) = 200
multiple-document-jobs-supported (boolean) = false
multiple-document-handling-default (keyword) = single-document
multiple-document-handling-supported (keyword) = single-document
ipp-features-supported (1setOf keyword) = airprint-1.4,airprint-1.3,wfds-print-1.0,airprint-1.5,airprint-1.6,airprint-1.7,airprint-1.8,airprint-2.1
job-ids-supported (boolean) = true
print-content-optimize-default (1setOf keyword) = photo,auto
print-content-optimize-supported (1setOf keyword) = photo,auto
printer-dns-sd-name (nameWithoutLanguage) = Canon SELPHY CP1500
printer-firmware-name (nameWithoutLanguage) = External Firm ver, Internal Firm ver
printer-firmware-patches (textWithoutLanguage) =
printer-firmware-string-version (textWithoutLanguage) = 1.0.1.0, 1.32
printer-firmware-version (octetString) = 01000100,0120
printer-geo-location (uri) = geo:0.0000000,0.0000000,0;u=0
printer-input-tray (octetString) = type=sheetFeedAutoRemovableTray;mediafeed=300;mediaxfeed=300;maxcapacity=18;level=-2;status=0;name=InputTray;index=1;dimunit=tenThousandthsOfInches;unit=sheets;medianame=unknown;mediaweight=-2;mediatype=photographic;mediacolor=white;
printer-output-tray (octetString) = type=removableBin;maxcapacity=-2;remaining=-2;status=0;name=OutputTray;index=1;dimunit=sheets;unit=sheets;stackingorder=firstToLast;pagedelivery=faceUp;offsetstacking=notPresent;
printer-supply (octetString) = index=1;class=other;type=inkRibbon;unit=sheets;maxcapacity=36;level=-2;colorantindex=1;colorantrole=other;colorantname=other;coloranttonality=128;
pwg-raster-document-resolution-supported (resolution) = 300dpi
pwg-raster-document-type-supported (keyword) = rgb_8
page-ranges-supported (boolean) = false
jpeg-features-supported (keyword) = none
job-mandatory-attributes-supported (boolean) = true
job-spooling-supported (keyword) = stream
print_wfds (textWithoutLanguage) = T
mopria-certified (textWithoutLanguage) = 2.1
The file /usr/share/cups/ipptool/get-printer-attributes.test
is different on both machines.
Ubuntu with CUPS 2.4.2:
# Get printer attributes using get-printer-attributes
{
# The name of the test...
NAME "Get printer attributes using get-printer-attributes"
# The resource to use for the POST
# RESOURCE /admin
# The operation to use
OPERATION get-printer-attributes
# The version to use
VERSION 2.0
# Attributes, starting in the operation group...
GROUP operation
ATTR charset attributes-charset utf-8
ATTR language attributes-natural-language en
ATTR uri printer-uri $uri
ATTR keyword requested-attributes all,media-col-database
# What statuses are OK?
STATUS successful-ok
# What attributes do we expect?
EXPECT charset-configured
EXPECT charset-supported
EXPECT compression-supported
EXPECT document-format-default
EXPECT document-format-supported
EXPECT generated-natural-language-supported
EXPECT ipp-versions-supported
EXPECT media-col-default
EXPECT natural-language-configured
EXPECT operations-supported
EXPECT printer-info
EXPECT printer-is-accepting-jobs
EXPECT printer-location
EXPECT printer-make-and-model
EXPECT printer-more-info
EXPECT printer-name
EXPECT printer-state
EXPECT printer-state-reasons
EXPECT printer-up-time
EXPECT printer-uri-supported
EXPECT uri-authentication-supported
EXPECT uri-security-supported
}
MacOS with CUPS 2.2.9:
# Get printer attributes using get-printer-attributes
{
# The name of the test...
NAME "Get printer attributes using Get-Printer-Attributes"
# The operation to use
OPERATION Get-Printer-Attributes
# Attributes, starting in the operation group...
GROUP operation-attributes-tag
ATTR charset attributes-charset utf-8
ATTR language attributes-natural-language en
ATTR uri printer-uri $uri
# What statuses are OK?
STATUS successful-ok
# What attributes do we expect?
EXPECT charset-configured
EXPECT charset-supported
EXPECT compression-supported
EXPECT document-format-default
EXPECT document-format-supported
EXPECT generated-natural-language-supported
EXPECT ipp-versions-supported
EXPECT natural-language-configured
EXPECT operations-supported
EXPECT pdl-override-supported
EXPECT printer-is-accepting-jobs
EXPECT printer-name
EXPECT printer-state
EXPECT printer-state-reasons
EXPECT printer-up-time
EXPECT printer-uri-supported
EXPECT queued-job-count
EXPECT uri-authentication-supported
EXPECT uri-security-supported
}
Should I post the results of one of the other ipptootl
tests on the CUPS 2.4.2 machine?
$ ls /usr/share/cups/ipptool/
cancel-current-job.test get-ppds-make-and-model.test ipp-2.2.test
create-job-format.test get-ppds-make.test ipp-backend.test
create-job-sheets.test get-ppds-product.test ipp-everywhere.test
create-job.test get-ppds-psversion.test print-job-and-wait.test
create-job-timeout.test get-ppds.test print-job-deflate.test
create-printer-subscription.test get-ppd.test print-job-gzip.test
cups-create-local-printer.test get-printer-attributes-suite.test print-job-hold.test
fax-job.test get-printer-attributes.test print-job-letter.test
get-completed-jobs.test get-printer-description-attributes.test print-job-manual.test
get-devices.test get-printers-printer-id.test print-job-media-col.test
get-job-attributes2.test get-printers.test print-job-media-needed.test
get-job-attributes.test get-subscriptions.test print-job-password.test
get-jobs.test identify-printer-display.test print-job.test
get-job-template-attributes.test identify-printer-multiple.test print-uri.test
get-notifications.test identify-printer.test set-attrs-hold.test
get-ppd-printer.test ipp-1.1.test validate-job.test
get-ppds-drv-only.test ipp-2.0.test
get-ppds-language.test ipp-2.1.test
@porst17 Could you copy the file /usr/share/cups/ipptool/get-printer-attributes.test in your home directory, and then edit the line
ATTR keyword requested-attributes all,media-col-database
in the following ways:
#ATTR keyword requested-attributes all,media-col-database
ATTR keyword requested-attributes all
ATTR keyword requested-attributes media-col-database
for each of these cases could you run the below command and attach the resulting files here?
ipptool -tv ipp://CP1500fa052c.local:631/ipp/print~/get-printer-attributes.test > attrs-N.txt
@Ankit3002 Here are the files you requested.
media-col-database
: attrs-N-all.txtall
: attrs-N-media-col-database.txtThe first two result in [PASS]
, the last one in [FAIL]
.
I have investigated and found the possible cause of this bug.
The problem was thatthe first margin value in each of the printer IPP attributes media-left/right/top/bottom-margin-supported
got ignored and for your printer it happened to be the zero value which indicates borderless printing support.
I have fixed this now via commit 109981f3 on the cups-filters 1.x branch. It was already fixed in the second generation of cups-filters, in libcupsfilters.
If you are familiar with compiling, you could apply the patch and try it out (or take the current GIT state of cups-filters 1.x).
Thanks for looking into it! I compiled the 1.x branch of cups-filters from source, but it doesn't seem to fix the issue.
./driverless "driverless:ipps://Canon%20SELPHY%20CP1500._ipps._tcp.local/"
results in the same cropped ImageableArea
:
ImageableArea Postcard: "18 36 265.464566929134 383.527559055118"
PaperDimension Postcard: "283.464566929134 419.527559055118"
@porst17 Could you run
./driverless -d "driverless:ipps://Canon%20SELPHY%20CP1500._ipps._tcp.local/" > ppd.txt 2>debug.txt
and attach both ppd.txt
and debug.txt
. Do not package the two files together and do not compress them.
Also make sure that the ./driverless
is what you have actually compiled.
@porst17 could you run the following command and attach attrs.txt
?
ipptool --ippserver attrs.txt 'ipps://Canon%20SELPHY%20CP1500._ipps._tcp.local/' get-printer-attributes.test
attrs.txt
is now in a special format that anyone having this file can emulate your printer, for example to debug any client software (like cups-filters in this case).
To emulate the printer with the help of your file any user who downloads your file can run the command:
ippeveprinter -a attrs.txt testprinter
and run client software against it:
driverless
driverless ipps://testprinter._ipps._tcp.local/ > out.ppd
to debug the client software ...
So, @porst17, could you run the ipptool
command I posted here?
By the way, I have run the above command on my printer, and edited the attrs.txt
to resemble the problem of your printer and for me my fix works and I get correct PPD files for borderless printing with both cups-filters 1.x and 2.x. So, @porst17, to find out whether you have perhaps done something wrong with compiling cups-filters with my fix or my fix is not covering your problem I am asking you for the attrs.txt
of your printer. My edited, artificial attrs.txt
perhaps does not hit the actual problem.
Here are the files you requested: ppd.txt debug.txt attrs.txt
Note that the command
ipptool --ippserver attrs.txt 'ipps://Canon%20SELPHY%20CP1500._ipps._tcp.local/' get-printer-attributes.test
does not work with this printer. The system's get-printer-attributes.test
contains the line
ATTR keyword requested-attributes all,media-col-database
which results in a [FAIL]
response (see above), because the printer doesn't seem to support the attribute media-col-database
. Therefore, the attrs.txt file has been generated with a modified get-printer-attributes.test
that does not require media-col-database
, i.e. the modified line reads
ATTR keyword requested-attributes all
I hope this still does the job for debugging purposes.
The ./driverless
command I used is the BASH wrapper script present at the top level of the repo (1.x branch) after calling make
(the script itself seems generated by libtool
and points to the binary in ./.libs
). It also utilizes the libcupsfilters.so.1
that's part of the build results (and not the one coming with the OS). If I should call a different executable, let me know.
Thank you very much, @porst17, and especially also thanks for using the alternative test file without media-col-database
. I forgot that detail when asking you to do the last command.
I have found out now why my fix did not work for you. Your printer gives different answers in the case of using ATTR keyword requested-attributes all
and of no ATTR keyword requested-attributes ...
at all (commented out). Only the latter case, which is what your Mac uses, supplies
media-bottom-margin-supported (1setOf integer) = 0,370,340,640
media-left-margin-supported (1setOf integer) = 0,250
media-right-margin-supported (1setOf integer) = 0,250
media-top-margin-supported (1setOf integer) = 0,370,340,640
in the answer. This is missing in the former case, which is the one you used for yesterday's command and which libcupsfilters also uses a fallback when it does not get an answer with ATTR keyword requested-attributes all,media-col-database
. So requested-attributes=all
and not supplying the 'requested-attributes` attribute at all gives different answers.
I based my fix in cups-filters 1.x on you output with media-bottom-margin-supported ...
and saw the zero as first item of the list and checking the code I found it got overlooked, which I had fixed. With my test yesterday I confirmed that my fix worked, meaning considering the full lists now.
Now, as I see that the problem persisted for you, I have compared your files which you attached on Jan 9, as they are all the same format, and I discovered what I described above. Before I was simply assuming that all
is the default if requested-attributes
is not supplied, which is not the case. I did not compare these ~100 lines one by one in the first place, the output looked equal for me at the first glance.
Now the question is, especially also to @michaelrsweet, how does one "correctly" poll the properties of a driverless IPP printer and how does one interpret them correctly?
Important here is especially that requested-attributes all,media-col-database
fails for several printers, and that doing several attempts until succeeding or doing several different versions and merging them, will take time and cause problems like OpenPrinting/cups#347.
@michaelrsweet what is Mac OS exactly doing? Two get-printer-attributes
requests where the first is without requested-attributes
and the second is with requested-attributes media-col-database
? Or does it only the first of these two, completely forgetting about media-col-database
?
My suggestion for being safest would be two separate request, one without requested-attributes
and the second is with requested-attributes media-col-database
. But would this double the time to get the complete answer?
And also for the parsing of the answers: Where do I have to loo whether borderless printing is available? media-XXX-margin-supported
? media-col-database
? media-col-ready
? ... and in which priority order?
@michaelrsweet is there a standard on how to poll and how to parse the printer properties data from a driverless IPP printer?
@tillkamppeter The macOS system I used for comparison is an older one running macOS Mojave and cups 2.2.9, which uses a different get-printer-attributes.test
file (see above). This file does not contain the problematic line media-col-database
, i.e. the get-printer-attributes.test
just doesn't fail with cups 2.2.9 when called against that printer. I can't say anything about newer macOS versions possibly running newer versions of cups.
I don't know if that's what you were asking for, but I wanted to point that out again, just to make sure we are all on the same page.
@tillkamppeter ALL IPP printers are supposed to support the "requested-attributes" attribute with one or more values representing attribute names or groups of attributes: 'all', 'printer-description', and 'job-template' for Get-Printer-Attributes. This has been part of IPP since v1.0 and is called out in both STD 92 (RFC 8011) for the latest IETF IPP/1.1 and in the PWG specifications for IPP/2.0 and IPP Everywhere, not to mention for Apple's AirPrint. So that is the standard for querying attributes.
A printer that does not support this is broken, and honestly for the ones that are broken it is really hard to come up with a workaround since the "media-col-database" attribute is only returned when explicitly requested since it is so large compared to the other attributes. Conceptually you could do two separate requests (Get-Printer-Attributes without "requested-attributes" and Get-Printer-Attributes with "requested-attributes" = 'media-col-database', which takes less than twice the amount of time), but you have to decide that you'll be maintaining that hack forever (I never wanted to - make the printer vendors fix their f'ing printers!) Plus the current private API we use for PPD generation expects everything in a single IPP response so you'll need to copy the "media-col-database" attribute from the second response to the end of the first response.
The first troubleshooting step for any printer with this problem is to update the firmware on the printer.
The various macOS software lists all of the attributes they care about explicitly in "requested-attributes" or uses the defaults (if "media-col-database" isn't necessary). The macOS "ipp2ppd" program (AirPrint PPD generator) also does multiple Get-Printer-Attributes requests.
WRT detecting borderless support, you want to look at media-col-database and media-col-ready (for loaded media) - not all sizes will support borderless so you look for entries with 0 margins.
Actually, updating the printer firmware was the first thing I did during the troubleshooting process. The most recent version (1.0.1.0, 1.32) was installed before I opened this issue in the bug tracker.
From a developer perspective, I totally understand that you don't want to introduce special treatments of non-conformant printers. From the perspective of the end-user, there is not much I can do to "fix" broken printer firmware. I could call the Canon 1st-level support, but they will probably not even understand the problem, because "it's just working on Windows, macOS, Android and iOS". 🙁
@porst17 could you create a queue with the following command:
lpadmin -p testprinter -E -v 'ipps://Canon%20SELPHY%20CP1500._ipps._tcp.local/' -m everywhere
Does this queue allow borderless printing?
This uses CUPS' internal functionality to poll the properties of a driverless IPP printer and to generate the PPD file.
Parsing "media-col-ready" in addition helps in this case as the borderless variant is listed. The PPD contained the borderles variant only for the paper size currently loaded, though, not for the other sizes. I have commited the change to both libcupsfilters 2.x and cups-filters 1.x now.
I have also added now a separate poll for "media-col-database" , for the case that it did not get obtained in the first place. This way we get a much higher probability to not miss important info about the printer. Especially we get then borderless only for the sizes actually supporting it, and not for every size when we fall back to "media-size-supported" or "media-supported" due to lack of "media-col-database".
@porst17 can you test with this now? Do you get borderless for all page sizes now?
I tested 54608f9 (1.x branch) and it works flawlessly. The result of driverless
now contains several .Borderless
page formats. After system-wide installation of this version of cups-filters, the page formats are also available in the print dialogs of various apps and I have been able to successfully print photos without a visible border on the Canon SELPHY CP1500! Great to see this working! I am really looking forward to the next release! Thanks a lot for your efforts!
@porst17 thanks a lot for your feedback. One last thing I want to ask you for: Could you attach your print queue's current PPD file (from /etc/cups/ppd/
)? Thanks.
@michaelrsweet It seems that having the media-col-database
is very important to get complete information about media sizes, margins, ... and what works together. As there are several printers which do not cope with "all,media-col-database" in one get-printer-attributes request, I highly recommend for CUPS to either generally poll "all" and "media-col-database" in separate requests, or when "all,media-col-database" has failed and we are falling back to "all", doing a separate "media-col-database" and if we get a result add that "media-col-database" attribute to the response of the "all" (it is very easy, see my commit 54608f9) and if we get no result, ignore the fact and live with only the answer of "all", without "media-col-database".
The requested PPD file: SELPHY-CP1500.ppd 🤝
Thank you very much @porst17 . This looks absolutely correct for me now and shows all 3 page sizes also in a borderless variant. Only with the "media-col-ready" parsing added one gets the borderless variant only for the loaded size, in your case Postcard, with the separate poll of ¨media-col-database" one gets borderless for all sizes.
@michaelrsweet , is there a person from Canon in PWG? I recall we (in CUPS) had a similar report, where a Canon printer wasn't able to answer to a request with all, media-col-database
response - it looks like a common problem with Canon (here is the issue I was talking about, but I recall they were others, but I didn't have the label for them yet :D ).
In general Canon IPP firmware looks problematic - we have two printers in our office which can't give a valid IPP response (they put a collection into 1setof keyword type attribute...), so having some person in Canon would help.
But I can understand why some people can make a mistake in this (RFC 8011 - Get Printer Attributes operation):
In the request, the Client supplies the set
of Printer attribute names and/or attribute group names in which the
requester is interested.
Some people can understand it as the client can ask for attribute names or attribute group names exclusively because of and/or
- meaning if the client can ask only for one type of names. Some languages have this 'exclusive or' meaning (f.e. 'Do you want coffee, or tea' and you can't want both) - so probably some developers understood it this way, prohibiting attribute group and attribute combinations. Do you think it can be rephrased? Or is it rephrased in newer PWGs? I haven't seen an additional changes in the newer IPP versions.
@zdohnal but assuming that this form of mis-understanding is there and is the possible reason why "all,media-col-database" requests fail on many printers does not only explain that these failures are rather common but also justifies that in cups-filters and also in CUPS we should have a fallback to poll the two separately (what I did in cups-filters now) or even poll the two separately in the first place. So I again highly recommend to do this in CUPS, @michaelrsweet ... Such a software workaround can be done by us immediately (as I did in cups-filters), getting all manufacturers fixing their firmware on all models, all users finding out that there is new fixed firmware, ... will take ages or, most probably never get completed ...
@tillkamppeter Feel free to tackle updating and maintaining this workaround code, but I don't have the bandwidth. And honestly if it was all Canon printers I might be more concerned but so far it looks like a handful of models.
I am forwarding this issue to the Canon PWG rep (Steven Young)...
@michaelrsweet the addition which I would do to CUPS for the separate poll of "media-col-database" is small, the same ~20 lines I already have added to the two generations of cups-filters. Not much work to add an d maintain. So I think I will do it.
@michaelrsweet or is the "ultimative" solution for this problem how you are doing in libcups3 in the cupsCopyDestInfo()
(file cups/dest-options.c
)?
Here you first poll only job-template
, media-col-database
, and printer-description
and not all
and media-col-database
. You also try a downgrade to version 1.1 as we all are already doing, and repeat up to 10 times in case of the printer being busy.
@tillkamppeter The printers having trouble with "all,media-col-database" will have the same issues with the other group names...
So we need to do the same thing in CUPS 3.x ...
I am trying to set up the Canon SELPHY CP1500 network photo printer on Ubuntu 22.04 (cups 2.4.1) for borderless printing. When printing on macOS, the print dialog offers borderless medias in the media selection dialog. When printing on Android (Mopria), there is a dedicated toggle for "Borderless".
On Linux, however, there is neither "borderless" media to select nor a dedicated "Borderless" option. In the CUPS web interface, the printer's Make and Model is listed as "Canon SELPHY CP1500 HTTP, driverless, cups-filters 1.28.15".
The generated PPD file (internally via the
driverless
command?) contains the lineand all photo prints have a white margin around the actual content.
After editing the PPD by hand and setting
the photos are printed borderless as expected.
I also played with
ipptool
and was able to send JPEG images directly to the printer using the following IPP file:Images send this way are also printed borderless on the CP1500.
There seems to be something wrong with how the
ImageableArea
of the PPD is determined.For debugging purposes, I attached the PPD output and debug log of
The PPD generated by the above is identical to
/etc/cups/ppd/Canon-SELPHY-CP1500.ppd
.Canon-SELPHY-CP1500.ppd
:debug.log
: