reduce file size for savetoPDF

This commit is contained in:
Jeff-Emmett 2025-02-08 19:09:20 +01:00
parent d4bd27dd6a
commit 795c44c6c0
1 changed files with 3 additions and 1 deletions

View File

@ -41,7 +41,7 @@ export const saveToPdf = async (editor: Editor) => {
reader.readAsDataURL(blob)
})
// Add the image to the PDF
// Add the image to the PDF with compression
pdf.addImage(
imageData,
"PNG",
@ -49,6 +49,8 @@ export const saveToPdf = async (editor: Editor) => {
0,
selectionBounds.width,
selectionBounds.height,
undefined,
'FAST'
)
pdf.save("canvas-selection.pdf")