lsongdev / lsongdev/node-escpos

How to put two QRcodes on the same line?

Open
#369 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
1.6k
Forks
443
PR merge metrics
No merged PRs in 30d

Description

Using the following code will cause the qrcode to wrap. I want the qrcode to be at the same level. How can I modify it? thanks

device.open(function () {
printer
.qrimage('https://github.com/song940/node-escpos', { type: 'png', size: 5 },
)
.qrimage('https://github.com/song940/node-escpos', { type: 'png', size: 5 }, function (err) {
this.cut();
//this.close();
});
});

This is what I printed out:
IMG_4273

I want to print this type of layout:
IMG_4274

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the two chained qrimage calls inside device.open and inspect how the printer output differs from the requested layout. Trace the qrimage entry point and determine whether the existing API supports horizontal placement; done means documenting or confirming a supported approach for printing both QR codes on one line.

Written by the indexing model from the issue text.

Assessment

Tech stack
nodejs, typescript
Domain
embedded-iot
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.