diff --git a/package.json b/package.json index b8f0da1..56745cb 100644 --- a/package.json +++ b/package.json @@ -43,8 +43,8 @@ }, "homepage": "https://github.com/ivmarcos/react-to-pdf#readme", "dependencies": { - "html2canvas": "^1.0.0-alpha.12", - "jspdf": "^1.4.1" + "html2canvas": "1.0.0-alpha.12", + "jspdf": "^2.3.1" }, "devDependencies": { "babel-cli": "^6.26.0", diff --git a/src/ReactToPdf.jsx b/src/ReactToPdf.jsx index d2e23a0..bf8d799 100644 --- a/src/ReactToPdf.jsx +++ b/src/ReactToPdf.jsx @@ -24,7 +24,7 @@ class ReactToPdf extends PureComponent { useCORS: true, scale: this.props.scale }).then(canvas => { - const imgData = canvas.toDataURL('image/jpeg'); + const imgData = canvas.toDataURL(); const pdf = new JsPdf(options); pdf.addImage(imgData, 'JPEG', x, y); pdf.save(filename);