Sign In
Products
ZPL ViewerBarcode GeneratorImage → ZPLZPL cheat sheetLabel DesignerTemplate Gallery
Developers
API QuickstartAPI ReferenceMCP ServerBulk GenerationWebhooksSDKs & ExamplesLimitsDirectPrint agent NewGitHub ActionVS Code extensionOn-Premise
Solutions
Logistics & ShippingE-CommerceERP & WMSManufacturingRetailHealthcare & LaboratoryAll solutions
Tools
ZPL Diagnostics HubZPL DebuggerSize & DPI AnalyzerDPI ConverterBarcode fit calculatorShipping Label AnalyzerFont InspectorOrientation DebuggerCalibration AssistantPrinter Compatibility CheckerBarcode Readability CheckerPrinter Language DetectorThermal Printer Test PackZPL ToolsEPL ToolsTSPL ToolsCPCL ToolsPrinter Language ConverterAll ToolsGuidesPricing
Language
EnglishTürkçeDeutsch
Home›All CPCL commands›LINE

LINE — Line

Draws a line between two points with the given thickness.

Engine status: Rendered

This command produces visible output in the preview.

Syntax

LINE x1 y1 x2 y2 t

Example

! 0 200 200 210 1
PAGE-WIDTH 576
LINE 0 300 560 300 2
PRINT

Open this example in the preview →

Open the validator →

Rendered example

LINE 0 300 560 300 2

Output of the example above in our renderer (203 dpi). Not verified on a physical printer.

Parameters

ParameterMeaning
x1 y1Start point, in dots
x2 y2End point, in dots; a horizontal line has y1 = y2
tLine thickness in dots

Common mistake

Drawing a thick horizontal rule with BOX: BOX is hollow; for a filled separator use LINE x1 y x2 y t.

The same job in other languages

ZPL equivalent: ^GB · Language comparison

All CPCL commands

! · PAGE-WIDTH · TEXT · TEXT90 · TEXT180 · TEXT270 · BARCODE · BOX · EXPANDED-GRAPHICS · PRINT · FORM · CONTRAST · TONE · SPEED · JOURNAL · SETMAG · CENTER

All CPCL commands