Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing registered media sizes to PWG mapping table #501

Merged
merged 1 commit into from Oct 20, 2022

Conversation

yetamrra
Copy link
Contributor

A number of sizes that were added to ipp-registrations.xml after the initial PWG 5101.1-2002 document are not currently mapped. When these sizes are mapped through a generated IPP Everywhere PPD and back to IPP media size names, they get changed into auto-generated self-describing names instead of the official registered names.

This change adds all* the missing names. Most of them don't have official MediaOptions keywords, so the PPD names are mapped to dimensions. With the updated mapping table, all of these sizes can roundtrip correctly.

This also fixes a missing unit and an incorrect name in two existing mappings for oe photo sizes.

  • iso_id-3_88x125mm is not added because it duplicates the existing iso_b7_88x125mm size.

Signed-off-by: Benjamin Gordon bmgordon@chromium.org

Copy link
Member

@zdohnal zdohnal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zdohnal zdohnal added enhancement New feature or request CUPS 3.0 Bug fix/feature relevant for CUPS 3.0 as well - port the patch to CUPS 3.0 labels Oct 19, 2022
@michaelrsweet
Copy link
Member

@zdonal I responded to the errata you filed against 5101.1 - size names all need a trailing unit so the proposed changes are correct and look good.

Copy link
Member

@zdohnal zdohnal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@michaelrsweet thx! Then the PR looks good to me, I'll let the test run and then merge and create PR for libcups.

Copy link
Member

@zdohnal zdohnal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing the approval - the test suite failed due new media sizes were marked as duplicates of existing:

 Duplicate size test: FAIL
    oe_photo-s10r_10x15in and na_10x15_10x15in have the same dimensions (25400x38100)
    prc_3_125x176mm and iso_b6_125x176mm have the same dimensions (12500x17600)
    om_postfix_114x229mm and iso_c6c5_114x229mm have the same dimensions (11400x22900)
    prc_10_324x458mm and iso_c3_324x458mm have the same dimensions (32400x45800)
    prc_5_110x220mm and iso_dl_110x220mm have the same dimensions (11000x22000)

All media sizes are defined in IANA IPP registrations, so there probably has to be an adjustment of the testsuite - @michaelrsweet is it expected to skip those duplicate sizes during testing or should we allow only the one size with the same dimensions?

@michaelrsweet
Copy link
Member

@zdohnal There should only be one size name per physical size (per PWG 5101.1), so that sounds like the PWG (and more specifically me since I am the maintainer of the registry) needs to look for duplicates and weed them out.

@yetamrra
Copy link
Contributor Author

I caught the iso_id-3 duplicate but missed those others. I can remove the duplicates and push an updated patch. Is it safe to assume that the ISO and NA sizes are preferred?

@michaelrsweet
Copy link
Member

@yetamrra Yes, ISO and NA are preferred over national or "other" prefixes.

Thanks!

@michaelrsweet
Copy link
Member

Another note: oe_photo-10r_10x15in should be oe_photo-10r_10x12in (12 inches long, not 15).

A number of sizes that were added to ipp-registrations.xml after the
initial PWG 5101.1-2002 document are not currently mapped.  When these
sizes are mapped through a generated IPP Everywhere PPD and back to IPP
media size names, they get changed into auto-generated self-describing
names instead of the official registered names.

This change adds all the non-duplicate missing names.  Most of them
don't have official MediaOptions keywords, so the PPD names are mapped
to dimensions.  With the updated mapping table, all of these sizes can
roundtrip correctly.

This also fixes a missing unit and an incorrect name in two existing
mappings for oe photo sizes.

These entries were not added due to being duplicates of existing sizes:

* iso_id-3_88x125mm duplicates iso_b7_88x125mm.
* oe_photo-s10r_10x15in duplicates na_10x15_10x15in.
* prc_3_125x176mm duplicates iso_b6_125x176mm.
* om_postfix_114x229mm duplicates iso_c6c5_114x229mm.
* prc_10_324x458mm duplicates iso_c3_324x458mm.
* prc_5_110x220mm duplicates iso_dl_110x220mm.

Signed-off-by: Benjamin Gordon <bmgordon@chromium.org>
@michaelrsweet
Copy link
Member

Another note: oe_photo-10r_10x15in should be oe_photo-10r_10x12in (12 inches long, not 15).

Whoops, not looking close enough. oe_photo-s10r_10x15in is different from oe_photo-10r_10x12in, and the "s10r" size needs to go away... :)

@yetamrra
Copy link
Contributor Author

OK, I replaced the duplicate entries with comments indicating the correct names. @michaelrsweet the duplicate entry is oe_photo-s10r_10x15in. I double-checked that oe_photo-10r_10x12in is present as well.

@zdohnal
Copy link
Member

zdohnal commented Oct 20, 2022

@zdohnal There should only be one size name per physical size (per PWG 5101.1), so that sounds like the PWG (and more specifically me since I am the maintainer of the registry) needs to look for duplicates and weed them out.

@michaelrsweet I've read both versions of PWG 5101.1 - 2002 and 2013 - do you know which section mentions this rule (one size name for physical size)? IMO it is a rule worthy of remember and my guts tell me someday I will have to reference this rule in the standard.

Copy link
Member

@zdohnal zdohnal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you for the comments about the duplicates!

@zdohnal zdohnal merged commit 0adf7ce into OpenPrinting:master Oct 20, 2022
@yetamrra yetamrra deleted the mediasizes branch October 20, 2022 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CUPS 3.0 Bug fix/feature relevant for CUPS 3.0 as well - port the patch to CUPS 3.0 enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants