lindell / lindell/JsBarcode

use marginLeft or marginRight in Node

Open
#377 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
5.9k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

my version:
"canvas": "^2.6.1",
"jsbarcode": "^3.11.3",

my code:
const canvas = createCanvas()
JsBarcode(canvas, '1234567890', { marginLeft: 40, marginRight: 50 })

JsBarcode function is not work
but if i use:
const canvas = createCanvas(400, 100)
its working

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

Reproduce the issue in Node.js using the reported canvas and JsBarcode versions, first with marginLeft and marginRight and then with an explicit 400x100 canvas. Trace why the margin-only call does not work; done means the reported Node.js example works with those margin options and a regression check covers it.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.