diff --git a/app/Models/Labels/Tapes/Brother/TZe_12mm.php b/app/Models/Labels/Tapes/Brother/TZe_12mm.php new file mode 100644 index 0000000000..f9196847ce --- /dev/null +++ b/app/Models/Labels/Tapes/Brother/TZe_12mm.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_12mm_A.php b/app/Models/Labels/Tapes/Brother/TZe_12mm_A.php new file mode 100644 index 0000000000..060ab3cb83 --- /dev/null +++ b/app/Models/Labels/Tapes/Brother/TZe_12mm_A.php @@ -0,0 +1,54 @@ +getPrintableArea(); + + if ($record->has('barcode1d')) { + static::write1DBarcode( + $pdf, $record->get('barcode1d')->content, $record->get('barcode1d')->type, + $pa->x1, $pa->y1, $pa->w, self::BARCODE_SIZE + ); + } + + $fields = $record->get('fields'); + $y = $pa->y1 + self::BARCODE_SIZE + self::BARCODE_MARGIN; + $realSize = $pa->h - self::BARCODE_SIZE - self::BARCODE_MARGIN; + $fontSize = $realSize + self::FIELD_SIZE_MOD; + + if ($fields->count() >= 1) { + static::writeText( + $pdf, $fields->values()->get(0), + $pa->x1, $y, + 'freemono', 'B', $fontSize, 'L', + $pa->w, $realSize, true, 0, 0.1 + ); + } + if ($fields->count() >= 2) { + static::writeText( + $pdf, $fields->values()->get(1), + $pa->x1, $y, + 'freemono', 'B', $fontSize, 'R', + $pa->w, $realSize, true, 0, 0.1 + ); + } + + } +} \ No newline at end of file