Printer code

TSPL and ZPL label code,straight to the printer.

Pick your printer’s language, type the label and get the commands the printer understands. The printer draws every bar in whole dots, so nothing gets blurred by scaling.

your label, in printer language.

Choose the language and dpi, then type the label. The preview and code update as you type.

Printer code

 
Open the generator
Why printer code

sharper than printing an image.

When the printer draws the barcode itself, every bar lands on whole printer dots.

No blurry bars

An image sent through a driver gets scaled. Printer code tells the printer to draw each bar in whole dots.

Label size and gap

SIZE and GAP, or ^PW and ^LL, tell the printer where one label ends, so labels don’t drift along the roll.

Darkness and speed

DENSITY or ~SD sets how dark it prints. Too dark makes bars fatter, too light makes them break up.

Paper type

Labels with gaps, black mark rolls or continuous paper, and direct thermal or ribbon printing.

Built-in fonts

Text prints in the printer’s own English font. Hindi text needs an image, not a font command.

Copies

PRINT or ^PQ prints as many copies as you need from one small file.

Send to printer

three ways to send the file.

Opening the.prn in Notepad and pressing Print doesn’t work. The file has to reach the printer unchanged, called raw printing.

WINDOWS 1Share the printer

Open Printers in Settings, choose your label printer, open Printer properties, turn on Sharing and give it a short name like LABEL.

WINDOWS 2Copy the file to it

Open Command Prompt in the folder with the downloaded file and run this line.

copy /b ownbarcode-label.prn \\localhost\LABEL
MAC / LINUXSend it raw

Add the printer in system settings, then run this in Terminal.

lp -d LABEL -o raw ownbarcode-label.prn
Command table

what each line tells the printer.

The same settings in both languages. ZPL measures in dots, TSPL mostly in mm.

SettingTSPLZPLWhat it does
Label sizeSIZE 50 mm,25 mm^PW400 ^LL200Width and length; ZPL uses dots
Gap or markGAP 2 mm,0 mm or BLINE^MNY, ^MNM or ^MNNHow the printer finds the next label
DarknessDENSITY 8 (0 to 15)~SD15 (0 to 30)Higher is darker
SpeedSPEED 4^PR4Inches per second; slower is sharper
Print modeSET RIBBON OFF or ON^MTD or ^MTTDirect thermal or ribbon
Upside downDIRECTION 1,0 or 0,0^PON or ^POITurns the print 180°
BarcodeBARCODE x,y,"128",h,1,0,n,n,"data"^BYn ^BCN,h,Y,N,N,An is printer dots per thin bar
CopiesPRINT 5,1^PQ5How many labels
Good to know

test one, then print the roll.

1st
Print one label first

Printers differ by model and firmware. Print one label, scan it and check it sits inside the label before you print the roll. If the print drifts, run the printer’s gap calibration once.

Aa
English text only

Built-in printer fonts have no Hindi letters and no ₹ sign, so write Rs. instead. For Hindi text, use the Hindi label maker, which sends the whole label as a picture.

Questions

people also ask.

All answers
What are TSPL and ZPL?

They are command languages that label printers understand. TSPL is used by TSC printers and many compatible desk printers. ZPL is used by Zebra printers and printers with a ZPL mode. The file is plain text, so you can read and edit it.

Which language does my printer use?

Print the self-test or configuration label. On many printers you hold the feed button while switching it on, but check your manual. It lists the language, such as TSPL, ZPL or EPL. Many printers, including some TVS-E and TSC models, can switch language in their settings tool.

Why print with code instead of an image?

A printer driver scales the image to fit the page, which can make bars uneven. With TSPL or ZPL the printer draws each bar in whole dots, so the barcode comes out as sharp as the printer allows, and it prints faster.

The print is in the wrong place or skips labels. What should I do?

Check that the label size and gap match your roll, then run the printer’s auto calibration so it learns the gap. If the print comes out upside down, tick Rotate 180°.

Can I print Hindi text this way?

Not with the built-in fonts. They only have English letters, so Hindi comes out as boxes or is left out. Use the Hindi label maker: it sends the whole label to the printer as a picture, so Hindi prints.

printing through a driver?

Make a PNG or SVG barcode in the generator and print it at 100%.

Open the generator

Guides for this task