I have an heavy scanned pdf with OCR. I was able to reduce its size by half with ghostscript win64, with this command (as recommended in this answer):
gswin64 -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf
But still it's not light enough.
I could also convert the pdf with Calibre or pdftotext from xpdf but I am loosing the layout.
Is there a way to extract the OCR keeping the exact position of each text on each page while removing the scanned image?