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

Specific Data Matrix sizes? #7

Open
thereddestdog opened this issue Mar 6, 2024 · 1 comment
Open

Specific Data Matrix sizes? #7

thereddestdog opened this issue Mar 6, 2024 · 1 comment

Comments

@thereddestdog
Copy link

How could I generate a 12x26 2D barcode, for example?

@ChuckTerry
Copy link

Here's some sample code for you:

// msg must be a certain length to generate 12x26, that length varies depending on character/number makeup
// rct indicates that you want a rectangle rather than a square
const options = {
  msg :  "Bacon is grand!",
  rct :   1
};

// Generate the SVG
const svg = DATAMatrix(options);

// Append it to something
document.body.appendChild(svg);

You can also check out the Live Demo for real-time generation.

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

No branches or pull requests

2 participants