Skip to content

Duplicate manufacturer names (“Hewlett-Packard” + “HP”) appear in printer identifiers and DNS-SD; de-duplicate based on libcupsfilters logic.#117

Open
NullYing wants to merge 1 commit intoOpenPrinting:masterfrom
NullYing:patch-2

Conversation

@NullYing
Copy link
Contributor

Some HP printers have duplicated manufacturer names in multiple identifier fields, such as the full company name “Hewlett‑Packard” and its abbreviation “HP” appearing at the same time. This can cause recognition or matching issues.

Example:

Manufacturer:  Hewlett‑Packard
Product:       HP LaserJet 1020
Ieee1284ID:    MFG:Hewlett‑Packard;MDL:HP LaserJet 1020;CMD:ACL;CLS:PRINTER;DES:HP LaserJet 1020;FWVER:20080222;
DNS‑SD: Hewlett‑Packard HP LaserJet 1020

Proposed Fix / Reference:

https://github.com/OpenPrinting/libcupsfilters/blob/5d1b247a73dcd68d7bf155436d2865ddaec7601b/cupsfilters/ieee1284.c#L327

@alexpevzner
Copy link
Member

Hi!

I'm not sure I want to go this way. There are so many manufacturers and each has its own ideas regarding naming things. And these ideas vary from model to model event on the same manufacturer...

To simplify task of finding the right string for matching, the ipp-usb check command is provided; it prints the actual string that can be used for matching.

@fabled
Copy link
Contributor

fabled commented Mar 15, 2026

I think it makes sense to do the two exceptions CUPS does (and apparently is consistently done in all over linux code):

  • Hewlett-Packard -> HP
  • Lexmark International -> Lexmark

The rationale is that the main stream printing system does it. And it helps have uniform names. This also works the remove the duplicate prefix because vendors typical have the manufacturer as a prefix in the device name. Doing this helps to have consistent product name.

CUPS has this logic in the two main backends (and few other places):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants