diff --git a/src/app/convert/controllers/ConvertPdfController.php b/src/app/convert/controllers/ConvertPdfController.php index 8e5945217407f06f79b8920066765f80d1e18637..d2660425d9a273c079a17cb7f113e4b1d381da60 100755 --- a/src/app/convert/controllers/ConvertPdfController.php +++ b/src/app/convert/controllers/ConvertPdfController.php @@ -19,7 +19,6 @@ use Attachment\models\AttachmentModel; use Convert\models\AdrModel; use Docserver\controllers\DocserverController; use Docserver\models\DocserverModel; -use Resource\controllers\StoreController; use Resource\models\ResModel; use SrcCore\models\CoreConfigModel; use SrcCore\models\ValidatorModel; diff --git a/src/app/entity/controllers/EntitySeparatorController.php b/src/app/entity/controllers/EntitySeparatorController.php index 70a1794e92ab7432db9e596a14dfd47d38b8605d..a094f0510485cf50a5aa008dc6945d1e3aa879e9 100755 --- a/src/app/entity/controllers/EntitySeparatorController.php +++ b/src/app/entity/controllers/EntitySeparatorController.php @@ -44,7 +44,7 @@ class EntitySeparatorController $entitiesList = []; if ($bodyData['target'] == 'generic') { - $entitiesList['COURRIER'] = 'Maarch Courrier'; + $entitiesList['GÉNÉRIQUE'] = 'Maarch Courrier'; } else { if (!Validator::arrayType()->notEmpty()->validate($bodyData['entities'])) { return $response->withStatus(403)->withJson(['errors' => 'entities is not set or empty']); @@ -74,14 +74,12 @@ class EntitySeparatorController } foreach ($entitiesList as $entityId => $entityLabel) { $pdf->AddPage(); - $pdf->SetFont('', 'B', 20); - $pdf->Cell(250, 20, _PRINT_SEP_TITLE, 0, 1, 'C'); - $pdf->Cell(250, 20, $entityId, 0, 1, 'C'); - $pdf->Cell(180, 10, '', 0, 1, 'C'); + $pdf->SetFont('', 'B', 25); if ($bodyData['type'] == 'qrcode') { $qrCode = new QrCode($prefix . $entityId); - $pdf->Image('@'.$qrCode->writeString(), 0, 0, 80); + $qrCode->setSize(600); + $pdf->Image('@'.$qrCode->writeString(), 0, 40, 200, '', '', '', '', false, '', 'C'); } else { $barcode = new Barcode(); $bobj = $barcode->getBarcodeObj( @@ -96,25 +94,15 @@ class EntitySeparatorController $pdf->Image('@'.$bobj->getPngData(), 40, 50, 120); } - $pdf->Cell(180, 10, '', 0, 1, 'C'); - $pdf->Cell(180, 10, '', 0, 1, 'C'); - $pdf->Cell(180, 10, '', 0, 1, 'C'); - $pdf->Cell(180, 10, '', 0, 1, 'C'); - $pdf->Cell(180, 10, '', 0, 1, 'C'); - $pdf->Cell(180, 10, '', 0, 1, 'C'); - $pdf->Cell(180, 10, '', 0, 1, 'C'); - $pdf->Cell(180, 10, '', 0, 1, 'C'); - $pdf->Cell(180, 10, utf8_decode(_ENTITY), 1, 1, 'C'); + $pdf->SetY($pdf->GetY() + 300); + $pdf->Cell(0, 20, _PRINT_SEP_TITLE, 0, 2, 'C', false); + $pdf->SetY($pdf->GetY() + 60); + $pdf->Cell(0, 30, _ENTITY, 1, 1, 'C'); $pdf->SetFont('', 'B', 12); - $pdf->Cell(180, 10, utf8_decode($entityLabel), 1, 1, 'C'); + $pdf->Cell(0, 30, $entityLabel . ' (' . $entityId . ')', 1, 1, 'C'); } $fileContent = $pdf->Output('', 'S'); - $finfo = new \finfo(FILEINFO_MIME_TYPE); - $mimeType = $finfo->buffer($fileContent); - - $response->write($fileContent); - $response = $response->withAddedHeader('Content-Disposition', "inline; filename=entitySeparator.pdf"); return $response->withJson(base64_encode($fileContent)); } diff --git a/src/core/lang/lang-en.php b/src/core/lang/lang-en.php index ab5fdf6ef1b6a22de2408a6ba63b1796cf724085..2b5a00068f2e92825ce433bd67e6a3d981178c56 100755 --- a/src/core/lang/lang-en.php +++ b/src/core/lang/lang-en.php @@ -497,4 +497,4 @@ define("_FILE_NOT_ALLOWED_INFO_2", "with MIME-type"); define("_FILE_NOT_ALLOWED_INFO_3", "is not allowed"); define("_ENTITY", "Entity"); -define("_PRINT_SEP_TITLE", "Scan separator"); +define("_PRINT_SEP_TITLE", "Mail separator"); diff --git a/src/core/lang/lang-fr.php b/src/core/lang/lang-fr.php index b37733902af9dc894f7cf14b8a4ac901ee278c05..4cf1233c840339de517a21e5e9885791afff77cf 100755 --- a/src/core/lang/lang-fr.php +++ b/src/core/lang/lang-fr.php @@ -496,4 +496,4 @@ define("_FILE_NOT_ALLOWED_INFO_1", "L'extension"); define("_FILE_NOT_ALLOWED_INFO_2", "avec le type MIME"); define("_FILE_NOT_ALLOWED_INFO_3", "n'est pas autorisée"); define("_ENTITY", "Entité"); -define("_PRINT_SEP_TITLE", "Séparateur de scan"); +define("_PRINT_SEP_TITLE", "Séparateur de courrier"); diff --git a/src/core/lang/lang-nl.php b/src/core/lang/lang-nl.php index 247795abf33bb2b9c6185e58edc20a5adb185fa0..5520946a164e80906eb890bed0578da7a7e84602 100755 --- a/src/core/lang/lang-nl.php +++ b/src/core/lang/lang-nl.php @@ -499,4 +499,4 @@ define("_FILE_NOT_ALLOWED_INFO_2", "with MIME-type_TO_TRANSLATE"); define("_FILE_NOT_ALLOWED_INFO_3", "is not allowed_TO_TRANSLATE"); define("_ENTITY", "Entity_TO_TRANSLATE"); -define("_PRINT_SEP_TITLE", "Scan separator_TO_TRANSLATE"); +define("_PRINT_SEP_TITLE", "Mail separator_TO_TRANSLATE");