41 lines
1.7 KiB
PHP
41 lines
1.7 KiB
PHP
<?php
|
|
use chillerlan\QRCode\QRCode;
|
|
use chillerlan\QRCode\QROptions;
|
|
|
|
// QR code options - small padding, high quality
|
|
$options = new QROptions([
|
|
'outputType' => QRCode::OUTPUT_IMAGE_PNG,
|
|
'scale' => 10,
|
|
'quietzoneSize' => 1,
|
|
]);
|
|
|
|
// Generate QR code data - encode article ID for Inventur scanning
|
|
$qrData = "WA:" . $articleId . ":" . $articleNumber;
|
|
$qrCodeBase64 = (new QRCode($options))->render($qrData);
|
|
?>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<style>
|
|
* { margin: 0; padding: 0; }
|
|
html, body { height: 25mm; width: 63mm; overflow: hidden; }
|
|
body { font-family: Arial, sans-serif; color: #000; }
|
|
table { border-collapse: collapse; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<table cellpadding="0" cellspacing="0" border="0" style="width: 63mm; height: 25mm;">
|
|
<tr>
|
|
<td style="width: 24mm; height: 25mm; position: relative;">
|
|
<img src="<?php echo $qrCodeBase64; ?>" style="width: 21mm; height: 21mm; position: absolute; top: 50%; left: 50%; margin-top: -10.5mm; margin-left: -10.5mm;">
|
|
</td>
|
|
<td style="height: 25mm; vertical-align: middle; padding-left: 1mm; padding-right: 1mm;">
|
|
<img src="<?php echo BASEDIR; ?>/public/assets/images/xinon-full-transparent.png" style="width: 24mm; height: auto; display: block; margin: 0 auto 1mm auto;">
|
|
<div style="font-size: 11px; font-weight: bold; color: #000; text-align: center;"><?php echo htmlspecialchars($articleNumber); ?></div>
|
|
<div style="font-size: 9px; color: #000; margin-top: 1px; word-wrap: break-word; overflow: hidden; text-align: center;"><?php echo htmlspecialchars($articleTitle); ?></div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</body>
|
|
</html>
|