From 2ef98a949687a5aedfdaff84de1b1c9020b09b9c Mon Sep 17 00:00:00 2001 From: amazuecos Date: Mon, 19 May 2025 20:47:19 +0200 Subject: [PATCH] fix pdf font sizes and updated info --- .../vuexy/pdfs/encuadernados/default.php | 8 +- ci4/app/Views/themes/vuexy/pdfs/ferro.php | 101 +++++++++------ .../Views/themes/vuexy/pdfs/orden_trabajo.php | 122 ++++++++++-------- ci4/app/Views/themes/vuexy/pdfs/prototipo.php | 122 ++++++++++-------- .../assets/js/safekat/pages/pdf/otDownload.js | 23 ++-- httpdocs/themes/vuexy/css/pdf.ot.css | 47 ++++--- 6 files changed, 241 insertions(+), 182 deletions(-) diff --git a/ci4/app/Views/themes/vuexy/pdfs/encuadernados/default.php b/ci4/app/Views/themes/vuexy/pdfs/encuadernados/default.php index 07b92483..4ceaabee 100644 --- a/ci4/app/Views/themes/vuexy/pdfs/encuadernados/default.php +++ b/ci4/app/Views/themes/vuexy/pdfs/encuadernados/default.php @@ -1,9 +1,7 @@ - - - + @@ -12,9 +10,7 @@ 0): ?> - - - + diff --git a/ci4/app/Views/themes/vuexy/pdfs/ferro.php b/ci4/app/Views/themes/vuexy/pdfs/ferro.php index c59bdf65..0b95135d 100755 --- a/ci4/app/Views/themes/vuexy/pdfs/ferro.php +++ b/ci4/app/Views/themes/vuexy/pdfs/ferro.php @@ -56,13 +56,13 @@ $settings = $session->get('settings');
;color:;"> - fecha_encuadernado ? week_day_humanize(Time::createFromFormat("Y-m-d H:i:s", $pedido->fecha_encuadernado)->getDayOfWeek() - 1, true) : "" ?> - Comercial: first_name . " " . $cliente->comercial()->last_name ?> + fecha_encuadernado ? week_day_humanize(Time::createFromFormat("Y-m-d H:i:s", $pedido->fecha_encuadernado)->getDayOfWeek() - 1, true) : "" ?> + Comercial: first_name . " " . $cliente->comercial()->last_name ?>
- ;color:;"> + ;color:;"> POD presupuestoLineaImpresion()->isRotativa()): ?> @@ -70,18 +70,19 @@ $settings = $session->get('settings'); GENERAL - -
-
- +
+
+ ;">fecha_encuadernado ? Time::createFromFormat("Y-m-d H:i:s", $pedido->fecha_encuadernado)->format('d/m/Y') : "" ?> +
+
-
EncuadernacionSobrecubierta Guardas Retractilado
tarifa()->nombre ?>hasSobrecubierta() ? "SI" : "NO" ?> guardas ? "SI" : "NO" ?> retractilado ? "SI" : "NO" ?>
+
@@ -103,26 +104,27 @@ $settings = $session->get('settings');
IN
+ -
+
-
;color:;"> - +
;color:;"> +
-
;color:;"> +
;color:;"> papel_impresion()->papel_code_ot ?>
-
"> +
">
-
;color:;"> +
;color:;"> papel_impresion()->papel_code_ot ?>
-
;color:;"> +
;color:;"> tarifa()->code : "" ?>
$acabado): ?> @@ -137,7 +139,7 @@ $settings = $session->get('settings');
">
- ;">id ?> + ;">id ?>
barcode @@ -151,32 +153,30 @@ $settings = $session->get('settings');
- +
- - + + - + - + - + - +
IDSK - - IDSK
CLIENTECLIENTE alias ?>
TITULOTITULO titulo ?>
ISBNISBN isbn ?>
PEDIDO CLIENTEPEDIDO id ?>
@@ -184,12 +184,10 @@ $settings = $session->get('settings');
- imposicion_esquema()): ?> imposicion_esquema()->svg_schema ?> -
@@ -204,21 +202,33 @@ $settings = $session->get('settings');
-
IMP. INTERIOR
+
+
IMP. INTERIOR
+ fecha_impresion): ?> +
fecha_impresion)->format('d/m/Y') ?>
+ +
- - - - - - - - - - - -
ancho ?>xalto ?> 1 tipo_presupuesto()?->codigo ?? "" ?> lomo_cubierta, 2, ',', '.') ?>
+ + + + + + + + + papel_formato_personalizado): ?> + + + + + + + + + +
papel_formato_ancho ?>xpapel_formato_alto ?> ancho ?>xalto ?> 1 tipo_presupuesto()?->codigo ?? "" ?> lomo_cubierta, 2, ',', '.') ?>
@@ -251,7 +261,7 @@ $settings = $session->get('settings');
-
+
Comentarios impresión interior

