Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question - API options for dots/cpl and spacing #3

Closed
sabatale opened this issue Sep 12, 2022 · 1 comment
Closed

Question - API options for dots/cpl and spacing #3

sabatale opened this issue Sep 12, 2022 · 1 comment

Comments

@sabatale
Copy link

sabatale commented Sep 12, 2022

Great library! I'm personally only interested in generating digital receipts, without the need of the printer, through the API.

I wasn't sure which options actually allow to set the width and increase spacing, just like https://receiptline.github.io/designer/? Would that be done through character limitation only? Also, is there a way to set a specific font during render (e.g., <span style="font-family:Papyrus; font-size:4em;">Thanks!</span>)? I'm trying to make it look a bit more alike with the US & CA standard.

@sabatale sabatale changed the title Options for dots/cpl and spacing Question - Options for dots/cpl and spacing Sep 12, 2022
@sabatale sabatale changed the title Question - Options for dots/cpl and spacing Question - API options for dots/cpl and spacing Sep 12, 2022
@receiptline
Copy link
Owner

Hello!

The option to set the width is -c <characters per line>.

The typical model, Epson TM-T88 series, has 42 characters per line. (resolution: 180 dpi)
Some models for Asian languages and some models for mPOS may have 48 characters per line. (resolution: 203 dpi)
The above values are for a paper width of 80 mm.

The option to adjust space is -s. (paper saving)
By default, spacing is enabled.

To set a specific font, it is better to output in SVG and replace the font setting string.
(or change the source code of lib/receiptline.js in the receiptline package)
Traditional monospaced fonts (width : height = 1 : 2) are less common now, so it's hard to adjust.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants