Skip to content

When printing, the brazil oficio paper size (21597x35500) is judged as Legal (21590x35560) #38

@szlt5

Description

@szlt5

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions