lsongdev / lsongdev/node-escpos

Encode picture

Open
#245 6 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

Hi there. I have some troubles with printing images. Here my source code
`const device = new escpos.Network(IP);
const options = { encoding: 'CP860' };
const printer = new escpos.Printer(device, options);
const tux = path.join(__dirname, 'tux.png');

escpos.Image.load(tux, (image) => {
device.open(() => {
printer.text('hello here');
printer.image(image);
printer.cut();
printer.close();
});
});`

below I attached photo of result, thanks for your help)

![photo_2019-12-17_18-02-05](https://user-images.githubusercontent.com/26201207/71007559-3f0cc080-20f8-11ea-98a8-28ffbbe001e8.jpg)

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 provided escpos.Network, escpos.Image.load, and printer.image flow with the attached tux.png example and compare it with the linked photo. Trace how the image is loaded and sent to the printer; done means the image prints correctly rather than producing the reported output.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js
Domain
embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.