> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pdfdyno.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Shipping Label

> A compact shipping label template with address blocks and barcode placeholders.

<Frame>
  <img src="https://mintcdn.com/pdf-dyno/pat72jpBFeHUuLAU/images/templates/shipping.png?fit=max&auto=format&n=pat72jpBFeHUuLAU&q=85&s=1537b266b6a04597cd2b78c52c01a2d3" alt="Shipping Label Preview" width="477" height="718" data-path="images/templates/shipping.png" />
</Frame>

Generate high-quality shipping labels for logistics and e-commerce platforms.

<CodeGroup>
  ```typst template.typ theme={null}
  // Standard Shipping Label format (4x6 inches)
  #set page(width: 4in, height: 6in, margin: 0.25in)
  #set text(font: "Helvetica", size: 10pt)

  #let brand-color = rgb("#334155")

  // Top Header
  #grid(
    columns: (1fr, 1fr),
    align(left)[
      #text(weight: "bold", size: 14pt)[#data.carrier] \
      #data.service_type
    ],
    align(right)[
      #text(weight: "bold", size: 24pt)[#data.zone]
    ]
  )

  #v(0.1in)
  #line(length: 100%, stroke: 2pt)
  #v(0.1in)

  // Sender (From)
  #text(size: 8pt)[FROM:] \
  #text(weight: "bold")[#data.sender.name] \
  #data.sender.address \
  #data.sender.city, #data.sender.state #data.sender.zip

  #v(0.2in)

  // Recipient (To)
  #text(size: 10pt)[TO:] \
  #text(size: 14pt, weight: "bold")[#data.recipient.name] \
  #text(size: 12pt)[
    #data.recipient.address \
    #data.recipient.city, #data.recipient.state #data.recipient.zip
  ]

  #v(0.2in)
  #line(length: 100%, stroke: 2pt)
  #v(0.1in)

  // Tracking and Barcode Area
  #align(center)[
    #text(weight: "bold", size: 12pt)[TRACKING NUMBER] \
    #v(0.1in)
    
    // Placeholder for a generated barcode
    #rect(width: 3in, height: 0.8in, fill: black)[
      #align(center + horizon)[
        #text(fill: white, size: 10pt)[BARCODE RENDERING HERE]
      ]
    ]
    
    #v(0.1in)
    #text(font: "Courier", weight: "bold", size: 11pt)[#data.tracking_number]
  ]

  #v(1fr)

  #align(right)[
    #text(size: 8pt)[Weight: #data.weight | Date: #data.date]
  ]
  ```

  ```json data.json theme={null}
  {
    "carrier": "EXPRESS LOGISTICS",
    "service_type": "2-Day Priority",
    "zone": "ZONE 4",
    "sender": {
      "name": "PDFDyno Fulfillment",
      "address": "100 Warehouse Way",
      "city": "Austin",
      "state": "TX",
      "zip": "78701"
    },
    "recipient": {
      "name": "Jane Doe",
      "address": "123 Main Street, Apt 4B",
      "city": "Seattle",
      "state": "WA",
      "zip": "98101"
    },
    "tracking_number": "1Z 999 AA1 01 2345 6784",
    "weight": "2.4 lbs",
    "date": "08/06/2026"
  }
  ```

  ```bash cURL (Try It) theme={null}
  # 1. Save the Typst code from the tab above as 'template.typ'
  # 2. Save the JSON data from the tab above as 'data.json'

  # 3. Combine them and call the API (requires jq)
  jq -n \
    --arg t "$(cat template.typ)" \
    --argjson d "$(<data.json)" \
    '{ "data": $d, "template": $t }' > request.json

  curl -X POST https://api.pdfdyno.com/v1/pdf/generate \
    -H "Authorization: Bearer sk_live_YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d @request.json \
    --output shipping.pdf
  ```
</CodeGroup>
