Fabric Roll Barcode Label ZPL Generator for Zebra Printers
A readable, scannable roll label is what keeps fabric from being lost in a warehouse. This generator builds ZPL II code for Zebra-compatible printers, with item, lot, width, length and a Code 128 roll ID barcode.
Fill in
Single 4 x 3 inch label at 203 dpi
^XA ^PW812 ^LL609 ^CI28 ^CF0,36 ^FO40,30^FDAcme Textiles Ltd^FS ^CF0,30 ^FO40,90^FDItem: CTN-POP-120-WHT^FS ^FO40,140^FDLot: LOT-24-0815^FS ^FO40,190^FDWidth: 150 cm^FS ^FO40,240^FDLength: 62.5 m^FS ^BY3,3,130 ^FO40,320^BCN,130,Y,N,N^FDR0008841^FS ^XZ
Reprint two copies
^XA ^PQ2 ^PW812 ^LL609 ^CF0,30 ^FO40,40^FDItem: CTN-POP-120-WHT^FS ^FO40,90^FDRoll: R0008841^FS ^BY3,3,130 ^FO40,160^BCN,130,Y,N,N^FDR0008841^FS ^XZ
Coordinates assume a 203 dpi printer and a 4 x 3 inch label, where ^PW812 sets the print width in dots and ^LL609 the label length. For 300 dpi printers, scale the dot values by about 1.5. Send the code to the printer as raw text, and test one label on your stock before printing a batch. Fields with special characters such as the caret or tilde may need escaping.
Label printing from ERP transactions
Optional: a review of how to print roll and carton labels directly from receiving and production transactions.
Optional. The tool and every export work without this. No spam.
How to use the generator
Fill the fields with your roll data and copy the code from the first block. Send it to the printer as raw text through the printer port, a print spooler set to raw mode, or a labeling tool. The barcode encodes the roll ID, so a scan at receiving, cutting and issue can look up item, lot and quantity from your inventory system. The second block reprints a label with a quantity command.
- Send as raw text, not through a graphics driver
- Barcode holds the roll ID only
- Keep item, lot, width and length readable for people
- Use the reprint block for damaged labels
What the ZPL commands do
Every label starts with ^XA and ends with ^XZ. ^PW sets print width and ^LL sets label length in dots. ^CF sets the default font and size. ^FO places a field origin, and ^FD ... ^FS holds the data. ^BY sets bar width and ratio, and ^BC prints Code 128. ^PQ sets the quantity of copies. At 203 dpi, one inch is 203 dots, so a 4 inch label is about 812 dots wide.
Common mistakes and ERP notes
The most common faults are barcodes too small or too close to the edge for the scanner, and printing to a driver that rescales the code. Store the roll ID as the key to your inventory record, and make sure the lot on the label matches the lot in the ERP, because shade variation between dye lots is the main reason fabric is segregated. Test scanning at the real warehouse distance.
- Leave quiet space on both sides of the barcode
- Match the lot on the label to the ERP lot
- Print a test label per stock before each run
Frequently Asked Questions
What is ZPL?
ZPL, or Zebra Programming Language, is a text command language that Zebra and many compatible label printers use. You send plain text commands to the printer, and it draws text and barcodes at the positions you specify.
Why is my label printing off to one side?
The print width, label length or origin values likely do not match your stock or printer resolution. Check that the ^PW and ^LL values match the label size at your dpi, and run the printer's media calibration.
Which barcode type should I use for roll IDs?
Code 128 is a common choice because it is compact, supports letters and digits and is read by nearly every scanner. Keep the roll ID short to keep bars wide enough to scan reliably.
How do I print many labels at once?
Use ^PQ for copies of the same label. For unique roll IDs, generate one ^XA to ^XZ block per roll, usually from your ERP or a script, and send the whole file to the printer in one job.
If roll labels are typed by hand or printed from separate files, we can show how to print them straight from receiving transactions in your ERP.
Related Tools
Apparel Style Color Size SKU Matrix SQL Generator
Generate T-SQL that creates every color and size SKU for a style, skips rows that already exist, and checks the result for duplicates.
Quality & InspectionFabric Four-Point Inspection Report Template
A printable report for the four-point fabric inspection system, with defect point scoring rules and a roll-by-roll results table.
Industry TemplatesTextile Dye Lot Recipe Card Template
A dye lot recipe card that records fabric, liquor ratio, dyestuff, chemicals, process steps and shade results for one batch.
Industry TemplatesGarment Care Symbols Reference (ISO 3758)
Look up what each care label symbol means across washing, bleaching, drying, ironing and professional cleaning.
More MES & Shop Floor tools
See all- Sewing Line Balancing Calculator
- Oracle Fusion OEE Work Center Calculator
- Infor VISUAL Shop Labor Ticket Log Worksheet
- VISUAL Shop Load Versus Capacity Calculator
- VISUAL Shop Resource Capacity and Load Calculator
- IFS Shop Order Status and Lifecycle Reference
- Plex Smart Manufacturing Data Source Request Template
- Plex Production Scheduling Checklist
- Plex Downtime Reason Log and OEE Worksheet