Skip to content

Paper sizes that do not support borderless printing are displayed as the paper sizes for borderless printing in the print dialog. #89

@mpdt2

Description

@mpdt2

Describe the bug
Please refer to Issue #591 of cups-filters below.
OpenPrinting/cups-filters#591

Additional context
After our further investigation, there seems to be a problem in cfGenerateSizes () function of “ipp.c”.

The function gets the margin of the media size from the responses of media-top-margin-supported, media-left-margin-supported, media-right-margin-supported, media-bottom-margin-supported and media-col-database. Then the function adds “.Borderless” suffix to the name of the media size if the top, left, right and bottom margins are 0mm. The steps of the function are as follows.

  1. The minimum values of the top, left, right and bottom margins supported by the printer are obtained from the responses of media-xxx-margin-supported.

  2. The name of the media size is obtained from CUPS by using the dimension of the media size in the response of media-col-database.

  3. The top, left, right and bottom margins of the media size are obtained from the response of media-col-database.

  4. If the top, left, right and bottom margins of the media size obtained in the step 3 are 0mm, “.Borderless” suffix is added to the name of the media size obtained in the step 2.

  5. The name of the media size created in the step 4 is added to the media sizes array.

  6. The steps 2-5 are executed for each media size in the response of media-col-database.

  7. The name of the media size is obtained from CUPS by using the dimension of the media size in the response of media-size-supported.

  8. If the top, left, right and bottom margins of the media size obtained in the step 1 are 0mm, “.Borderless” suffix is added to the name of the media size obtained in the step 7.

  9. The name of the media size created in the step 8 is added to the media sizes array.

  10. The steps 7-9 are executed for each media size in the response of media-size-supported.

  11. The name of the media size is obtained from CUPS by using the self-describing name of the media size in the response of media-supported.

  12. If the top, left, right and bottom margins of the media size obtained in the step 1 are 0mm, “.Borderless” suffix is added to the name of the media size obtained in the step 11.

  13. The name of the media size created in the step 12 is added to the media sizes array.

  14. The steps 11-13 are executed for each media size in the response of media-supported.

  15. The media sizes array is returned.

The response of media-xxx-margin-supported lists different margins if the printer supports media sizes having different margins. If one of the media sizes is for borderless printing, the response of media-xxx-margin-supported contains 0. For example, the responses of media-xxx-margin-supported from Canon TS8700 series printer are as follows.

media-top-margin-supported 500,0,800,600,10
media-left-margin-supported 340,0,640,560,600,500,10
media-right-margin-supported 340,0,630,560,600,500,10
media-bottom-margin-supported 500,0,1270,600,10

In this case, the minimum value of the top, left, right and bottom margins in the step 1 is 0mm. Therefore, the function adds “.Borderless” suffix to the name of all the media sizes and adds to the media sizes array in the step 8-9, 12-13 even if some media sizes don’t support borderless printing.
As a result, paper sizes that do not support borderless printing are displayed as the paper sizes for borderless printing in the print dialog.

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