Skip to content

receiptline/receiptjs-designer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 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, *.txt)
download Download receipt markdown (*.receipt), plain text (*.txt), SVG image (*.svg), or PNG image (*.png)
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

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

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

The Web Serial API has no write timeout, so if hardware flow control is enabled, opening the printer cover during printing may cause the browser to stop responding. In this case, close the printer cover or press the paper feed button. Alternatively, change the printer's busy condition setting from "Offline or receive buffer full" to "Receive buffer full".

The restriction on Epson TM Virtual Port on Windows that existed in previous versions has been resolved. There is no need to change the signal line settings.