Commit f21281e7 authored by Internship UKSW 2019's avatar Internship UKSW 2019

Initial commit

parent 1f492648
......@@ -115,13 +115,13 @@ class PreviewDocument extends Component {
}
handleDownloadPDF = () => {
const input = document.getElementById('printDocument');
let subject = this.state.subject;
let title = this.state.subject;
html2canvas(input)
.then((canvas) => {
let imageData = canvas.toDataURL('image/png');
let pdf = new jsPDF();
pdf.addImage(imageData, 'JPEG', 0, 0);
pdf.save(subject + ".pdf");
pdf.save(title + ".pdf");
});
}
showApproval = (approval) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment