GS1-128 라벨 생성: 개발자 가이드
Programmatically generating GS1-128 shipping labels — AI encoding, FNC1 handling, ZPL templates, and label printer integration.
GS1-128 Label Generation: Building Compliant Shipping Labels
GS1-128 labels are the standard for supply chain logistics, appearing on every compliant shipping case and pallet. Generating these labels correctly requires understanding Application Identifier formatting, label layout standards, and print quality requirements.
GS1 Logistics Label Layout
The GS1 logistics label (also called the GS1 transport label or SSCC label) follows a standardized three-section layout:
Top section: Human-readable shipping information (ship-from, ship-to addresses, PO number, carrier information)
Middle section: Supplementary barcodes and data (GTIN, quantity, batch, expiry)
Bottom section: The primary GS1-128 barcode encoding the SSCC, with human-readable AI data
Application Identifier Formatting
When generating the barcode data string, follow these rules:
- Start with FNC1 (this makes it GS1-128 rather than plain Code 128)
- Concatenate AIs and their values in sequence
- Use FNC1 (transmitted as GS, ASCII 29) to separate variable-length fields
- Fixed-length fields do not need separators
Example for a pallet label:
FNC1 + (00)106141412345678903 + (02)10614141000012 + (37)00000024 + FNC1 + (17)261231 + (10)BATCH456
SSCC Generation
The Serial Shipping Container Code is the primary identifier on logistics labels:
- AI (00): Always 18 digits
- Structure: Extension digit (1) + GS1 Company Prefix + Serial Reference + Check digit
- Each SSCC must be globally unique and never reused
Label Dimensions
| Label Size | Use Case | Standard |
|---|---|---|
| A5 (148 x 210mm) | Pallet labels | GS1 recommended |
| 4 x 6 inches | Shipping cases | Common in North America |
| Custom | Per trading partner | Check requirements |
Barcode Specifications
For the GS1-128 barcode on logistics labels:
- X dimension: 0.495mm minimum (SC 5), 0.5mm target
- Height: 32mm minimum
- Maximum length: 165mm including quiet zones
- Quiet zones: 10X on each side (minimum 5mm)
- Human-readable: AIs in parentheses, OCR-B font recommended
Print Quality
Logistics labels must meet ISO/IEC 15416 quality standards:
- Minimum grade: C (1.5) for general supply chain
- Grade B (2.5) or higher recommended
- Use thermal transfer printing for durability
- Verify with a barcode verifier, not just a scanner
- Test labels on actual carton/pallet surfaces
Common Mistakes
- Missing FNC1: Omitting the initial FNC1 creates a Code 128 barcode, not GS1-128
- Wrong field separators: Using FNC1 after fixed-length fields (unnecessary) or omitting it after variable-length fields (causes parsing errors)
- Check digit errors: Miscalculating SSCC or GTIN check digits
- Quiet zone violations: Printing too close to the label edge or adjacent labels
- Label placement: Placing the label where it will be wrapped around a corner or covered by strapping
Printer Selection
For GS1-128 logistics labels, use industrial thermal transfer printers:
- Resolution: 203 DPI minimum, 300 DPI recommended
- Print width: 4 inches minimum for case labels, 6+ inches for pallet labels
- Speed: Match to your labeling throughput requirements
- Connectivity: Network (Ethernet/Wi-Fi) for centralized management