Commit 812ee624 by Juan

Se cambia el logo de maha y se arranca los cambios de reporte

1 parent 30737815
...@@ -7,6 +7,7 @@ Horacio ...@@ -7,6 +7,7 @@ Horacio
Hoja a4 apaisada Hoja a4 apaisada
Sacar linea 2 Sacar linea 2
app.run("0.0.0.0", port=11000)
# Generación de PDF # Generación de PDF
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
"bolattif":{"nombreyapellido":"Federico Bolatti","matricula":""}, "bolattif":{"nombreyapellido":"Federico Bolatti","matricula":""},
"granadaf":{"nombreyapellido":"Granada Fernando","matricula":""}, "granadaf":{"nombreyapellido":"Granada Fernando","matricula":""},
"ortizr":{"nombreyapellido":"Ortiz","matricula":""}, "ortizr":{"nombreyapellido":"Ortiz","matricula":""},
"martinezh":{"nombreyapellido":"Oracio Martinez","matricula":""}, "martinezh":{"nombreyapellido":"Horacio Martinez","matricula":""},
"marin247":{"nombreyapellido":"Nestor Marin","matricula":""}, "marin247":{"nombreyapellido":"Nestor Marin","matricula":""},
"rojasja":{"nombreyapellido":"Jose Rojas","matricula":""}, "rojasja":{"nombreyapellido":"Jose Rojas","matricula":""},
"boveria":{"nombreyapellido":"Adrian Boveri","matricula":""} "boveria":{"nombreyapellido":"Adrian Boveri","matricula":""}
......
This diff could not be displayed because it is too large.
...@@ -6,7 +6,8 @@ class PDF1 { ...@@ -6,7 +6,8 @@ class PDF1 {
/** Coordinate container that occupies the whole page **/ /** Coordinate container that occupies the whole page **/
this.A4 = new Div( this.A4 = new Div(
new Vector(0, 0), new Vector(0, 0),
new Vector(595, 842) /*invierto por apaisada*/
new Vector(842,595)
); );
this.containerSize = 86; this.containerSize = 86;
...@@ -92,23 +93,24 @@ class PDF1 { ...@@ -92,23 +93,24 @@ class PDF1 {
maha.addRelativeChildren([ maha.addRelativeChildren([
this.line(), //this.line(),
/**
new Text( new Text(
["MAHA","EUROSYSTEM","Bitte hier Ihre","Anschrift eintragen"], ["MAHA","EUROSYSTEM","Bitte hier Ihre","Anschrift eintragen"],
new Vector(Pos.middle, Pos.quarter), new Vector(Pos.middle, Pos.quarter),
this.body, this.body,
"center" "center"
), ),
*/
new Text( new Text(
["EUROSYSTEM","V 3.18.009",data['fecha']], ["EUROSYSTEM","V 7.20.029"],
new Vector(Pos.end_margin - 7, Pos.third + 5), new Vector(Pos.end_margin - 8, Pos.third + 4),
this.body, this.body,
"right" "right"
), ),
new Image( new Image(
//Logo de MaHA
document.getElementById("maha"), document.getElementById("maha"),
new Vector(Pos.end - 12, Pos.beg_margin), new Vector(Pos.end - 12, Pos.beg_margin),
new Vector(10, Pos.end_margin - 5) new Vector(10, Pos.end_margin - 5)
...@@ -130,18 +132,19 @@ class PDF1 { ...@@ -130,18 +132,19 @@ class PDF1 {
header.addRelativeChildren([ header.addRelativeChildren([
this.line(), //this.line(),
new Text( new Text(
[ [
`\t\t\t\t Auto`,
"Nombre/Empresa:", "Nombre/Empresa:",
"Calle:", "Calle:",
"CP:Ciudad:", "C.P.Ciudad:",
//"Teléfono:", "Teléfono:",
`Fecha de Prueba:\t${data['fecha']}`, `Fecha de Prueba:\t${data['fecha']}`,
`Hora de Prueba:\t${data['hora']}`, `Hora de Prueba:\t${data['hora']}`,
`Ingeniero:\t${data['ingeniero']}`, `Ingeniero:\t${data['ingeniero']}`,
"Estado de Carga:\tVacio" "Estado de Carga:"
], ],
new Vector(Pos.beg_margin + 5, Pos.beg_margin + 10), new Vector(Pos.beg_margin + 5, Pos.beg_margin + 10),
...@@ -150,15 +153,16 @@ class PDF1 { ...@@ -150,15 +153,16 @@ class PDF1 {
new Text( new Text(
[ [
`\t\t\t Auto`,
`Matrícula:\t${data['patente']}`, `Matrícula:\t${data['patente']}`,
"Kilometraje:", "Kilometraje:",
"Matriculación:", "Matriculación:\t/ /",
"Fabricante:", "Fabricante:",
"Tipo de Vehic.:", "Tipo de Vehic.:",
"Nº motor:", "Nº chasis:",
"Cantidad de Ejes:\t0" "Cantidad de Ejes:\t2" /*capas aca hay q poner variable */
], ],
new Vector(Pos.two_thirds, Pos.beg_margin + 10), new Vector(Pos.two_thirds - 15 , Pos.beg_margin + 10), /*Agregar un corrector para achicar*/
body_black body_black
) )
]); ]);
...@@ -168,11 +172,11 @@ class PDF1 { ...@@ -168,11 +172,11 @@ class PDF1 {
alineadorToPDF(pointer, data) { alineadorToPDF(pointer, data) {
const alineador = this.A4.addRelativeChild(new Div(pointer, new Vector(Pos.end, 6))); const alineador = this.A4.addRelativeChild(new Div(pointer, new Vector(Pos.end, 25)));
alineador.addRelativeChildren([ alineador.addRelativeChildren([
this.line(), //this.line(),
new Text( new Text(
"Alineador al Paso", "Alineador al Paso",
...@@ -202,7 +206,7 @@ class PDF1 { ...@@ -202,7 +206,7 @@ class PDF1 {
suspension.addRelativeChildren([ suspension.addRelativeChildren([
this.line(), //this.line(),
new Text( new Text(
"Bco. de Suspensiones", "Bco. de Suspensiones",
...@@ -479,7 +483,7 @@ class PDF1 { ...@@ -479,7 +483,7 @@ class PDF1 {
footer.addRelativeChildren([ footer.addRelativeChildren([
this.line(), //this.line(),
new Text( new Text(
"Inspector:", "Inspector:",
......
...@@ -100,14 +100,14 @@ ...@@ -100,14 +100,14 @@
"window.open( "window.open(
compile( compile(
(new PDF1()).pdf( collectToConvert() ), (new PDF1()).pdf( collectToConvert() ),
new jsPDF('portrait', 'pt', 'a4') new jsPDF('landscape', 'pt', 'a4')
) )
.output('bloburl') .output('bloburl')
)"; )";
> >
Linea 1 Linea 1
</button> </button>
<!--
<button class="PDFButton" onclick= <button class="PDFButton" onclick=
"window.open( "window.open(
compile( compile(
...@@ -119,7 +119,8 @@ ...@@ -119,7 +119,8 @@
> >
Linea 2 Linea 2
</button> </button>
<img id="maha" src="{{ url_for('static', filename = 'assets/maha.png') }}" style="display: none;"> -->
<img id="maha" src="{{ url_for('static', filename = 'assets/maha2.png') }}" style="display: none;">
</div> </div>
<div class="PDFButtonContainerFixed" style="bottom: 40%;"> <div class="PDFButtonContainerFixed" style="bottom: 40%;">
<button class="PDFButton" style="bottom: 40%; display: {% if bypass %} none {% else %} block {% endif %};" <button class="PDFButton" style="bottom: 40%; display: {% if bypass %} none {% else %} block {% endif %};"
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!