Looking for a custom TastyIgniter theme or extension development? Request a quote now!

Star CloudPRNT

Created by Daigo Kawasaki
  2 installs

Print from Star CloudPRNT enabled Printers.

$50.00/site
billed yearly
  1 year of updates and support
  30 day money-back guarantee
  • Version:
    v1.0.0
  • Last Updated:
    3 months ago
  • Published:
    04 Aug 22
  • License:

Star Micronics CloudPRNT for Tasty Igniter

This extension adds a thermal print queue for usage with a Star Micronics CloudPRNT enabled printer. As of the writing of this document, CloudPRNT enabled printers are limited to

TSP654II SP742 TSP743II TSP847II mC-Print3 mC-Print2

As several of these printers have non-LAN enabled versions, please confirm that you're using a printer with Star Micronics CloudPRNT before attempting to utilize this extension.

Specifically, this extension is written for the mC-print3 printer, and has been tested on this printer exclusively.

Setup

Printer Setup

Once this extension is installed, you'll need to configure your printer to poll the TastyIgniter server. Please reference the Official Star Micronics Setup Instructions for up-to-date instructions on how to set up your printer. Once CloudPRNT is enabled, the "Server URL" field should be "https://www.my-tastyigniter.com/starcloudprnt/poll". The Username and Password fields are optional, but supported by this extension, so there's not much reason not to put something in there.

Obtain your printer's MAC address from either the admin home screen (something like http://192.168.1.254/html/main.htm) or by printing out a status page. In your Tasty Igniter admin page, go to Tools > StarCloudPRNT Printers and add a new printer. Enter the MAC address exactly as printed (include the ':'s) into the MAC Address field, and fill in the Username and Password if you added one above.

Once saved, you'll see tabs for "Manual Layout" and "Automatic Layout". Test your printer by adding one of the example layouts to the list of Manual Layouts, then go to your admin orders page and hit print. Make sure you can print something at this step before continuing!

Printer Modes

This extension can print in starsbcs mode or img/png mode. img/png mode is highly experimental, and may require installation of additional packages on your server.

starsbcs

starsbcs is much faster, but only supports the text font installed on the printer itself. At larger font sizes, text will look pixelated. Changing Google Fonts is not supported.

img/png

In img/png mode, the entire layout will be rendered to an image, and sent to the printer as a png, thus greatly increasing the time it takes to print, however complex characters will print much clearer, and not look pixelated at larger font sizes.

img/png mode relies on puppeteer to render the receipt in a headless browser, and may not work on your server out of the box. On Ubuntu 20.04, the libgbm-dev package is additionally required, which can be installed with sudo apt-get install -y libgbm-dev. Again, this mode is still highly experimental and not recommended for production environments.

Designing Layouts

This extension uses ReceiptLine to template receipt layouts, which will be generated from TI's blade templating. Design new templates by going to Design > ReceiptLine Layouts and creating a new layout. There are two layouts included for your convenience, but it's recommended to design your own for your purposes. You can use the built-in preview option, or alternately use ReceiptLine's online designer to create new layouts, and copy them into your TastyIgniter Admin.

Layouts can be limited to certain categories, and will print nothing if an order contains no items in the filtered categories. The rest of the layout settings are fed directly into the ReceiptLine Printer Configuration - the default values should work for most situations.

Google Fonts

If printing in img/png mode, then you can set the name of a Google Webfont in the "Google Font" field eg "Roboto Mono". Letter spacing will only work for monospace fonts, since the font is changed after the SVG rendering process. The default font face is "Courier Prime". Note that the preview is rendering an svg in your browser, but the extension is ultimately using puppeteer, there may be slight differences between the generated image and the receipt that gets printed out.

Extension Settings + some inner workings

Node.JS

ReceiptLine is written in javascript, and therefore requires a node runtime to work. If one isn't already installed on your system, this extension will install it to extensions/cupnoodles/starcloudprnt/vendor/bin/node, however, if your system already has node.js installed, it won't be installed again. Please find your node binary with which node and enter this into the 'Node Path' setting under Settings => StarCloudPRNT Settings.

The Print Queue

You can view the queued print jobs under System > CloudPRNT Print Queue. Both Manual and Auto printing modes adds a printer+layout combination, after which your printers will poll the server to check for new print jobs. You can delete items that are "stuck" in the print queue from this page, although if anything does get stuck, then there's likely another, underlying problem that needs to be fixed (like your printer not supporting this print mode).

Releases

  1.   Latest release
    v1.0.0

    Initial release - img/png printing is still very slow and very much experimental. Only starsbcs mode is officially supported.

$50.00/site
billed yearly
  1 year of updates and support
  30 day money-back guarantee
  • Version:
    v1.0.0
  • Last Updated:
    3 months ago
  • Published:
    04 Aug 22
  • License:

Build and sell all things TastyIgniter

Become an Author
Continue