Closed zdohnal closed 1 year ago
@tillkamppeter ping
We must be careful here. If no "PageSize" or "media" option is supplied to a job, many filters (especially for PDF and PostScript) assume the input page size for each page of the job (which can change throughout the job), so we have to check whether adding a copy of media-col-default
as media-col
could defeat this, making these filter assuming that the user specified a page size. What we actually have to do is to try harder to find the default page size of the printer. If we have media-col-default
we should actually use the default size described there, independent whether there is a media-col
job attribute set or not.
Solved https://github.com/OpenPrinting/libcupsfilters/issues/26 in libcupsfilters. The bug also occurs when no PPD file is given (broken output instead of fallback to US Letter).
Solved via: https://github.com/OpenPrinting/libcupsfilters/commit/5238c6ef69acb
But thanks anyway for the bug report and the investigations.
We would generate
media-col
attribute only if we hadmedia-col-default
attribute andPageSize
ormedia
options, which doesn't seem to be always the case forPageSize
andmedia
. These options usually are not default options and if the application doesn't send them, they are not sent to filters.The current implementation breaks image printing for (at least) printers installed with Postscript driver - the printer outputs an empty sheet of paper. It happens because
cfFilterImageToPDF()
doesn't get page size by other means.