^B5
PLANET Code Bar CodePreview: partialThe USPS tracking code that rides alongside POSTNET, encoding its digits in the height of each bar rather than the width.
Syntax
^B5o,h,f,gParameters
| Parameter | Description and accepted values | If omitted |
|---|---|---|
| o | Rotation of the bar code on the label.N normal, R 90°, I 180°, B 270° | Last ^FW value, else N |
| h | Height of the tall bars in dots. The short bars are drawn at 40% of it, as the specification requires.1 to 9999 dots | Height set by ^BY |
| f | Prints the digits underneath the bars as text. Off by default.Y or N — print the human-readable line | N |
| g | Moves that text above the bars instead.Y or N — put that line above the bars | N |
How it works
^B5 prints PLANET, the Postal Alpha Numeric Encoding Technique the US Postal Service used to track mail through its network. Every bar is the same width; what carries the data is whether the bar is tall or short.
A PLANET code is 11 or 13 digits, plus a check digit the printer appends. It is a mirror of POSTNET: where POSTNET encodes two tall bars per digit, PLANET encodes three, which is how automated equipment tells them apart on the same envelope.
The USPS retired PLANET in favour of the Intelligent Mail barcode, so new mail streams should not use it. It is documented here because older label templates still carry it and because the preview has to draw it correctly to be trusted.
Example
^XA
^BY2,3,60
^FO60,60^B5N,60,N,N^FD12345678901^FS
^XZRendering…
How the preview on this site handles it
Drawn with a real PLANET encoder, including the bar-height modulation that carries the data — a preview that drew every bar at full height would look like a bar code and encode nothing. Rotation is applied. The ^BY module width still sets how wide the bars are, as it does on the printer.
Common mistakes
- Sending the wrong digit count. PLANET takes 11 or 13 digits; anything else does not encode.
- Adding the check digit yourself. The printer appends it, so a hand-computed one makes the code one digit too long.
- Using it for new mail. PLANET is retired — the Intelligent Mail barcode replaced both it and POSTNET.