Star webPRNT User's Manual

Star webPRNT SDK

This SDK contains HTML files and JavaScript files.

The HTML files are the sample program to introduce the total procedures to print via a web browser by using the WebPRNT functions.
Learn how to control your printer by actually running it.

The JavaScript files are the library files for embedding WebPRNT functions provided by Star.
Don't modify them, and they can be loaded from the HTML file.

Sample Program List

HTML File

NameDescription
ComparisonReceiptDesign.htmlConfirms if it is possible to print with device fonts and Canvas drawing

JavaScript File

NameDescription
StarWebPrintBuilder.jsCreates Star webPRNT Request Element
StarWebPrintTrader.jsSends Star webPRNT Request Element and checks status from received Star webPRNT Request Element
StarBarcodeEncoder.jsCreates barcode module for drawing to a HTML5 Canvas 2D context
StarWebPrintExtManager.jsWatches the barcode reader and printer status by StarWebPRNTExtManager request element and StarWebPRNTExtManager response element.
StarWebPrintDisplayBuilder.jsCreates Star webPRNT display request element

* The JavaScript files are the library files for embedding WebPRNT functions provided. Don't modify them, and they can be loaded from the HTML file.


Web Server Registration

Copy all sample program files for the Public folder according to the Web server operating manual.

How to use

Star HE07x/08x Interface Printer, mC-Print3 and mC-Print2

  1. Open CompariosReceiptDesign.html on your server and check if the JavaScript/Canvas works properly with your browser.
    ComparisonReceiptDesign error screen

    * If the message "Your browser does not support JavaScript!" appears on your browser, check the JavaScript setting and make it valid.

    * If the message "Your browser does not support Canvas!" appears on your application, change (or upgrade) your browser to one which supports Canvas function.

  2. Edit the StarWebPRNT end point URL in accordance with the IP address of the printer.

    If you publish your web app on https, please use https encrypted communication with SSL/TLS to send a print request from the web app to the printer.

    Example: https://192.168.1.100/StarWebPRNT/SendMessage

    If the request is sent by http communication without encryption, it will fail due to the cross scheme (https ⇔ http) limitation of the browser, and printing will also fail.

    ComparisonReceiptDesign setting screen

    mC-Print3 and mC-Print2 supports SSL/TLS communication when it is used only for printing processes.
    HE07x/08x supports SSL/TLS communication if a “S” mark is stamped on the interface chassis.
    When using Chrome or Edge, the HE07X/08X interface firmware version must be 4.1 or later.

    When performing HTTPS encrypted communication using SSL/TLS, it is necessary to set certificates both at the printer and at the browser which is used. For details about the setting procedure, refer to the following.
  3. Press the “Send (API)” button to check if it is possible to print with device fonts
  4. Press the “Send (Canvas)” button to check if it is possible to print with Canvas drawing.


Setting the certificate for the client side

When using the self-signed certificate that is set for the printer or a CA-signed certificate which you issued yourself, it is necessary to set the certificate at the client side.

Windows10(Edge)


Specifying a self-signed certificate file

  1. Download the certificate from the settings screen (Web Configuration) of the printer which is used.

    * Configure the printer-side settings in advance.

  2. Click [Open] from the pop-up menu.
  3. Click [Open].
  4. Select the downloaded certificate file and open “Certificate Import Wizard”.
  5. Import the certificate.
  6. Import the certificate



Specifying a CA-signed certificate file

  1. Open [Control Panel] - [Internet Properties], and click "Certificates" on the "Content" tab.
  2. Select the "Trusted Root Certification Authorities" tab, and click [Import].
  3. Click [Next].
  4. Click [Browse] and select the CA-signed certificate file.
  5. Import the certificate.
  6. Import the certificate



Import the certificate

  1. Click [Next].
  2. Select [Place all certificates in the following store], and click [Browse].
  3. Select "Trusted Root Certification Authorities", and click [OK].
  4. Click [Next].
  5. Click [Finish] to import the certificate.
  6. If there is no problem with the warning contents, click [Yes].
  7. Click [OK] to exit the wizard.
  8. The imported certificate is added to the list of trusted root certification authorities.
    Turn on the printer power again, and check that it is possible to access the printer web screen with an address beginning with "https:⁄⁄"

iOS(Safari)

