cups-filters
cups-filters copied to clipboard
cupsRasterReadHeader2 changes from 2.3.2 to 2.4.2
I've noticed that cupsRasterReadHeader2 populates the CUPS page header differently between version 2.3.2 (Ubuntu 20) and version 2.4.2 (Ubuntu 24), leading to a change in printer behavior. I couldn't find any related warnings or bug reports online. Has anyone else encountered this issue?
I am not aware of any changes to this code for CUPS/PWG raster data. I do know that CUPS 2.4.x has better support/mapping for Apple raster data.
What changes are you seeing?
In the PageSize for example. To provide more context I'm using this filter implementation and here they dump the header loaded from cupsRasterReadHeader2 to a txt file, that's were I'm seeing different values on some the header members.
(I raised a similar issue there also.)
Please include (as attachment or inline) the differences you are seeing between CUPS 2.3.x and 2.4.x.
Also, note that this repository is for libcups in CUPS 3.0, which doesn't support printer drivers. I will likely be moving this over to the original OpenPrinting cups project which tracks CUPS 2.x.
Moved to CUPS repository; please provide the before-and-after values so we can start tracking the issue down...
This is the raw debug output in Ubuntu 20 (cups 2.3.2): debugraster-U20.txt
and this one I get in Ubuntu 24 (cups 2.4.2): debugraster-U24.txt
So we have these differences regarding how the cupsRasterReadHeader2 loads the cups_page_header2_t object:
cups_page_header2_t field |
Value in Ubuntu 20 | Value in Ubuntu 24 |
|---|---|---|
| ImagingBoundingBox | 14 0 315 211 | 14 0 212 182 |
| PageSize | 329 211 | 226 182 |
| cupsWidth | 849 | 595 |
| cupsHeight | 595 | 513 |
| cupsBytesPerLine | 107 | 70 |
| cupsPageSize | 329.000000 211.000000 | 226.006302 182.012604 |
| cupsImagingBBox | 14.000000 0.000000 315.000000 211.000000 | 14.003150 0.000000 212.003159 182.012604 |
| cupsRenderingIntent | '' | 'auto' |
| cupsPageSizeName | 'Custom.329.00x211.00' | '79.73x64.21mm' |
I both cases I used the same ppd file (added '.txt' to the end so github doesn't complain): zj80.ppd.txt
which is complied from this drv file: zjdrv.drv.txt
and used this pdf: repro.pdf
OK, this really has nothing to do with the CUPS library or raster functions, but with the filter that produced the raster data. And the chosen page sizes aren't even the same...
Sending this over to cups-filters but you'll need to test printing with the same options on both OS versions.
I did use the same options in both OS versions, notice that PageSize is printed from the cups_page_header2_t object in the filter implementation that's why I'm suspicious of cupsRasterReadHeader2.
I had the same issue and found the solution in the following forum. Looks like the default option for page scaling changed in some version of cups between 2.3.2 and 2.4.2