lsongdev / lsongdev/node-escpos
Barcode options
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.6k
- Forks
- 443
- PR merge metrics
- No merged PRs in 30d
Description
Hello, I was testing the latest master and noticed some weird things happening with the barcode options.
There is no example in the README with the options syntax, so I had to figure out the implementation using the info available, but, the documentation states that:
> "options.width" is a numeric value in the range between (1,255) Default: 64
> "options.height" is a numeric value in the range between (2,6) Default: 3
I was having trouble with this and reading through the source i found out that this is backwards, the width should be [1,2,3,4,5] as it is the key of the `BARCODE_WIDTH` object, and the height should be betwen 1~255.
Also I noticed that the line that says
> "options.position" is where to place the code around the bars, could be one of the following values:
> * ABOVE
> * BELOW
> * BOTH
> * OFF
in the source code was actually expecting:
* OFF
* ABV
* BLW
* BTH
I like to know if my findings are correct, and what is the correct form of the barcode options.
If there is an error, being documentation or source, I would be more than happy to contribute by fixing it, but right now I don't know what is the expected form
Cheers
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the README barcode-options documentation and the source defining the BARCODE_WIDTH object and accepted position values. Compare the documented width, height, and position syntax with the implementation, then update the documentation and add an options example that reflects the confirmed behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nodejs, typescript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100