When setting the certificate for the iOS device, use Safari and download the certificate.

  1. When the certificate is downloaded, the following message will appear.
    Tap [Allow].
  2. Tap [Close].
  3. Open the "Settings", and tap [Profile Downloaded].
  4. Tap "Install".
  5. Enter your passcode.
  6. Tap "Install".
  7. Tap [Install].
  8. Tap [Done]. Certificate installation is completed.
  9. Next configure the certificate trust settings.
    Open the "Settings", and open [General]-[About]-[Certificate Trust Settings].
  10. Turn [ON] the switch of the installed certificate.
  11. Check the warning message. If there are no problems, tap [Continue].
  12. Certificate settings are now completed.
    Turn on the printer power again, and check that it is possible to access the printer web screen with an address beginning with "https:⁄⁄"


Android(Google Chrome)

  1. When the certificate is downloaded, the following message will appear.
    Specify the certificate name (any name) and tap [OK].
  2. Open the "Settings", and tap "Security".
  3. Tap "Encryption & credentials".
  4. Tap "Install from strage".
  5. Tap the downloaded certificate file “StarCertificate.cer.crt”.
    The certificate will be installed.
  6. From [Settings] - [Security] - [Encryption & credentials], open "Trusted credentials" and check the certificate status.
  7. Open the “USER” tab and tap the installed certificate information.
  8. The contents of the installed certificate are displayed.
    Certificate install is now completed.
    Turn on the printer power again, and check that it is possible to access the printer web screen with an address beginning with "https:⁄⁄"


Launching the Star webPRNT Browser by URL scheme (iOS/Android)

You can launch the Star webPRNT Browser by URL scheme. Also, by specifying the URL you want to open, the launched the Star webPRNT Browser will open the specified page.

If you just want to launch the the Star webPRNT Browser, please specify (A) for iOS and (A)-(B) for Android.

If you want to launch the Star webPRNT Browser then open the specified URL, please specify (A)-(E) entirely.

The URL of (E) should be percent encoded. For example, if you want to open https://starmicronics.com/, the URL you need would be webprnt://starmicronics.com/open?url=https%3A%2F%2Fstarmicronics.com%2F.

URL Scheme
  • webprnt://
  • starmicronics.com
  • /open
  • ?url=
  • [URL] - The URL you want to open via the Star webPRNT Browser

Star webPRNT Browser (iOS/Android) User Agent

With the Star webPRNT Browser, the following character string is included in the user agent in order to distinguish it from ordinary browsers. Use the following character string when you want to distinguish Star webPRNT Browser from ordinary browsers.

StarWebPRNTBrowser/X.X.X

* X.X.X. contains the version name. (Example: For version 3.4.0, “StarWebPRNTBrowser/3.4.0”)

Request Related to Version Update of the iOS Star webPRNT Browser

In accordance with instructions from Apple* , the browser engine for the iOS Star webPRNT Browser will be changed from UIWebView to WKWebView.


The above change will be made starting from iOS Star webPRNT Browser Ver. 3.6.0 (to be released in June 2020).

As a result of this change, there may be some differences in some elements such as web content rendering results and JavaScript behavior. Please be aware of this.


At the same time, when using the updated iOS Star webPRNT Browser (Ver. 3.6.0 and later), please change to the following JavaScript library versions.

Printing will not be possible with JavaScript library versions earlier than those listed below.


 StarWebPrintTrader.js Ver.1.0.1 and later.
 StarWebPrintExtManager.js  Ver.1.2.0 and later.

* Included in the package for StarWebPRNT_WebContents_V1.6.0.zip and later.
 Download StarWebPRNT_WebContents from the following website.

This version of JavaScript also supports existing versions of Star webPRNT Browser (earlier than Ver. 3.6.0).

Apple news release
 https://developer.apple.com/news/?id=12232019b

Precautions when printing from websites that are not HTTPS communication.

If you are using the following browsers on a website that is not encrypted (HTTPS communication), you cannot print.
Please use SSL/TLS encrypted communication (HTTPS communication).

  • Google Chrome 94 or higher
  • Microsoft Edge (Chromium version)
  • Star webPRNT Browser for Android

When using a LAN printer that supports the Star webPRNT function

  1. Publish web content over HTTPS.
  2. Please refer to here for how to set up HTTPS communication for printers and browsers.

If you are using Star webPRNT Browser for Android

  1. Publish web content over HTTPS.
  2. Change the print destination as follows.

http://localhost:8001/StarWebPRNT/SendMessage

https://localhost:8001/StarWebPRNT/SendMessage