Flutter PDF compression increases file size instead of reducing it [closed]

1 week ago 11
ARTICLE AD BOX

I am trying to compress PDF files in a Flutter app, but every time the output file becomes larger than the original PDF instead of smaller.

I have already tried multiple packages:

simple_pdf_compression

pdf_compressor_pro

pdf_compressor

syncfusion_flutter_pdf

pdfx

But in all cases the compressed file size is bigger than the original file.

Original PDF size: 36 MB
Compressed PDF size: 41 MB
or sometimes even larger.

My goal is to reduce the PDF size, not increase it.

What I want

I want to compress a PDF in Flutter so that the output file size becomes smaller than the original file.

Questions

Why does PDF compression sometimes increase the file size?

Is there any reliable way to compress PDFs in Flutter?

Do I need to use a native solution like Ghostscript or FFmpeg instead of Flutter packages?

Read Entire Article