improved cpev2
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
$maxLength = max(mb_strlen($firstline ?? ''), mb_strlen($secondline ?? ''));
|
||||
|
||||
$fontSize = '12px';
|
||||
if ($maxLength <= 15) $fontSize = '24px';
|
||||
elseif ($maxLength <= 24) $fontSize = '18px';
|
||||
elseif ($maxLength <= 50) $fontSize = '16px';
|
||||
|
||||
$this->setReturnValue(['filename' => "xyz." . time() . "pdf"]);
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>CPE-Etikett</title>
|
||||
<meta charset="utf-8"/>
|
||||
<style>
|
||||
html, body {
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-family: "Open Sans", sans-serif, Verdana;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
body {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.content-block {
|
||||
font-size: <?= $fontSize ?>;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="content-block">
|
||||
<div><?= $firstline ?></div>
|
||||
<div><?= $secondline ?></div>
|
||||
<div><?= $thirdline ?></div>
|
||||
<div><?= $fourthline ?></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user