diff --git a/app/Models/Labels/Tapes/Brother/TZe_24mm.php b/app/Models/Labels/Tapes/Brother/TZe_24mm.php new file mode 100644 index 0000000000..3c67bc1614 --- /dev/null +++ b/app/Models/Labels/Tapes/Brother/TZe_24mm.php @@ -0,0 +1,19 @@ +getUnit()); } + public function getMarginTop() { return Helper::convertUnit(self::MARGIN_SIDES, 'mm', $this->getUnit()); } + public function getMarginBottom() { return Helper::convertUnit(self::MARGIN_SIDES, 'mm', $this->getUnit());} + public function getMarginLeft() { return Helper::convertUnit(self::MARGIN_ENDS, 'mm', $this->getUnit()); } + public function getMarginRight() { return Helper::convertUnit(self::MARGIN_ENDS, 'mm', $this->getUnit()); } +} \ No newline at end of file diff --git a/app/Models/Labels/Tapes/Brother/TZe_24mm_A.php b/app/Models/Labels/Tapes/Brother/TZe_24mm_A.php new file mode 100644 index 0000000000..babfb5d408 --- /dev/null +++ b/app/Models/Labels/Tapes/Brother/TZe_24mm_A.php @@ -0,0 +1,69 @@ +getPrintableArea(); + + $x = $pa->x1; + $y = $pa->y1; + $w = $pa->w; + + if ($record->has('barcode2d')) { + static::write2DBarcode( + $pdf, $record->get('barcode2d')->content, $record->get('barcode2d')->type, + $x, $y, $pa->h, $pa->h + ); + $x += $pa->h + self::BARCODE_MARGIN; + $w -= $pa->h + self::BARCODE_MARGIN; + } + + if ($record->has('title')) { + static::writeText( + $pdf, $record->get('title'), + $x, $y, + 'freesans', '', self::TITLE_SIZE, 'L', + $w, self::TITLE_SIZE, true, 0 + ); + $y += self::TITLE_SIZE + self::TITLE_MARGIN; + } + + foreach ($record->get('fields') as $label => $value) { + static::writeText( + $pdf, $label, + $x, $y, + 'freesans', '', self::LABEL_SIZE, 'L', + $w, self::LABEL_SIZE, true, 0 + ); + $y += self::LABEL_SIZE + self::LABEL_MARGIN; + + static::writeText( + $pdf, $value, + $x, $y, + 'freemono', 'B', self::FIELD_SIZE, 'L', + $w, self::FIELD_SIZE, true, 0, 0.3 + ); + $y += self::FIELD_SIZE + self::FIELD_MARGIN; + } + } +} \ No newline at end of file