Generic filters
Exact matches only
Search in title
Search in content
Search in excerpt
Generic filters
Exact matches only
Search in title
Search in content
Search in excerpt
Star Software Update: Star Document Markup Language

Star Software Update: Star Document Markup Language


Share This Post

Welcome to the Star Software Update, the regular series of blog updates where Star’s Integration Team informs you about the latest important Star Micronics software updates.

What’s New:

This month, the Star Micronics Integration Team is highlighting the Star Document Markup Language.

What is Star Document Markup Language?

Star Document Markup Language is a simple, easy-to-use markup language intended to provide the features typically required for point of sale (POS) printing.

Cloud servers based on the StarMicronics.CloudPRNT-Utility API package or tools based on it like cputil, can support the Star Document Markup Language.

Using the document markup system provides a balance between full bit-image based printing and plain text output, while being easier to use than direct device commands and far more adaptable to different output devices, like print width.

One benefit of markup is its ability to handle different print widths without compromising the receipt format. Use cases include printing order tickets in the restaurant kitchen, printing receipts for orders, or printing sticky labels to seal bags.

Star Document Markup Language is easy to read; take a look at the below example:

[align: centre][font: a]\

[image: url ;

width 60%;

min-width 48mm]\

[magnify: width 2; height 1]

This is a Star Markup Document!

[magnify: width 3; height 2]Columns[magnify]

[align: left]\

[column: left: Item 1;      right: $10.00]

[column: left: Item 2;      right: $9.95]

[column: left: Item 3;      right: $103.50]

[align: centre]\

[barcode: type code39;

data 123456789012;

height 15mm;

module 0;



Thank you for trying the new Star Document Markup Language\

we hope you will find it useful. Please let us know!

[cut: feed; partial]

This will generate the following output on Star 58mm (2-inch), 80mm (3-inch) and 112mm (4-inch) printers:


Unicode Support

By using the Star Document Markup Language, you can avoid the difficulties of limited 8-bit text encodings by being entirely Unicode-based. Input data should be from a Unicode-compatible data file or strings.

Star TSP654II, mC-Print2, and mC-Print3 devices have native support for Unicode. When a device does support Unicode directly, the Star markup renderer will automatically handle the necessary conversion.

File Format

Markup source files are plain text files encoded as UTF-8, UTF-16, or plain Ascii data.

When opening a document, initially the start of the file will be checked for a Unicode BOM (Byte Order Mark) in order to recognize that the file contains UTF-16 (Big Endian or Little Endian encoded) or UTF-8 data. If no known BOM is found, then the file will be treated as a UTF-8 file unless it contains code points that are not UTF-8 valid, in which case it will be opened finally as plain 7-bit Ascii.

In addition, the extension of the text file written in the Star Document Markup format should be “.stm”. The cputil executable and also .NET API for StarMicronics.CloudPRNT-Utility packages recognize the Star Document Markup format by checking the file name extension. If the extension is “.txt” it will be recognized as a plain text file and will not be command parsed as the Star document markup.

Next Steps

Do you have questions or concerns about the Star Document Markup Language?

More To Explore

Get product & Software updates right to your inbox