LeoFCardoso / pdf2pdfocr

A free tool to OCR a PDF and add a text "layer" in the original file, making a searchable PDF. Use only open source tools. Please tip!
Apache License 2.0
266 stars 33 forks source link

Do we have any parameter / flag for pdf compression here, to reduce pdf size after applying OCR? #48

Closed yatrik-cloud closed 7 months ago

LeoFCardoso commented 10 months ago

Hello @yatrik-cloud. There's no such flag for PDF compression. But you can emulate it using image processing ("-f") and some image reduction strategy. First, please use "-f" and "-r 200" to reduce image resolution and this should reduce size. Also, try to play with "-g" parameters.

yatrik-cloud commented 10 months ago

"-f" is changing pdf image color, a gray scale image to black/white binary image

LeoFCardoso commented 10 months ago

Yes, this is expected. That’s why you should use “-f” combined with some “-g” option.

LeoFCardoso commented 7 months ago

Old issue, marking as done due to lack of response.