Skip to content

receiptline/receiptjs-designer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Receipt.js Designer

A development tool to edit, preview, and print the receipt markdown.
https://receiptline.github.io/receiptjs-designer/

designer

Editor and viewer

Main area for editing a receipt markdown file.
This preview is displayed side by side.

^^^RECEIPT

03/18/2024, 12:34:56 PM
Asparagus | 1| 1.00
Broccoli  | 2| 2.00
Carrot    | 3| 3.00
---
^TOTAL | ^6.00

example

Menu bar

File

Control Description
open Open receipt markdown (*.receipt, *.text)
download Download receipt markdown (*.receipt) or SVG image (*.svg)
print Print receipt markdown
option Set print options

Insert

Control Description
image Insert image
{image:...}
barcode Insert barcode
{code:...; option:...}
2dcode Insert 2D code
{code:...; option:...}
format Insert formatting
{width:...; border:...; text:...; align:...}

Edit

Control Description
column Add Column delimiter
|
hr Add horizontal rule
-
cut Add paper cut
=
ul Underline text
_
em Emphasize text
"
invert Invert text
`
size Enlarge text
^

View

Control Description
zoom Zoom in/out
language Select language
width Change print width (cpl: characters per line)
landscape Enable/Disable landscape orientation
spacing Enable/Disable line spacing

Web browsers

  • Modern Web browsers

The print function is available on Chrome, Edge, and Opera for PCs that support the Web Serial API.
(Windows, Linux, Mac, and ChromeOS)

Receipt printers

  • Epson TM series
  • Seiko Instruments RP series
  • Star MC series
  • Citizen CT series
  • Fujitsu FP series

Connect with the Web Serial API.
(Bluetooth, virtual serial port, and serial port)

Epson TM series (South Asia model) and Star MC series (StarPRNT model) can print with device font of Thai characters.

Restrictions

When connecting a USB printer with Epson TM Virtual Port on Windows

Closing the virtual port to which no printer is connected may cause the browser to stop responding.
Please change the signal line setting to "RS-232C cross cable".

tmvpd

If the printer goes offline during print data transmission and the virtual port is closed, the browser may stop responding.
In this case, press the printer's paper feed button.

License

  • Receipt.js
    • Apache License, Version 2.0
  • QR Code Generator for JavaScript with UTF8 Support
    • MIT License