@@ -262,7 +272,12 @@ $settings = $session->get('settings');

-
LOGISTICA
+
+
LOGISTICA
+ fecha_entrega_real): ?> +
fecha_entrega_real)->format('d/m/Y') ?>
+ +
@@ -276,7 +291,7 @@ $settings = $session->get('settings');
-
-
+
Comentarios logistica:

diff --git a/ci4/app/Views/themes/vuexy/pdfs/orden_trabajo.php b/ci4/app/Views/themes/vuexy/pdfs/orden_trabajo.php index 62271989..065f73b5 100755 --- a/ci4/app/Views/themes/vuexy/pdfs/orden_trabajo.php +++ b/ci4/app/Views/themes/vuexy/pdfs/orden_trabajo.php @@ -48,21 +48,19 @@ $settings = $session->get('settings'); full_path)) : '/assets/img/portada_not_found.png' ?>" /> - -

;color:;">
;color:;"> - fecha_encuadernado ? week_day_humanize(Time::createFromFormat("Y-m-d H:i:s", $pedido->fecha_encuadernado)->getDayOfWeek() - 1, true) : "" ?> - Comercial: first_name . " " . $cliente->comercial()->last_name ?> + fecha_encuadernado ? week_day_humanize(Time::createFromFormat("Y-m-d H:i:s", $pedido->fecha_encuadernado)->getDayOfWeek() - 1, true) : "" ?> + Comercial: first_name . " " . $cliente->comercial()->last_name ?>
- ;color:;"> + ;color:;"> POD presupuestoLineaImpresion()->isRotativa()): ?> @@ -80,12 +78,12 @@ $settings = $session->get('settings');
-
- ;">fecha_encuadernado ? Time::createFromFormat("Y-m-d H:i:s", $pedido->fecha_encuadernado)->format('d/m/Y') : "" ?> +
+ ;">fecha_encuadernado ? Time::createFromFormat("Y-m-d H:i:s", $pedido->fecha_encuadernado)->format('d/m/Y') : "" ?>
- +
@@ -110,23 +108,23 @@ $settings = $session->get('settings'); -
+
-
;color:;"> - +
;color:;"> +
-
-
;color:;"> +
+
;color:;"> papel_impresion()->papel_code_ot ?>
-
"> +
">
-
;color:;"> +
;color:;"> papel_impresion()->papel_code_ot ?>
-
;color:;"> +
;color:;"> tarifa()->code : "" ?>
$acabado): ?> @@ -141,7 +139,7 @@ $settings = $session->get('settings');
">
- ;">id ?> + ;">id ?>
barcode @@ -155,32 +153,32 @@ $settings = $session->get('settings');
-
IN
+
- - + - + - + - + - +
IDSK + IDSK
CLIENTECLIENTE alias ?>
TITULOTITULO titulo ?>
ISBNISBN isbn ?>
PEDIDO CLIENTEPEDIDO id ?>
@@ -188,7 +186,6 @@ $settings = $session->get('settings');
- imposicion_esquema()): ?> imposicion_esquema()->svg_schema ?> @@ -208,19 +205,31 @@ $settings = $session->get('settings');
-
IMP. INTERIOR
+
+
IMP. INTERIOR
+ fecha_impresion): ?> +
fecha_impresion)->format('d/m/Y') ?>
+ +
- +
- - - + + + + + + + papel_formato_personalizado): ?> + + + + - - +
ancho ?>xalto ?>
papel_formato_ancho ?>xpapel_formato_alto ?> ancho ?>xalto ?> tirada ?> + merma ?> tipo_presupuesto()?->codigo ?? "" ?> lomo_cubierta, 2, ',', '.') ?>
@@ -235,12 +244,12 @@ $settings = $session->get('settings'); - - + + - + @@ -255,8 +264,8 @@ $settings = $session->get('settings');
Tiempo
paginas ?> tirada ?> paginas, 0, ',', '.') ?> tirada, 0, ',', '.') ?> tinta() ?> formas)->formas ?> maquina()->nombre ?>rotativa_clicks_total ?>rotativa_clicks_total, 0, ',', '.') ?> horas_maquina * 3600) ?>
-
-
+
+

