Hi, The current code allocates a maximized buffer to write the JPEG into but never resizes that buffer afterwards hence the PDF is large. The fix is to resize the buffer to the actual size of the compressed JPEG data (see attached patch).
> du -sh Scanned\ Document*.pdf 1.1M Scanned Document-fixed.pdf 26M Scanned Document.pdf ** Patch added: "Resize JPEG buffer in PDF case" https://bugs.launchpad.net/simple-scan/+bug/853648/+attachment/2590068/+files/pdf-size-fix.patch -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/853648 Title: SimpleScan saves PDFs as very large (26.6MiB) files per Page To manage notifications about this bug go to: https://bugs.launchpad.net/simple-scan/+bug/853648/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs