Esempio n. 1
-1
 /**
  * Convert widths and heights to characters. Used before sending graphics to set the size.
  * 
  * @param array $inputs
  * @param boolean $long True to use 4 bytes, false to use 2
  * @return string
  */
 private static function dataHeader(array $inputs, $long = true)
 {
     $outp = array();
     foreach ($inputs as $input) {
         if ($long) {
             $outp[] = Escpos::intLowHigh($input, 2);
         } else {
             self::validateInteger($input, 0, 255, __FUNCTION__);
             $outp[] = chr($input);
         }
     }
     return implode("", $outp);
 }