diff --git a/app/Models/Labels/Sheets/Avery/L7162_Example_QR.php b/app/Models/Labels/Sheets/Avery/L7162_Example_QR.php new file mode 100644 index 0000000000..54c886e6e4 --- /dev/null +++ b/app/Models/Labels/Sheets/Avery/L7162_Example_QR.php @@ -0,0 +1,77 @@ +getLabelPrintableArea(); + + static::write2DBarcode( + $pdf, $record->get('barcode2d')->content, $record->get('barcode2d')->type, + $pa->x1, $pa->y1, + $pa->h, $pa->h + ); + + $x = $pa->x1 + $pa->h + self::BARCODE2D_MARGIN; + $y = $pa->y1; + $w = $pa->w - $pa->h - self::BARCODE2D_MARGIN; + + if ($record->get('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