Describe the bug
For the brazil oficio paper size, printer-app announces the pwg name as "om_b-oficio_215.97x355mm"
But during printing, printer-app receives the pwg-name as "custom_215.97x355mm_215.97x355mm"
The printer-app invokes ppdCacheGetPageSize() to get the most suitable paper by the page's width & height.
And the ppdCacheGetPageSize() uses 176 for delta when comparing sizes, so the "B-officio" is judged as "Legal".
Additional context
(1) When printing, printer-app uses the ppdCacheGetPageSize() to get the most suitable paper:
|
if ((choicestr = ppdCacheGetPageSize(pc, attrs, NULL, NULL)) != NULL) |
(2) The ppdCacheGetPageSize() uses 176 for delta when comparing sizes
https://github.com/OpenPrinting/libppd/blob/0ca86faf3b0f661a725abb33117a2e16611c240c/ppd/ppd-cache.c#L3933
(3) It is recommended to use 50 for delta when comparing the sizes. Such as below commit:
OpenPrinting/libppd@c9f3e8f
Describe the bug
For the brazil oficio paper size, printer-app announces the pwg name as "om_b-oficio_215.97x355mm"
But during printing, printer-app receives the pwg-name as "custom_215.97x355mm_215.97x355mm"
The printer-app invokes
ppdCacheGetPageSize()to get the most suitable paper by the page's width & height.And the
ppdCacheGetPageSize()uses 176 for delta when comparing sizes, so the "B-officio" is judged as "Legal".Additional context
(1) When printing, printer-app uses the
ppdCacheGetPageSize()to get the most suitable paper:pappl-retrofit/pappl-retrofit/print-job.c
Line 502 in 6317091
(2) The
ppdCacheGetPageSize()uses 176 for delta when comparing sizeshttps://github.com/OpenPrinting/libppd/blob/0ca86faf3b0f661a725abb33117a2e16611c240c/ppd/ppd-cache.c#L3933
(3) It is recommended to use 50 for delta when comparing the sizes. Such as below commit:
OpenPrinting/libppd@c9f3e8f