Skip to content

Commit 97851c4

Browse files
committed
Translate texts and add Lato font
1 parent eeb94bd commit 97851c4

File tree

3 files changed

+20
-12
lines changed

3 files changed

+20
-12
lines changed

src/ReportMedia/PdfReport.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ public function make()
3535
try {
3636
$pdf = \App::make('snappy.pdf.wrapper');
3737
$pdf->setOption('footer-font-size', 10);
38-
$pdf->setOption('footer-left', 'Page [page] of [topage]');
39-
$pdf->setOption('footer-right', 'Date Printed: ' . date('d M Y H:i:s'));
38+
$pdf->setOption('footer-left', 'Página [page] de [topage]');
39+
$pdf->setOption('footer-right', 'Data de impressão: ' . date('d M Y H:i:s'));
4040
} catch (\ReflectionException $e) {
4141
try {
4242
$pdf = \App::make('dompdf.wrapper');

src/views/general-pdf-template.blade.php

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8">
5+
<link href="https://fonts.googleapis.com/css?family=Lato:100,100i,300,300i,400,400i,700,700i,900,900i&amp;subset=latin-ext"
6+
rel="stylesheet">
57
<style>
68
body {
7-
font-family: Arial, Helvetica, sans-serif;
9+
font-family: 'Lato', Arial, Helvetica, sans-serif;
810
}
911
1012
.wrapper {
@@ -70,9 +72,13 @@
7072
7173
@foreach ($styles as $style)
7274
{{ $style['selector'] }}
75+
76+
7377
{
7478
{{ $style['style'] }}
7579
80+
81+
7682
}
7783
@endforeach
7884
</style>
@@ -284,13 +290,13 @@
284290
<script type="text/php">
285291
@if (strtolower($orientation) == 'portrait')
286292
if ( isset($pdf) ) {
287-
$pdf->page_text(30, ($pdf->get_height() - 26.89), "Date Printed: " . date('d M Y H:i:s'), null, 10);
288-
$pdf->page_text(($pdf->get_width() - 84), ($pdf->get_height() - 26.89), "Page {PAGE_NUM} of {PAGE_COUNT}", null, 10);
293+
$pdf->page_text(30, ($pdf->get_height() - 26.89), "Data de impressão: " . date('d M Y H:i:s'), null, 10);
294+
$pdf->page_text(($pdf->get_width() - 84), ($pdf->get_height() - 26.89), "Página {PAGE_NUM} de {PAGE_COUNT}", null, 10);
289295
}
290296
@elseif (strtolower($orientation) == 'landscape')
291297
if ( isset($pdf) ) {
292-
$pdf->page_text(30, ($pdf->get_height() - 26.89), "Date Printed: " . date('d M Y H:i:s'), null, 10);
293-
$pdf->page_text(($pdf->get_width() - 84), ($pdf->get_height() - 26.89), "Page {PAGE_NUM} of {PAGE_COUNT}", null, 10);
298+
$pdf->page_text(30, ($pdf->get_height() - 26.89), "Data de impressão: " . date('d M Y H:i:s'), null, 10);
299+
$pdf->page_text(($pdf->get_width() - 84), ($pdf->get_height() - 26.89), "Página {PAGE_NUM} de {PAGE_COUNT}", null, 10);
294300
}
295301
@endif
296302
</script>

src/views/without-manipulation-pdf-template.blade.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8">
5+
<link href="https://fonts.googleapis.com/css?family=Lato:100,100i,300,300i,400,400i,700,700i,900,900i&amp;subset=latin-ext"
6+
rel="stylesheet">
57
<style>
68
body {
7-
font-family: Arial, Helvetica, sans-serif;
9+
font-family: 'Lato', Arial, Helvetica, sans-serif;
810
}
911
1012
.wrapper {
@@ -194,13 +196,13 @@
194196
<script type="text/php">
195197
@if (strtolower($orientation) == 'portrait')
196198
if ( isset($pdf) ) {
197-
$pdf->page_text(30, ($pdf->get_height() - 26.89), "Date Printed: " . date('d M Y H:i:s'), null, 10);
198-
$pdf->page_text(($pdf->get_width() - 84), ($pdf->get_height() - 26.89), "Page {PAGE_NUM} of {PAGE_COUNT}", null, 10);
199+
$pdf->page_text(30, ($pdf->get_height() - 26.89), "Data de impressão: " . date('d M Y H:i:s'), null, 10);
200+
$pdf->page_text(($pdf->get_width() - 84), ($pdf->get_height() - 26.89), "Página {PAGE_NUM} de {PAGE_COUNT}", null, 10);
199201
}
200202
@elseif (strtolower($orientation) == 'landscape')
201203
if ( isset($pdf) ) {
202-
$pdf->page_text(30, ($pdf->get_height() - 26.89), "Date Printed: " . date('d M Y H:i:s'), null, 10);
203-
$pdf->page_text(($pdf->get_width() - 84), ($pdf->get_height() - 26.89), "Page {PAGE_NUM} of {PAGE_COUNT}", null, 10);
204+
$pdf->page_text(30, ($pdf->get_height() - 26.89), "Data de impressão: " . date('d M Y H:i:s'), null, 10);
205+
$pdf->page_text(($pdf->get_width() - 84), ($pdf->get_height() - 26.89), "Página {PAGE_NUM} de {PAGE_COUNT}", null, 10);
204206
}
205207
@endif
206208
</script>

0 commit comments

Comments
 (0)