Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
e-epal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Σταύρος Παπαδάκης
e-epal
Commits
f0a03075
Commit
f0a03075
authored
May 12, 2017
by
Open Source Developer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trans
parent
1f38530f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
26 deletions
+15
-26
source/components/student-application-form/submited.aplication.preview.ts
...s/student-application-form/submited.aplication.preview.ts
+15
-26
No files found.
source/components/student-application-form/submited.aplication.preview.ts
View file @
f0a03075
...
...
@@ -183,45 +183,34 @@ import * as html2canvas from "html2canvas"
}
createPdf
()
createPdf
1
()
{
console
.
log
(
"
lalalalalala
"
);
html2canvas
(
document
.
getElementById
(
"
target
"
)).
then
(
function
(
canvas
)
{
var
img
=
canvas
.
toDataURL
();
var
doc
=
new
jsPDF
(
'
p
'
,
'
mm
'
);
var
doc
=
new
jsPDF
();
doc
.
onload
=
function
(){
console
.
log
(
img
,
doc
,
"
lalalalalala
"
);
doc
.
addImage
(
img
,
'
PNG
'
,
10
,
10
);
doc
.
addImage
(
img
,
'
PNG
'
,
0
,
0
,
210
,
297
);
doc
.
save
(
'
applications.pdf
'
);
}
});
}
createPdf1
()
createPdf
()
{
var
srcpath
;
var
imgageData
=
new
Image
();
imgageData
.
id
=
"
pic
"
;
var
doc
=
new
jsPDF
({
unit
:
'
px
'
,
format
:
'
a4
'
});
console
.
log
(
"
lalalalalala
"
);
html2canvas
(
document
.
getElementById
(
"
target
"
)),
{
onrendered
:
function
(
canvas
)
{
srcpath
=
canvas
.
toDataURL
(
"
image/png
"
);
imgageData
.
src
=
srcpath
;
doc
.
addImage
(
imgageData
,
'
PNG
'
,
20
,
20
,
400
,
150
);
var
doc
=
new
jsPDF
();
doc
.
text
(
20
,
20
,
'
Hello world!
'
);
doc
.
text
(
20
,
30
,
'
This is client-side Javascript, pumping out a PDF.
'
);
doc
.
addPage
();
doc
.
text
(
20
,
20
,
'
Do you like that?
'
);
// Save the PDF
doc
.
save
(
'
Test.pdf
'
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
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 comment