Commit 22e0b3fc by Juan

Se agrega cabecera y alineador

1 parent 0aee3ff8
...@@ -65,29 +65,34 @@ class PDF2 { ...@@ -65,29 +65,34 @@ class PDF2 {
} }
headerToPDF(pointer, data) { headerToPDF(pointer, data) {
//const header = this.A4.addRelativeChild(new Div(pointer, new Vector(Pos.end, 5))); const header = this.A4.addRelativeChild(new Div(pointer, new Vector(Pos.end, 5)));
this.Dominio = data['patente'].toUpperCase() this.Dominio = data['patente'].toUpperCase()
//header.addRelativeChildren([ header.addRelativeChildren([
new Text("INTERFOR SRL " , new Vector(Pos.beg_margin + 2 , Pos.third), this.font),
new Text("Patente: " + data['patente'] + " Fecha " + data['fecha'] + " " + data['hora'] , new Vector(Pos.beg_margin + 2, Pos.third + 30), this.font),
// new Text("Dominio: " + data['patente'], new Vector(Pos.beg_margin , Pos.third), this.font), // new Text("Dominio: " + data['patente'], new Vector(Pos.beg_margin , Pos.third), this.font),
// new Text("Ingeniero: " + data['ingeniero'], new Vector(Pos.quarter + 4, Pos.third), this.font), // new Text("Ingeniero: " + data['ingeniero'], new Vector(Pos.quarter + 4, Pos.third), this.font),
// new Text("Fecha y hora " + data['fecha'] + " " + data['hora'], new Vector(Pos.third + 30, Pos.third), this.font) // new Text("Fecha y hora " + data['fecha'] + " " + data['hora'], new Vector(Pos.third + 30, Pos.third), this.font)
//]); ]);
//return pointer.addxy(0, 3); return pointer.addxy(0, 3);
return pointer return pointer
} }
alineadorToPDF(pointer, data) { alineadorToPDF(pointer, data) {
console.log(data)
const alineador = this.A4.addRelativeChild(new Div(pointer, new Vector(Pos.end, 5))); const alineador = this.A4.addRelativeChild(new Div(pointer, new Vector(Pos.end, 5)));
alineador.addRelativeChildren([ alineador.addRelativeChildren([
new Text(`${this.Dominio} - Resultado Pruebas en Banco de Alineador al Paso`, new Vector(Pos.beg_margin + 2, Pos.third), this.font), new Text(`Resultado Pruebas en Alineador al Paso`, new Vector(Pos.beg_margin + 2, Pos.third), this.font),
new Text("Eje Delantero", new Vector(Pos.beg_margin + 5, Pos.two_thirds), this.font), new Text(" 1 Convergente - " + data['eje_delantero'] + " m/km", new Vector(Pos.beg_margin + 5, Pos.two_thirds), this.font),
new Text(" 2 Alineado - " + "0" + " m/km", new Vector(Pos.beg_margin + 5, Pos.two_thirds + 30), this.font),
new Text(`Convergente - ${data['eje_delantero']} m/km`, new Vector(Pos.middle - 16, Pos.two_thirds), this.font) //new Text(`Convergente - ${data['eje_delantero']} m/km`, new Vector(Pos.middle - 16, Pos.two_thirds), this.font)
]); ]);
return pointer.addxy(0, 5); return pointer.addxy(0, 5);
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!