Skip to content

Add Data Matrix Rectangular Extension (DMRE) support as encoding option#631

Open
cs-ruman wants to merge 2 commits into
micjahn:masterfrom
cs-ruman:dmre-encoding-option
Open

Add Data Matrix Rectangular Extension (DMRE) support as encoding option#631
cs-ruman wants to merge 2 commits into
micjahn:masterfrom
cs-ruman:dmre-encoding-option

Conversation

@cs-ruman

@cs-ruman cs-ruman commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

This PR makes Data Matrix Rectangular Extension (DMRE) symbol selection available as an explicit opt-in encoding option.

It is related to PR #597. That PR added DMRE symbols, but the follow-up commit 4d3e585 disabled DMRE selection because it affected existing non-DMRE encoding behavior.

This PR keeps the existing default behavior unchanged:

  • DMRE symbols are not selected by default.
  • DMRE symbols are only considered when the new hint EncodeHintType.DATA_MATRIX_DMRE is explicitly enabled.
  • SymbolShapeHint keeps its existing meaning. Enabling DMRE does not force rectangular output; it only allows DMRE symbols to be selected when they otherwise match the symbol constraints.

The new option is exposed through DatamatrixEncodingOptions.EnableDMRE and passed through the encoder path down to SymbolInfo.lookup.

Added tests cover:

  • default behavior does not select DMRE,
  • opt-in behavior can select a DMRE symbol,
  • exact DMRE size constraints work only when DMRE is enabled,
  • DMRE size constraints fail without opt-in,
  • DMRE round-trip encode/decode.

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.

1 participant