comment_interior ?> @@ -270,7 +279,7 @@ $settings = $session->get('settings');

IMP. CUBIERTA
- +
@@ -294,7 +303,7 @@ $settings = $session->get('settings');
Tintas
-
+
@@ -308,12 +317,19 @@ $settings = $session->get('settings');
-
ACABADOS/ENCUADERNACIÓN
+
+
ACABADOS/ENCUADERNACIÓN
+ fecha_encuadernado): ?> +
fecha_encuadernado)->format('d/m/Y') ?>
+ +
-
;color:;"> - +
+
;color:;"> + +
- +
$acabado): ?> @@ -324,7 +340,7 @@ $settings = $session->get('settings'); - + @@ -345,14 +361,15 @@ $settings = $session->get('settings'); } } catch (\Throwable $th) { $error_message = $th->getMessage(); - echo "No se ha podido renderizar la tabla de encuadernación"; + // echo view("/themes/vuexy/pdfs/encuadernados/default.php", ["encuadernacion" => $encuadernacion]); + // echo "No se ha podido renderizar la tabla de encuadernación"; // echo "
$error_message"; } } ?> 0): ?> -
+

@@ -366,23 +383,26 @@ $settings = $session->get('settings');

-
LOGISTICA
+
+
LOGISTICA
+ fecha_entrega_real): ?> +
fecha_entrega_real)->format('d/m/Y') ?>
+ +
-
Plastificadoproveedor() ? $acabado->proveedor()->nombre : "" ?>
info_solapa_guillotina?>info_solapa_guillotina ?> CORTE PIE:
+
- -
Peso Unidad Peso Pedido CajasCorte Pie
gr 1000 ? number_format($peso_pedido / 1000, 2, ',', '.') . " kg" : number_format($peso_pedido, 2, ',', '.') . " gr" ?> --
-
+
diff --git a/ci4/app/Views/themes/vuexy/pdfs/prototipo.php b/ci4/app/Views/themes/vuexy/pdfs/prototipo.php index 29dd77b7..edcc540d 100755 --- a/ci4/app/Views/themes/vuexy/pdfs/prototipo.php +++ b/ci4/app/Views/themes/vuexy/pdfs/prototipo.php @@ -56,13 +56,13 @@ $settings = $session->get('settings');
;color:;"> - fecha_encuadernado ? week_day_humanize(Time::createFromFormat("Y-m-d H:i:s", $pedido->fecha_encuadernado)->getDayOfWeek() - 1, true) : "" ?> - Comercial: first_name . " " . $cliente->comercial()->last_name ?> + fecha_encuadernado ? week_day_humanize(Time::createFromFormat("Y-m-d H:i:s", $pedido->fecha_encuadernado)->getDayOfWeek() - 1, true) : "" ?> + Comercial: first_name . " " . $cliente->comercial()->last_name ?>
- ;color:;"> + ;color:;"> POD presupuestoLineaImpresion()->isRotativa()): ?> @@ -70,22 +70,19 @@ $settings = $session->get('settings'); GENERAL - -
-
-
- ;">fecha_encuadernado ? Time::createFromFormat("Y-m-d H:i:s", $pedido->fecha_encuadernado)->format('d/m/Y') : "" ?> +
+ ;">fecha_encuadernado ? Time::createFromFormat("Y-m-d H:i:s", $pedido->fecha_encuadernado)->format('d/m/Y') : "" ?>
- +
@@ -107,26 +104,27 @@ $settings = $session->get('settings');
IN
+
-
+
-
;color:;"> - +
;color:;"> +
-
;color:;"> +
;color:;"> papel_impresion()->papel_code_ot ?>
-
"> +
">
-
;color:;"> +
;color:;"> papel_impresion()->papel_code_ot ?>
-
;color:;"> +
;color:;"> tarifa()->code : "" ?>
$acabado): ?> @@ -141,7 +139,7 @@ $settings = $session->get('settings');
">
- ;">id ?> + ;">id ?>
barcode @@ -155,32 +153,30 @@ $settings = $session->get('settings');
- +
- - + + - + - + - + - +
IDSK - - IDSK
CLIENTECLIENTE alias ?>
TITULOTITULO titulo ?>
ISBNISBN isbn ?>
PEDIDO CLIENTEPEDIDO id ?>
@@ -188,12 +184,10 @@ $settings = $session->get('settings');
- imposicion_esquema()): ?> imposicion_esquema()->svg_schema ?> -
@@ -208,19 +202,31 @@ $settings = $session->get('settings');
-
IMP. INTERIOR
+
+
IMP. INTERIOR
+ fecha_impresion): ?> +
fecha_impresion)->format('d/m/Y') ?>
+ +
- +
- - - - - + + + + + + + papel_formato_personalizado): ?> + + + + + - +
ancho ?>xalto ?> tirada/$presupuesto->tirada ?>
papel_formato_ancho ?>xpapel_formato_alto ?> ancho ?>xalto ?> 1 tipo_presupuesto()?->codigo ?? "" ?> lomo_cubierta, 2, ',', '.') ?>
@@ -236,7 +242,7 @@ $settings = $session->get('settings'); - + @@ -255,8 +261,8 @@ $settings = $session->get('settings');
paginas ?> tirada / $presupuesto->tirada ?> 1 tinta() ?> formas)->formas ?> maquina()->nombre ?>
-
-
+
+
Comentarios impresión interior

