Skip to content

Commit

Permalink
Merge pull request #467 from Neriderc/fix-pdf
Browse files Browse the repository at this point in the history
Compress jsPDF files
  • Loading branch information
Neriderc authored Mar 17, 2024
2 parents fc9fa8b + e1a44e7 commit cfb4792
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion resources/javascript/MainPage/Data.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ const Data = {
const dpi = document.getElementById('dpi').value;
const widthInches = width / dpi;
const heightInches = height / dpi;
const doc = new window.jspdf.jsPDF({orientation: orientation, format: [widthInches, heightInches], unit: 'in'});
const doc = new window.jspdf.jsPDF({orientation: orientation, format: [widthInches, heightInches], unit: 'in', compress: true});
doc.addImage(imgData, "PNG", 0, 0, widthInches, heightInches);
// If running test suite, don't actually trigger download of data
// We have generated it so know it works
Expand Down

0 comments on commit cfb4792

Please sign in to comment.