File Types for Labels and Documents

This guide explains the recommended file types for labels, their benefits and limitations, and how to resolve common issues. You'll also learn how to specify the label format in your API requests to prevent errors.

How to Specify Label Type in a Request

By default, labels are generated in PNG format, which may not be ideal for printing. To specify a different format, follow these steps.

Steps to Specify Label Format

  1. Locate the label_format Parameter
    In your API request body, find the label_format field.
    Example of a request body section:

    ],

    "service_id": 1172,

    "ship_date": "",

    "label_format": "png",

    "label_size": "4x6",

    "label_text1": "",

    "label_text2": "",

    "inline_image": false,

    "label_scale": null

  }


  1. Modify the label_format Value
    Change "label_format" to your preferred file type. Supported values include:
    • png
    • pdf
    • zpl
    • jpeg
      Use lowercase letters to avoid errors.
  2. Check Carrier Compatibility
    Not all carriers support every label format. If an issue arises, check the carrier’s documentation or contact support.

For more details, visit the API documentation under the Shipments section.

Label Format Types

Each label format has unique strengths. Below is an overview of when to use each one.

PDF (Portable Document Format)

Best for: High-quality, print-ready labels

Pros:

  • Consistent formatting across devices and printers
  • Ideal for multi-label sheets or reviewing labels before printing

Cons:

  • Requires compatible software such as Adobe Reader, though widely supported

Recommendation: Use PDF for most printable labels due to its reliability and compatibility.

ZPL (Zebra Programming Language)

Best for: High-speed, high-volume thermal printing with Zebra printers

Pros:

  • Optimized for thermal printers, ensuring fast and clear printing
  • Uses text-based commands for efficient label creation

Cons:

  • Limited to printers compatible with ZPL, such as Zebra thermal printers

Recommendation: Best for high-volume shipping operations using thermal printers.

JPEG (Joint Photographic Experts Group)

Best for: Labels that contain photographic images

Pros:

  • Efficient for photo-based images

Cons:

  • Compression may reduce barcode clarity
  • Does not support transparency

Recommendation: Avoid JPEG for barcode labels, as compression can impact barcode readability.

PNG (Portable Network Graphics)

Best for: Digital display of labels, not high-volume printing

Pros:

  • Preserves image detail and supports transparency
  • Useful for web-based label previews

Cons:

  • Less efficient for physical label printing than PDF
  • Cannot separate multi-page labels, leading to overlapping content

Recommendation: Use PNG for digital previews. For printing, PDF or ZPL is preferred.

Default Format Warning

PNG is the default format, but it has several drawbacks for printed labels:

  • Blurry or Incorrectly Sized Labels
    • PNG is pixel-based, so scaling issues can lead to blurry images or incorrect label sizing.
  • Overlapping Content on Multi-Page Labels
    • For international shipments, customs forms may require multiple pages. PNG cannot handle this well, compressing content into a single, unreadable label.
  • Limited Page Management
    • Unlike PDF or ZPL, PNG does not support multi-page separation, making it harder to print complex labels.

For printed labels, use PDF or ZPL to ensure clarity, correct sizing, and proper formatting.

Common Label Errors and Solutions

Multi-Page Label Overlap

Issue:

  • Customs forms for international shipments require multiple pages. In PNG format, content may compress into a single page, making labels unreadable.

Solution:

  • Switch to PDF or ZPL format for proper page separation.

Blurry or Incorrectly Sized Labels

Issue:

  • Labels print partially off the label area, appear blurry, or have incorrect scaling.

Solution:

  • Use PDF or ZPL format.
  • Check printer settings to match the required label size.

Key Takeaways

  • PDF – Best for high-quality, printable labels with consistent formatting.
  • ZPL – Ideal for fast, efficient thermal printing in high-volume environments.
  • JPEG – Use selectively for photographic images, but avoid for barcodes.
  • PNG – Best for online or digital use. For printing, PDF or ZPL are more reliable.

Choosing the right label format helps prevent printing issues and ensures smooth shipment processing.


For assistance, contact support@ehub.com.