Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Luciano Barletta
/
Pruebas-RTO
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit 22e0b3fc
authored
2024-07-15 17:27:25 -0300
by
Juan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Se agrega cabecera y alineador
1 parent
0aee3ff8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
7 deletions
static/src/pdf2.js
static/src/pdf2.js
View file @
22e0b3f
...
...
@@ -65,29 +65,34 @@ class PDF2 {
}
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
()
//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("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)
//
]);
]);
//
return pointer.addxy(0, 3);
return
pointer
.
addxy
(
0
,
3
);
return
pointer
}
alineadorToPDF
(
pointer
,
data
)
{
console
.
log
(
data
)
const
alineador
=
this
.
A4
.
addRelativeChild
(
new
Div
(
pointer
,
new
Vector
(
Pos
.
end
,
5
)));
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
);
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment