Label Manipulation

RocketShipIt comes with a helper to manipulate EPL and ZPL thermal labels.

Currently only two adjustments are supported:

$helper->adjustStartingPosition($x, $y)

Changes Label Starting Postion

Parameters:
  • $x (int) – Starting X poition (from left)
  • $y (int) – Starting Y position (from top)
Returns:

base64_decoded label string

Example:

<?php
$helper = new \RocketShipIt\Helper\Label($label);
$adjustedLabel = $helper->adjustStartingPosition(0, 40);
$helper->addText($x, $y, $fontHeight, $fontWidth, $text)
Adds text to your label
Parameters:
  • $x (int) – Starting X poition (from left)
  • $y (int) – Starting Y position (from top)
  • $fontHeight (int) – Height of font in dots
  • $fontWidth (int) – Width of font in dots
  • $text (string) – Text to appear on label
Returns:

base64_decoded label string

Example:

<?php
$helper = new \RocketShipIt\Helper\Label($label);
$adjustedLabel = $helper->addText(400, 129, 20, 18, 'RocketShipIt!');