コンテンツに移動

4 × 6 in labels in ZPL

A 4 × 6 inch label (101.6 × 152.4 mm) is 812 × 1219 dots at 203 dpi and 1219 × 1828 dots at 300 dpi. Start the ZPL with ^PW812 and ^LL1219 for a 203 dpi printer, and call the API with the size 4x6.

2026-10-20 に更新されました · Renders made with the OpenZPL engine

Open in the viewer

4 × 6 in at each print density

PrinterdpmmExact dpi^PW^LLdpi the API usesAPI image (px)
152 dpi6152.4609914152608 × 912
203 dpi8203.28121219203812 × 1218
300 dpi12304.8121918283041216 × 1824
600 dpi24609.6243836576092436 × 3654

^PW and ^LL are the size in millimetres times the dots per millimetre, rounded down, because they take whole dots. The printer names round the density: a "300 dpi" printer prints 12 dots per millimetre, which is 304.8 dpi. The API sizes its image the way Labelary does: inches times a whole number of dots per inch (152, 203, 304 or 609), rounded down. That is why the image can be a dot or two smaller than ^PW and ^LL. Try other sizes with the label size calculator.

4 × 6 in is not 100 × 150 mm: it is 101.6 × 152.4 mm, 1.6 mm wider and 2.4 mm longer. Layouts for one can be cut off or leave a margin on the other; see 100 × 150 mm labels.

Starter template at 203 dpi

4 × 6 in is the usual size for parcel shipping labels. This template has the sender, the recipient, a Code 128 tracking number and a QR code, laid out for 812 × 1219 dots:

4 by 6 inch shipping label template with sender, recipient, Code 128 tracking barcode and QR code
4 × 6 in label at 203 dpi (8 dpmm) · 812 × 1218 px · Open in the viewer
^XA
^CI28
^PW812
^LL1219
^FX Sender
^FO40,40^A0N,24,24^FDFROM: OpenZPL Fulfillment^FS
^FO40,72^A0N,24,24^FD125 Innovation Drive, Austin, TX 78702^FS
^FO40,115^GB732,3,3^FS
^FX Recipient
^FO40,140^A0N,28,28^FDSHIP TO:^FS
^FO40,180^A0N,56,56^FDALEX MORGAN^FS
^FO40,245^A0N,36,36^FD1234 East 6th Street, Apt 204^FS
^FO40,290^A0N,44,44^FDAUSTIN, TX 78701^FS
^FO40,360^GB732,3,3^FS
^FX Tracking barcode
^FO40,385^A0N,24,24^FDTRACKING NUMBER^FS
^BY3,3,200
^FO80,420^BCN,200,Y,N,N^FD001048200001^FS
^FO40,690^GB732,3,3^FS
^FX Reference and QR
^FO40,720^A0N,28,28^FDORDER #10482^FS
^FO40,760^A0N,28,28^FDWEIGHT 1.25 KG^FS
^FO40,800^A0N,28,28^FDPACKAGE 1 OF 1^FS
^BY2,2,10
^FO560,710^BQN,2,6^FDQA,https://openzpl.com/label-sizes/4x6-in/^FS
^FO40,1150^A0N,22,22^FD4 x 6 in, 812 x 1219 dots at 203 dpi^FS
^XZ

The same layout at 300 dpi

For a 300 dpi printer every coordinate, font size and line is multiplied by 1.5, and ^PW and ^LL become 1219 and 1828. Sending the 203 dpi version to a 300 dpi printer prints it at two thirds of the size.

The same 4 by 6 inch shipping label laid out for a 300 dpi printer
4 × 6 in label at 300 dpi (12 dpmm) · 1216 × 1824 px · Open in the viewer
^XA
^CI28
^PW1219
^LL1828
^FX Sender
^FO60,60^A0N,36,36^FDFROM: OpenZPL Fulfillment^FS
^FO60,108^A0N,36,36^FD125 Innovation Drive, Austin, TX 78702^FS
^FO60,172^GB1098,4,4^FS
^FX Recipient
^FO60,210^A0N,42,42^FDSHIP TO:^FS
^FO60,270^A0N,84,84^FDALEX MORGAN^FS
^FO60,368^A0N,54,54^FD1234 East 6th Street, Apt 204^FS
^FO60,435^A0N,66,66^FDAUSTIN, TX 78701^FS
^FO60,540^GB1098,4,4^FS
^FX Tracking barcode
^FO60,578^A0N,36,36^FDTRACKING NUMBER^FS
^BY4,3,300
^FO120,630^BCN,300,Y,N,N^FD001048200001^FS
^FO60,1035^GB1098,4,4^FS
^FX Reference and QR
^FO60,1080^A0N,42,42^FDORDER #10482^FS
^FO60,1140^A0N,42,42^FDWEIGHT 1.25 KG^FS
^FO60,1200^A0N,42,42^FDPACKAGE 1 OF 1^FS
^BY3,2,10
^FO840,1065^BQN,2,9^FDQA,https://openzpl.com/label-sizes/4x6-in/^FS
^FO60,1725^A0N,33,33^FD4 x 6 in, 1219 x 1828 dots at 300 dpi^FS
^XZ

Coordinates in ZPL are dots, so a layout made for one density prints at another size on a different printer. See 203 vs 300 dpi before sending the same ZPL to both.

Calling the API

curl https://api.openzpl.com/v1/printers/8dpmm/labels/4x6/0/ \
  --data-binary @label.zpl > label.png

Use 12dpmm in the path for 300 dpi. To get a PDF with one page per label, see ZPL to PDF.

質問

What are ^PW and ^LL for a 4x6 label?

^PW812 and ^LL1219 at 203 dpi; ^PW1219 and ^LL1828 at 300 dpi.

Is 4x6 the same as 100x150 mm?

No. 4 × 6 in is 101.6 × 152.4 mm. The two are often sold for the same printers, but the dots differ: 812 × 1219 against 800 × 1200 at 203 dpi.

Sources