protected function getPng($code, $type) { $barcode = new \TCPDFBarcode($code, $type); return $barcode->getBarcodePNGData(2, 30, array(0, 0, 0)); }