PDF templates / Shipping Label
Standard Shipping Label
A5 carrier-style shipping label with bold header, prominent ship-to block, dense routing strip, tracking barcode placeholder and parcel-details grid. Suitable for adhesive label stock.

DSL source
The whole template. Learn the language in the template DSL guide.
const template = doc({ size: "A5", title: "Shipping Label {{trackingNumber}}" },
// Carrier header bar
r({ "background-color": "#111111", padding: [10, 12, 10, 12] },
col("60%",
s({ "font-family": "Inter", "font-size": 22, "font-weight": 700, color: "#ffffff" }, "{{carrier}}"),
s({ "font-family": "Inter", "font-size": 10, color: "#cccccc", "margin": [2, 0, 0, 0] }, "{{service}}"),
),
col("40%", { align: "right" },
s({ "font-family": "Inter", "font-size": 9, color: "#cccccc" }, "SERVICE LEVEL"),
s({ "font-family": "Inter", "font-size": 14, "font-weight": 700, color: "#ffffff", "margin": [2, 0, 0, 0] }, "{{serviceLevel}}"),
),
),
// Routing strip — dense horizontal bar
r({ grid: ["auto", "auto", "auto", "1fr"], "background-color": "#f0f0f0", border: 1, "border-color": "#111111", padding: [6, 8, 6, 8] },
col(
s({ "font-family": "Inter", "font-size": 7, color: "#555555", "font-weight": 700 }, "SHIP DATE"),
s({ "font-family": "Inter", "font-size": 9, "font-weight": 700, color: "#111111" }, "{{shipDate}}"),
),
col({ padding: [0, 0, 0, 12] },
s({ "font-family": "Inter", "font-size": 7, color: "#555555", "font-weight": 700 }, "EXP. DELIVERY"),
s({ "font-family": "Inter", "font-size": 9, "font-weight": 700, color: "#111111" }, "{{expectedDelivery}}"),
),
col({ align: "center", padding: [0, 0, 0, 12] },
s({ "font-family": "Inter", "font-size": 7, color: "#555555", "font-weight": 700 }, "ZONE"),
s({ "font-family": "Inter", "font-size": 14, "font-weight": 700, color: "#111111" }, "{{zone}}"),
),
col({ align: "right" },
s({ "font-family": "Inter", "font-size": 7, color: "#555555", "font-weight": 700 }, "ROUTING"),
s({ "font-family": "Cousine", "font-size": 10, "font-weight": 700, color: "#111111" }, "{{routingCode}}"),
),
),
gap(6),
// FROM block — compact
r({ border: 1, "border-color": "#999999", padding: [6, 8, 6, 8] },
col("20%",
s({ "font-family": "Inter", "font-size": 8, "font-weight": 700, color: "#555555" }, "FROM"),
),
col("80%",
s({ "font-family": "Inter", "font-size": 9, "font-weight": 700, color: "#111111" }, "{{sender.name}}"),
s({ "font-family": "Inter", "font-size": 8, color: "#333333" }, "{{sender.contact}}"),
s({ "font-family": "Inter", "font-size": 8, color: "#333333" }, "{{sender.address1}}, {{sender.address2}}"),
s({ "font-family": "Inter", "font-size": 8, color: "#333333" }, "{{sender.city}}, {{sender.state}} {{sender.postalCode}} {{sender.country}}"),
s({ "font-family": "Inter", "font-size": 8, color: "#555555" }, "Tel: {{sender.phone}}"),
),
),
gap(6),
// SHIP TO — prominent
r({ border: 2, "border-color": "#111111", padding: [10, 12, 10, 12] },
col("100%",
s({ "font-family": "Inter", "font-size": 9, "font-weight": 700, color: "#555555", "margin": [0, 0, 4, 0] }, "SHIP TO:"),
s({ "font-family": "Inter", "font-size": 15, "font-weight": 700, color: "#111111" }, "{{recipient.name}}"),
s({ "font-family": "Inter", "font-size": 11, "font-weight": 700, color: "#111111" }, "{{recipient.company}}"),
s({ "font-family": "Inter", "font-size": 13, color: "#111111", "margin": [3, 0, 0, 0] }, "{{recipient.address1}}"),
s({ "font-family": "Inter", "font-size": 13, color: "#111111" }, "{{recipient.address2}}"),
s({ "font-family": "Inter", "font-size": 16, "font-weight": 700, color: "#111111", "margin": [3, 0, 0, 0] }, "{{recipient.city}}, {{recipient.state}} {{recipient.postalCode}}"),
s({ "font-family": "Inter", "font-size": 11, "font-weight": 700, color: "#111111" }, "{{recipient.country}}"),
s({ "font-family": "Inter", "font-size": 9, color: "#555555", "margin": [3, 0, 0, 0] }, "Tel: {{recipient.phone}}"),
),
),
gap(6),
// Parcel details grid
r({ border: 1, "border-color": "#999999" },
col("20%", { padding: [6, 6, 6, 8], border: 1, "border-color": "#cccccc" },
s({ "font-family": "Inter", "font-size": 7, color: "#555555", "font-weight": 700 }, "WEIGHT"),
s({ "font-family": "Inter", "font-size": 10, "font-weight": 700, color: "#111111" }, "{{parcel.weight}}"),
),
col("28%", { padding: [6, 6, 6, 8], border: 1, "border-color": "#cccccc" },
s({ "font-family": "Inter", "font-size": 7, color: "#555555", "font-weight": 700 }, "DIMENSIONS"),
s({ "font-family": "Inter", "font-size": 10, "font-weight": 700, color: "#111111" }, "{{parcel.dimensions}}"),
),
col("16%", { padding: [6, 6, 6, 8], border: 1, "border-color": "#cccccc" },
s({ "font-family": "Inter", "font-size": 7, color: "#555555", "font-weight": 700 }, "PKG"),
s({ "font-family": "Inter", "font-size": 10, "font-weight": 700, color: "#111111" }, "{{parcel.packageCount}}"),
),
col("16%", { padding: [6, 6, 6, 8], border: 1, "border-color": "#cccccc" },
s({ "font-family": "Inter", "font-size": 7, color: "#555555", "font-weight": 700 }, "TYPE"),
s({ "font-family": "Inter", "font-size": 10, "font-weight": 700, color: "#111111" }, "{{parcel.packageType}}"),
),
col("20%", { padding: [6, 6, 6, 8], border: 1, "border-color": "#cccccc" },
s({ "font-family": "Inter", "font-size": 7, color: "#555555", "font-weight": 700 }, "VALUE"),
s({ "font-family": "Inter", "font-size": 10, "font-weight": 700, color: "#111111" }, "{{parcel.declaredValue}}"),
),
),
gap(6),
// References row
r({ "background-color": "#f7f7f7", padding: [5, 8, 5, 8] },
col("50%",
s({ "font-family": "Inter", "font-size": 7, color: "#555555", "font-weight": 700 }, "REFERENCE"),
s({ "font-family": "Cousine", "font-size": 9, color: "#111111" }, "{{reference}}"),
),
col("50%", { align: "right" },
s({ "font-family": "Inter", "font-size": 7, color: "#555555", "font-weight": 700 }, "ORDER NO."),
s({ "font-family": "Cousine", "font-size": 9, color: "#111111" }, "{{orderNumber}}"),
),
),
gap(8),
// Tracking barcode block — prominent
r({ border: 2, "border-color": "#111111", padding: [10, 8, 10, 8], align: "center" },
col("100%", { align: "center" },
s({ "font-family": "Inter", "font-size": 8, "font-weight": 700, color: "#555555" }, "TRACKING NUMBER"),
s({ "font-family": "Inter", "font-size": 12, "font-weight": 700, color: "#111111", "margin": [2, 0, 6, 0] }, "{{trackingNumber}}"),
barcode("{{trackingNumber}}", { format: "code128", width: 320, height: 70, "show-text": true, alt: "Tracking {{trackingNumber}}" }),
),
),
gap(6),
// Sort code + instructions
r(
col("30%", { "background-color": "#111111", padding: [8, 8, 8, 8], align: "center" },
s({ "font-family": "Inter", "font-size": 7, color: "#cccccc", "font-weight": 700 }, "SORT"),
s({ "font-family": "Inter", "font-size": 18, "font-weight": 700, color: "#ffffff" }, "{{sortCode}}"),
),
col("70%", { border: 1, "border-color": "#111111", padding: [6, 8, 6, 8] },
s({ "font-family": "Inter", "font-size": 7, color: "#555555", "font-weight": 700 }, "HANDLING INSTRUCTIONS"),
s({ "font-family": "Inter", "font-size": 10, "font-weight": 700, color: "#111111", "margin": [2, 0, 0, 0] }, "{{instructions}}"),
),
),
ftrPages("{{carrier}} — {{trackingNumber}}"),
);
const sampleData = {
trackingNumber: "1Z999AA10123456784",
carrier: "UPS",
service: "UPS Ground",
serviceLevel: "Ground",
shipDate: "20 April 2026",
expectedDelivery: "24 April 2026",
reference: "PO-2026-004871",
orderNumber: "WEB-5581209",
sender: {
name: "Northline Distribution Center",
contact: "Shipping Dept",
address1: "2500 Logistics Way, Suite 100",
address2: "Dock 14",
city: "Los Angeles",
state: "CA",
postalCode: "90015",
country: "USA",
phone: "(213) 555-0177",
},
recipient: {
name: "Margaret Thompson",
company: "Thompson Design Studio",
address1: "456 Park Avenue",
address2: "Apartment 12B",
city: "New York",
state: "NY",
postalCode: "10022",
country: "USA",
phone: "(212) 555-0199",
},
parcel: {
weight: "2.5 lbs",
dimensions: "12 x 8 x 6 in",
packageCount: "1 of 1",
packageType: "Box",
declaredValue: "$185.00",
},
zone: "7",
routingCode: "NYC-212-10022",
sortCode: "A14-2",
instructions: "Signature required. Do not leave unattended.",
};Sample data
{
"trackingNumber": "1Z999AA10123456784",
"carrier": "UPS",
"service": "UPS Ground",
"serviceLevel": "Ground",
"shipDate": "20 April 2026",
"expectedDelivery": "24 April 2026",
"reference": "PO-2026-004871",
"orderNumber": "WEB-5581209",
"sender": {
"name": "Northline Distribution Center",
"contact": "Shipping Dept",
"address1": "2500 Logistics Way, Suite 100",
"address2": "Dock 14",
"city": "Los Angeles",
"state": "CA",
"postalCode": "90015",
"country": "USA",
"phone": "(213) 555-0177"
},
"recipient": {
"name": "Margaret Thompson",
"company": "Thompson Design Studio",
"address1": "456 Park Avenue",
"address2": "Apartment 12B",
"city": "New York",
"state": "NY",
"postalCode": "10022",
"country": "USA",
"phone": "(212) 555-0199"
},
"parcel": {
"weight": "2.5 lbs",
"dimensions": "12 x 8 x 6 in",
"packageCount": "1 of 1",
"packageType": "Box",
"declaredValue": "$185.00"
},
"zone": "7",
"routingCode": "NYC-212-10022",
"sortCode": "A14-2",
"instructions": "Signature required. Do not leave unattended."
}Render it with your data
Any API key can render this template by its ID. This call uses the sample data; add a data object to use your own. See the API reference.
curl -X POST https://makespdf.com/api/v1/render \
-H "Authorization: Bearer $MAKESPDF_API_KEY" \
-H "Content-Type: application/json" \
-d '{"templateId": "shipping-label-standard"}' \
-o output.pdf