comment_interior ?> @@ -281,10 +287,10 @@ $settings = $session->get('settings'); tinta() ?> - tirada/$presupuesto->tirada ?> + tirada / $presupuesto->tirada ?> maquina()->nombre ?> marcapaginas ? "SI" : "NO" ?> - horas_maquina * 3600/$presupuesto->tirada) ?> + horas_maquina * 3600 / $presupuesto->tirada) ?> formas)->maquina_ancho ?>xformas)->maquina_alto ?> @@ -294,7 +300,7 @@ $settings = $session->get('settings'); -

+
@@ -308,10 +314,17 @@ $settings = $session->get('settings');
-
ACABADOS/ENCUADERNACIÓN
+
+
ACABADOS/ENCUADERNACIÓN
+ fecha_encuadernado): ?> +
fecha_encuadernado)->format('d/m/Y') ?>
+ +
-
;color:;"> - +
+
;color:;"> + +
$acabado): ?> @@ -324,7 +337,7 @@ $settings = $session->get('settings'); - + @@ -345,14 +358,15 @@ $settings = $session->get('settings'); } } catch (\Throwable $th) { $error_message = $th->getMessage(); - echo "No se ha podido renderizar la tabla de encuadernación"; + // echo view("/themes/vuexy/pdfs/encuadernados/default.php", ["encuadernacion" => $encuadernacion]); + // echo "No se ha podido renderizar la tabla de encuadernación"; // echo "
$error_message"; } } ?> 0): ?> -
+

@@ -366,7 +380,12 @@ $settings = $session->get('settings');

-
LOGISTICA
+
+
LOGISTICA
+ fecha_entrega_real): ?> +
fecha_entrega_real)->format('d/m/Y') ?>
+ +
proveedor() ? $acabado->proveedor()->nombre : "" ?>
info_solapa_guillotina?>info_solapa_guillotina ?> CORTE PIE:
@@ -380,9 +399,8 @@ $settings = $session->get('settings');
-
-
-
- +
+
Comentarios logistica:

