Browse Source

rapportino

Roberto Santini 1 month ago
parent
commit
4aa7911aba
1 changed files with 16 additions and 7 deletions
  1. 16
    7
      resources/views/segnalazione/pdf-ticket.blade.php

+ 16
- 7
resources/views/segnalazione/pdf-ticket.blade.php View File

@@ -499,7 +499,7 @@
499 499
   <p class="ticket-title">{{ $isRapportino ? "Rapportino d'intervento" : 'Ticket di segnalazione' }}</p>
500 500
   <p class="pdf-variant">
501 501
     @if($isRapportino)
502
-      Rapportino dell'intervento
502
+      {{-- Rapportino dell'intervento --}}
503 503
     @else
504 504
       {{ $isClientePdf ? 'Documento per il cliente' : 'Documento operatore' }}
505 505
     @endif
@@ -681,12 +681,21 @@
681 681
   <script type="text/php">
682 682
     if (isset($pdf)) {
683 683
       $font = $fontMetrics->getFont('DejaVu Sans', 'regular');
684
-      $footerText = 'My ElephanTech - © 2026 Elephantech';
685
-      $footerX = 40;
686
-      $footerY = $pdf->get_height() - 30;
687
-
688
-      $pdf->page_text($footerX, $footerY, $footerText, $font, 9, [0.45, 0.45, 0.45]);
689
-      $pdf->page_text($footerX, $footerY + 12, 'Pagina {PAGE_NUM} di {PAGE_COUNT}', $font, 9, [0.5, 0.5, 0.5]);
684
+      $size = 9;
685
+      $color = [0.45, 0.45, 0.45];
686
+      $marginX = 42;
687
+      $footerY = $pdf->get_height() - 28;
688
+
689
+      $pdf->page_line($marginX, $footerY - 8, $pdf->get_width() - $marginX, $footerY - 8, [0.8, 0.8, 0.8], 0.6);
690
+      $pdf->page_text($marginX, $footerY, 'My elephantech 2026', $font, $size, $color);
691
+      $pdf->page_script('
692
+        $font = $fontMetrics->getFont("DejaVu Sans", "regular");
693
+        $size = 9;
694
+        $text = "Pagina " . $PAGE_NUM . " di " . $PAGE_COUNT;
695
+        $width = $pdf->get_text_width($text, $font, $size);
696
+        $x = $pdf->get_width() - 42 - $width;
697
+        $pdf->text($x, $pdf->get_height() - 28, $text, $font, $size, [0.45, 0.45, 0.45]);
698
+      ');
690 699
     }
691 700
   </script>
692 701
 </body>

Loading…
Cancel
Save