lindell / lindell/JsBarcode

Barcode value is being cut off

Open
#281 3 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
5.9k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

## Problem
It looks like this library doesn't calculate the viewbox properly when rendering a jagged UPC barcode with the value printed underneath.

## Example

```js
JsBarcode('#barcode', '673006885997', {
format: 'UPC',
width: 2,
height: 32
});
```

## Expected
![image](https://user-images.githubusercontent.com/37711786/53260656-a2c08b80-3697-11e9-83c0-74cb406a32c3.png)

## Actual
![image](https://user-images.githubusercontent.com/37711786/53260696-bd930000-3697-11e9-8908-dd55fd9af22f.png)

(Notice the barcode value being cut off at the bottom.)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the JavaScript example in the issue with format UPC, width 2, and height 32, then inspect the barcode rendering path that calculates the viewBox. Done means the value printed beneath the jagged barcode is fully visible rather than clipped, matching the expected rendering.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.