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

Initial commit

parent b9274489
...@@ -3,8 +3,8 @@ import queryString from 'query-string'; ...@@ -3,8 +3,8 @@ import queryString from 'query-string';
import axios from 'axios'; import axios from 'axios';
import { Button } from 'reactstrap'; import { Button } from 'reactstrap';
import ReactLoading from 'react-loading'; import ReactLoading from 'react-loading';
// import * as html2canvas from 'html2canvas'; import * as html2canvas from 'html2canvas';
// import * as jsPDF from 'jspdf'; import * as jsPDF from 'jspdf';
import './DocumentManagement.css'; import './DocumentManagement.css';
class PreviewDocument extends Component { class PreviewDocument extends Component {
...@@ -116,13 +116,13 @@ class PreviewDocument extends Component { ...@@ -116,13 +116,13 @@ class PreviewDocument extends Component {
handleDownloadPDF = () => { handleDownloadPDF = () => {
const input = document.getElementById('printDocument'); const input = document.getElementById('printDocument');
let title = this.state.subject; let title = this.state.subject;
// html2canvas(input) html2canvas(input)
// .then((canvas) => { .then((canvas) => {
// let imageData = canvas.toDataURL('image/png'); let imageData = canvas.toDataURL('image/png');
// let pdf = new jsPDF(); let pdf = new jsPDF();
// pdf.addImage(imageData, 'JPEG', 0, 0); pdf.addImage(imageData, 'JPEG', 0, 0);
// pdf.save(title + ".pdf"); pdf.save(title + ".pdf");
// }); });
} }
showApproval = (approval) => { showApproval = (approval) => {
let approvalDocument; let approvalDocument;
......
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