Printing a part label from the portal

Two ways to print a part label from this PC, each set up once. The first takes two minutes.

The simple way: Download .zpl prints the label

A part's page has two buttons, Print and Download .zpl. The second one saves the label as a small file in your Downloads folder, the way any download works. A short script of ours, the label watcher, runs quietly on this PC and prints every label file that lands there. Set it up once, and from then on Download .zpl is the print button: click it, and the label comes out.

Set it up, once per PC

  1. Find your printer's IP address. It is on the printer's own configuration label, or under Printers & Labels › Printers in this portal. For example 192.168.1.81.
  2. Save these two files into the same folder. Downloads is fine: print-zpl-watcher.cmd and print-zpl-watcher.ps1.
  3. Double-click print-zpl-watcher.cmd. A black window opens and asks for the printer's IP address. Type it and press Enter. It says "Installed and running" and where it will start from. Press any key to close it.
  4. Back in the portal, open a part and press Download .zpl. The label prints within a couple of seconds.

What it does, and all it does

Checking, changing and removing

With the watcher on, Download .zpl means print. A label file you download for any other reason will come out of the printer.

The Print button: why it needs setting up

The portal runs in a data centre. Your printer is behind your own router, where nothing outside can reach it, and that is as it should be. The scanner prints labels because it is on the same network as the printer. So is the PC you are reading this on, which is why the Print button works at all: the browser hands the label to a small Zebra program on this PC, called Zebra Browser Print, and that program sends it to the printer.

Browser Print is needed only for the Print button on this PC. The scanner prints without it, and so does Download .zpl with the label watcher above. The rest of this page is for a PC that wants the Print button itself.

1. Download Browser Print from Zebra

Zebra's page: www.zebra.com › Support & Downloads › Printer Software › Browser Print

Zebra's Browser Print Support page with the three download links
Zebra's page. Under Request Download, the second link: Download Browser Print For Windows PC.
Request Download notice: available on a request basis, complete the brief form
The notice above the links.
Browser Print for Windows PC Request Form, blank
The form. Country, first name, last name, company and email are required; phone is not.
The request form filled in with placeholder details
Filled in with your own details, then Submit.
Browser Print page: The file is available below. Download
Straight after Submit: "The file is available below", and the Download link.
End User License Agreement, I agree ticked, Download button active
Download opens Zebra's licence. Tick "I agree to and accept the above terms and conditions" and the Download button goes live. Click it.
Save dialog: zebra-browser-print-windows zip into Downloads
The browser asks where to save it. Downloads is fine.

2. Install

The Windows system tray overflow with the Browser Print icon highlighted
Browser Print in the tray. Click the up-arrow by the clock if it is tucked away in the overflow, as here.

3. Tell Browser Print it may talk to the portal

Browser Print refuses any web page it has not been told about. Right-click the tray icon, open Settings, and under Accepted Hosts add the portal's address, exactly as it appears in your browser's address bar: app.stocktakesonline.com.au in Australia, or app.stocktakesonline.com in the United States.

Leave localhost in the list. Browser Print puts it there itself, and needs it. If it is missing, Browser Print asks to add it back the first time it is used (the picture is under step 5). Say Yes.
Browser Print Settings window, finished state: Default Devices lists Wired (192.168.1.81), Added Devices lists Zebra ZM400 (network: 192.168.1.81:9100), Accepted Hosts lists app.stocktakesonline.com.au and localhost
Browser Print Settings as it should look when finished: localhost and the portal under Accepted Hosts, the printer under Default Devices as the search found it, and the same printer under Added Devices by its address (step 4), Broadcast Search ticked.

4. Your printer

The portal knows each printer by its IP address, under Printers & Labels › Printers, on port 9100. Browser Print has to know the same printer by the same address. Add it by its address: click Manage beside Added Devices and add the printer by its IP address, port 9100. Do this even when Broadcast Search has already found it and lists it under Default Devices as Wired (its address).

Browser Print's Manage window over the Settings window: Name, Device Address, Port 9100, Type printer, an Add button, and the list below showing printer : Zebra ZM400 (network: 192.168.1.81:9100)
Manage, beside Added Devices. Type a name and the printer's address, leave the port at 9100 and the type at printer, click Add. The printer appears in the list below, and under Added Devices in the window behind.
Found is not the same as added. A printer Browser Print found for itself is offered only while its search can still see it. Switch that printer off and on, as a power cut does, and it can drop out of the list until the search happens to find it again; the Print button then says Browser Print "cannot see" it, although the printer is on and its address has not changed. A printer added by its address is offered every time.
A blank device can get added by accident. It shows under Added Devices as printer : (network: :9100) with no address. Click Manage beside Added Devices, select it and delete it. A label sent to a blank device goes nowhere and says nothing.
Browser Print Settings with a blank added device
The blank entry under Added Devices. Delete it.
Browser Print's printer list showing Wired (192.168.1.81) and a second entry with no name and the address :9100
How to see what Browser Print knows: open https://127.0.0.1:9101/available in the browser (step 5 covers the warning it raises). Here the second entry has no name and the address :9100: a blank device, to be deleted.

5. The certificate, once per browser

The portal talks to Browser Print over a secure connection on this PC. Browser Print's certificate is one it made itself, so the first time your browser sees it, it refuses it without saying anything. You tell the browser once that it is fine.

Open https://127.0.0.1:9101/available in the browser. It warns that the connection is not private. Click Advanced, then Proceed to 127.0.0.1. The page that appears is a short piece of text listing the printers Browser Print knows about. That is the whole step, and the browser remembers it.

The browser remembers it only for itself: do this once in each browser the PC will print from.

Your connection is not private, with Advanced and Back to safety buttons
What the browser shows the first time. Click Advanced, not Back to safety.
The same warning with Advanced opened and a Proceed to 127.0.0.1 (unsafe) link
Advanced opened. Click Proceed to 127.0.0.1 (unsafe). "Unsafe" is the browser's word for a certificate nobody vouched for; the only thing on the other end is Browser Print on this PC.
Browser Print dialog: localhost wants to access your Zebra Devices. Allow localhost and add it to the accepted hosts list? Yes / No / Cancel
If Browser Print does not have localhost in its Accepted Hosts, clicking Proceed makes it ask this. Click Yes. It adds localhost to the list itself and never asks again.
Browser Print's answer: a line of text naming Wired (192.168.1.81)
After Proceed: Browser Print's own answer, a line of text listing the printers it knows. That is the step done.

6. The browser's own question: Allow

The first time you press Print, the browser asks whether the portal may reach other devices on this network. Click Allow. Then press Print again: the first press is what raises the question, and that first label does not get through while the question is open. The page tells you so, and never re-sends a label on its own, because a label sent twice prints twice.

Browser prompt: the portal wants to access other apps and services on this device
The question. Block / Allow. Click Allow.

If Block was clicked by mistake, or to allow it ahead of time: in the browser's Settings, under Privacy and security › Site settings › Local network, Add the portal's address under "Allowed to access other devices on your local network".

Browser settings, Local network, Add a site dialog
The Local network setting, adding the portal by hand.

7. Print

Parts › open the part › the Print a label card at the bottom: site, printer, copies, Print. The line under the buttons says which printer it went to. The printer is the only place that knows whether it printed, so go and look.

Print a label card: One label sent to Wired (192.168.1.81) through Zebra Browser Print.
The Print a label card after a successful press.
The part label: part number, description, counted in, comes in, a pack is, barcode
What the label carries: part number, description, Counted in, Comes in, A pack is, and the part's barcode. A scanner reads it as the part's own barcode.

When Print refuses: five things, in this order

Both buttons, Print and Download .zpl, end at the same printer, so when neither works the printer is the first suspect, not the PC. After a power cut it almost always is.

  1. The printer. Ready light on, labels loaded, not paused. Press Feed: one label comes out, and the printer is ready. If nothing comes out, that is the fault, and nothing on the PC will fix it.
  2. Browser Print is running. Look for the Zebra icon in the tray by the clock (click the up-arrow if it is tucked away). If it is missing, start Zebra Browser Print from the Start menu.
  3. The printer is added by its address in Browser Print's Settings, under Added Devices, not only found by the search. Step 4 says why, and how. Then press Print again.
  4. The address has not changed. Print the printer's own configuration label (its manual says which buttons; on most Zebras, hold Feed and Cancel together while it is ready) and compare the IP address on it with the one under Printers & Labels › Printers in the portal. If it has changed, ask whoever looks after your router to reserve that address for the printer, so it cannot change again.
  5. Restart, in this order: quit Browser Print from the tray icon and start it again; then the printer, off for a few seconds and on; then the PC.

If something goes wrong

"Zebra Browser Print did not answer"

Either the browser is asking its question (step 6: Allow, then Print again), or Browser Print is not running. Look for the tray icon; if it is missing, start Zebra Browser Print from the Start menu.

Zebra Browser Print did not answer on either https://127.0.0.1:9101 or http://127.0.0.1:9100
The message as the page says it. The two addresses are the ones it tried.

"Browser Print is running but cannot see ..."

Browser Print has no printer at that address to offer. Press Feed on the printer and try again: a printer that has just been switched on can take a moment, and one that Browser Print only found can drop out of its list after a power cycle (above). If it still refuses, step 4: add the printer by its address, port 9100, and check the printer record in the portal says the same address and port 9100, not another number.

The label prints in the wrong place

Barcode and text land in a different area of the label from where they should. Turn the printer off, wait a few seconds, turn it on again. The label the portal sends is complete in itself, so when the output moves on the stock it is the printer that has moved: a job from another program can leave it with a different label origin until it is restarted. The power cycle puts it back and changes nothing saved in the printer.

Nothing at all, and no message

If Accepted Hosts or the certificate were changed after this portal tab was opened, reload the tab (Ctrl+F5) and try again.

Without Browser Print, by hand

If you would rather send each label yourself than have the watcher do it: Download .zpl saves the label as a file. A .zpl file is the bytes the printer wants, not a document: opening it in Notepad and printing it goes through a Windows printer driver and prints the label's instructions as words. It has to be sent to the printer as it is. Two ways:

PowerShell: setx ZPL_PRINTER 192.168.1.81, SUCCESS: Specified value was saved.
Setting the printer once. "SUCCESS: Specified value was saved" is the whole answer. Windows already open do not see it until they are reopened. (The user name in the prompt is blanked in this picture.)

The sender opens a connection to the printer on port 9100 and writes the file to it, nothing more. It changes nothing on the PC. The .cmd exists because Windows will not drop a file onto a PowerShell script directly.