A work-order sheet has to survive a trip across the plant and come back as data: an operator scans it at phase two and the work-order number, the piece count and the routing step land in your system without anyone typing. This guide is for the engineer whose report already prints from their own software and now has to carry a barcode the plant's readers decode reliably. It covers the character set, the geometry that decides the label size, the point-size calibration for your printer, the print steps, and the ten-scan read-back gate that proves the layout before it travels.
Can my own program print a barcode a plant reader will decode?
Yes — a Code 39 symbol is a plain text string wrapped in an asterisk at each end and rendered in a Code 39 font, so any program that can set a font on a text box — report generator, test-bench software, HMI — can print one a standard reader decodes.
Three print-side numbers decide it: the narrow bar at two printer dots or more (0.17 mm at 300 dpi), a quiet zone of ten narrow-bar widths on every side, and a height above 15 percent of the printed length. Everything after this section is bookkeeping around those three numbers. If the printing brain is a PLC instead of a PC program, the symbology rules are identical — only the driver changes, and the Print a barcode label from a PLC without a PC route shows how it works without a font.
Which characters can a Code 39 barcode carry?
The base set is 43 characters: digits 0-9, uppercase A through Z, and the seven symbols space, hyphen, period, dollar, slash, plus and percent. The asterisk is the 44th character, it belongs to the reader rather than to you, and it marks both the start and the end of the symbol.
A work-order ID such as WO-48215 sits inside the set, so it prints as WO-48215. Lowercase letters and the underscore do not. Uppercase the payload before you print, and map every out-of-set character to a legal one — underscore to hyphen is the usual choice. The full-ASCII extension exists, but it encodes lowercase as two-character pairs and doubles the payload length; for routing labels, uppercase is shorter and faster to read. Readers strip both asterisks, so the decoded string equals your payload exactly. Never leave a real asterisk inside the data, because the first one ends the symbol. The 43-character definition and the asterisk delimiter come from the published symbology definition (Code 39 on Wikipedia).
How wide and tall must the printed symbol be?
Plan the label around the narrow bar width X: each Code 39 character is nine elements, six narrow and three wide at two to three times X, so the formula below turns the character count and X into a printed width — and the height should exceed 15 percent of it.
Worked example on a 300 dpi office laser, payload WO-48215:
- Dot pitch: 25.4 mm ÷ 300 dpi = 0.0847 mm per dot. Set X to 3 whole dots, so X = 0.254 mm (10 mil). Whole dots keep every bar at the width you measured.
- Fonts fix r in their design; this example assumes r = 3.0, so each character body = (6 + 9) × X = 15X = 3.81 mm.
- N = 8 payload characters + 2 asterisks = 10. The allowed gap band is 1X-3X; plan with g = 2X = 0.508 mm.
- Quiet zone: q = 10X = 2.54 mm per side.
- Width = 2 × 2.54 + 10 × 3.81 + 9 × 0.508 = 5.08 + 38.10 + 4.57 = 47.75 mm, call it 48 mm of clear label width.
- Height: 15 percent of 47.75 mm is 7.2 mm. Print 10 mm of bars so a handheld has something to aim at from arm's length.
If the tallest variant of your font still cannot reach 10 mm of bars without inflating X, stop stretching the font and draw the symbol as graphics instead — the bar-drawing method in Generate an EAN-13 barcode bitmap with readable digits sets bar height independently of bar width.
What point size makes the bars the right width?
A Code 39 font scales linearly with point size, so skip the guesswork: print once at any size, measure the narrow bar with calipers, then multiply that test size by target width over measured width.
Worked example: print WO-48215 at 36 pt and the narrow bar measures 1.02 mm. The target is X = 0.254 mm, so 36 × 0.254 ÷ 1.02 = 8.96 — set 9 pt. Reprint and re-measure: the narrow bar should land within a few hundredths of 0.254 mm, on the same whole number of printer dots. Two things move the measurement. The font's built-in ratio varies (some designs draw wide elements at 2.5X rather than 3X, which shortens the symbol but stays legal anywhere inside 2X-3X), and rasterization distorts bars at very small sizes — which is exactly why X is chosen in whole dots first and the point size second.
How do I build and print the label, step by step?
Build the payload before you touch the font: sanitize the string into the 43-character set, wrap it in asterisks, apply the Code 39 font at the calibrated size, black on white, and send the job at 100 percent scale.
- Uppercase the payload and map every character outside the 43-set to a legal one (underscore becomes hyphen).
- Add the delimiters: WO-48215.
- Install the Code 39 TrueType font on the print PC, or embed the font in the report file so the layout survives a move to another PC.
- Set the text object that holds the string to the Code 39 font at the calibrated point size, black on a white, unshaded background.
- Clear 2.5 mm — ten narrow bars — of empty space on all four sides of the symbol; no border lines and no printed text inside that margin.
- Print one test sheet at 100 percent scale on the printer the labels will really come off.
- Measure the narrow bar and run the read-back checks in the next section; change nothing in the production layout until it passes.
How do I prove the label reads before it travels the plant?
Gate the layout on a read-back test: scan the printed label ten times, tilt the reader a few degrees each pass, and require ten decodes that match the payload string exactly — a code that reads nine times in ten stops a station on the tenth pass.
The desk check needs one reader and five minutes. A compact fixed reader such as the LS-CRD-0047 reads at a 60-120 mm distance and returns the string over USB 2.0, which is the right posture for a sheet on a bench. Log the decoded text next to the expected payload and confirm the asterisks are gone; if a scan ever returns WO-48215 with asterisks attached, the label printed as plain text and the font did not apply. For a permanent gate that compares decodes against a work list and counts the pass rate, the Barcode match verification: build a pass/fail check station pattern is the next step, and the decoded string's trip into a controller is covered in Barcode scanner input methods to a PLC: serial, USB and Ethernet.
- Resolution
- Up to 3 MP
- Shutter
- Global
- Interface
- USB
Operators at phase two carry a handheld code reader; the LS-HCR-0001 covers that side, a 1.0 MP reader that reports over USB 2.0.
- Resolution
- Up to 3 MP
- Shutter
- Global
- Interface
- USB
- Connection
- Wired
If the sheet gets laminated or sleeved, add glare to the test. A shiny cover is the classic reason a label that scanned bare fails on the line, and it is a lighting problem before it is a decode problem — 1D barcode preprocessing for rotation, blur and glare shows what the reader is actually seeing.
Which reader pairs with a font-printed work-order label?
Match the reader to the station: a handheld serves operator-carried sheets, a fixed Ethernet reader serves an automatic gate at phase two, and both decode a Code 39 with a 0.25 mm narrow bar without special settings.
At an automatic gate the reader fires on part presence and posts the decode to the line controller, so the interface matters more than raw pixels. The MV-ID3013PM-12M-WBN pairs a 12 mm focal length with a Fast Ethernet connection on an M12 mount, which is the industrial wiring a gate wants. Reading distance still follows the bar geometry — the same X-dimension logic that sets Code 128 barcode module size, reading angle and reader distance applies here — so mount at the distance your bar width supports and repeat the ten-scan test at the real mounting height.
- Interface
- Fast Ethernet
- Resolution
- Up to 3 MP
- Shutter
- Global
- Lens mount
- M12
Bring the payload, the printer DPI and the mounting sketch to the fixed code readers page, or filter by interface and mount in the reader and camera finder. For an odd station — curved sleeve, tight clearance, washdown — the contact page is the fastest route to a named recommendation.
Questions
Why does my label print *WO-48215* as plain text and refuse to scan?
The asterisks show when the Code 39 font is not applied: the report object fell back to a standard font and printed the delimiters literally. Install the font on the PC that renders the print job, re-apply it to the text object after any layout edit, and embed the font in the report file so a move to another PC cannot drop it. Then rerun the ten-scan test.
How small can I print a Code 39 symbol?
Keep the narrow bar at or above two printer dots: 0.17 mm (6.7 mil) at 300 dpi, or 0.085 mm (3.3 mil) at 600 dpi — though at 600 dpi aim for four dots (0.17 mm again) because toner edge raggedness eats sub-0.1 mm bars. The dependable desk choice is 0.25 mm (10 mil), the size used in the worked example.
Do internal work-order labels need a graded verification?
Not for plant-internal routing: the ten-scan read-back test is the pass gate and costs five minutes. A contractual grade — retail, automotive or healthcare customers sometimes ask for one — is a different job that needs a verifier scoring the print to the customer's stated standard. Buy verification when a contract names it, not before.
What colors and paper can I print the barcode in?
Black bars on a matte white label. Most readers illuminate in red light, so red or orange bars vanish into the illumination, and gloss or a laminated pouch throws specular glare back at the optics. Reverse printing — white bars on black — also fails, because readers time edges against a light background. Reserve color for the human-readable text only.
Can Code 39 carry lowercase letters or an underscore?
Neither is in the base 43-character set. The full-ASCII extension encodes each lowercase letter as a two-character pair, which doubles the printed payload length, and the underscore is absent from every Code 39 variant — substitute a hyphen. If your part numbers genuinely need full ASCII, print Code 128 instead and follow its codeset rules.