comment_logistica ?> diff --git a/httpdocs/assets/js/safekat/pages/pdf/otDownload.js b/httpdocs/assets/js/safekat/pages/pdf/otDownload.js index da577046..08335c94 100644 --- a/httpdocs/assets/js/safekat/pages/pdf/otDownload.js +++ b/httpdocs/assets/js/safekat/pages/pdf/otDownload.js @@ -1,11 +1,12 @@ -$(() => { - var opt = { - margin: 2, - filename: $(".pdf-wrapper").data("id") + ".pdf", - image: { type: 'jpeg', quality: 1 }, - html2canvas: { scale: 4 }, - jsPDF: { unit: 'mm', format: 'a4', orientation: 'portrait' } - }; - let elementToPdf = $('body')[0] - html2pdf().set(opt).from(elementToPdf).save() -}) \ No newline at end of file +// $(() => { +// var opt = { +// margin: 2, +// filename: $(".pdf-wrapper").data("id") + ".pdf", +// image: { type: 'jpeg', quality: 1 }, +// html2canvas: { scale: 4 }, +// jsPDF: { unit: 'mm', format: 'a4', orientation: 'portrait' }, +// pagebreak: { mode: ['avoid-all', 'css', 'legacy'] } +// }; +// let elementToPdf = $('body')[0] +// html2pdf().set(opt).from(elementToPdf).save() +// }) \ No newline at end of file diff --git a/httpdocs/themes/vuexy/css/pdf.ot.css b/httpdocs/themes/vuexy/css/pdf.ot.css index 3058c604..e773c58e 100644 --- a/httpdocs/themes/vuexy/css/pdf.ot.css +++ b/httpdocs/themes/vuexy/css/pdf.ot.css @@ -3,22 +3,23 @@ margin: 0; } @media print { - .page, - { + .page { width: 210mm; height: 297mm; max-width: 210mm; max-height: 297mm; print-color-adjust: exact; } + /* ... the rest of the rules ... */ } -html { +html,body { font-family: Arial, sans-serif; width: 210mm; height: 297mm; max-width: 210mm; - font-size: 8px; + width: 100%; + font-size: 14px; max-height: 297mm; background-color: white; } @@ -26,7 +27,8 @@ html { .page { border: 0px solid; padding: 10px; - margin : 10px; + margin: 10px; + width: 100%; max-width: 210mm; max-height: 297mm; background-color: white; @@ -37,11 +39,11 @@ html { border: 2px solid; } .square { + height : 75px; align-items: center; align-content: center; justify-content: center; font-weight: bold; - font-size: 14px; } .esquema { } @@ -92,6 +94,7 @@ html { } .section-title { font-weight: bold; + font-size: 1.2em; margin-bottom: 4px; } .cubierta { @@ -106,37 +109,39 @@ html { .comments { color: #555; font-style: italic; - font-size : 12px; + font-size: 12px; margin-top: 0.2rem; } .comment-content { width: 100%; - margin-left : 0.2rem; + margin-left: 0.2rem; font-style: normal; - color : black; + color: black; font-size: 10px; } table { width: 100%; margin-bottom: 2px; - font-size: 10px; + font-size: 1.2em; } -th, td { - border: 0.01px solid black; + +th, +td { + border-width : 1px; + border-color : black; } table td { text-align: center; } - table th { font-weight: bold; color: black; text-align: center; } -table td { - font-weight: bold; +.al{ + text-align:left; } .t-header { @@ -149,7 +154,7 @@ table td { padding-left: 0.2rem; } .t-row { - font-size: 8px; + font-size: 14px; width: 100%; } .bicolor { @@ -173,9 +178,7 @@ table td { background: black; color: white; } -.footer { - font-size: 10px; -} + .bg-encuadernacion { background-color: #bbd8a3; } @@ -185,3 +188,9 @@ table td { .cell-50 { width: 50px; } +.ot-code { + font-size: 4em; +} +.code-title { + font-size: 1.5em; +}