Skip to content

Commit

Permalink
Merge pull request #51 from ivmarcos/feature/upgrade-deps
Browse files Browse the repository at this point in the history
feat: upgrade jspdf
  • Loading branch information
ivmarcos authored May 18, 2021
2 parents 2a38ed5 + 9814741 commit 28bb197
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/ReactToPdf.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 28bb197

Please sign in to comment.