ElectricRCAircraftGuy / PDF2SearchablePDF

`pdf2searchablepdf input.pdf` = voila! "input_searchable.pdf" is created & now has searchable text!
MIT License
127 stars 14 forks source link

Add -c compression option #11

Open ElectricRCAircraftGuy opened 3 years ago

ElectricRCAircraftGuy commented 3 years ago
pdf2searchablepdf -c file.pdf

Shall produce file_searchable-comp1.pdf.

Make it a wrapper around this: https://askubuntu.com/a/243753/327339.

See if you can specify multiple resolutions or do multiple passes for further compression.

Allow -c1 (same as -c), -c2 for more compression, and -c3 for most compression.

Update my readme to explain how to manually do this compression after-the-fact too!

And update help menu with these new options.


pdf2searchablepdf -c1 file.pdf # low compression only
pdf2searchablepdf -c2 file.pdf # medium compression only
pdf2searchablepdf -c3 file.pdf # high compression only

Default is to output them all?

file_searchable_1.pdf # low compression 
file_searchable_2.pdf # medium compression 
file_searchable_3.pdf # high compression 

Use Ghostscript after-the-fact, to do compression only, on an already-processed PDF. See my ans: https://askubuntu.com/questions/113544/how-can-i-reduce-the-file-size-of-a-scanned-pdf-file/1303196#1303196

pdf2searchablepdf --compress-only=low    file_searchable_1.pdf
pdf2searchablepdf --compress-only=medium file_searchable_1.pdf
pdf2searchablepdf --compress-only=high   file_searchable_1.pdf
ElectricRCAircraftGuy commented 3 years ago

nah...use small, medium, large instead of low, medium, high.

maybe --size=small, etc.

ElectricRCAircraftGuy commented 3 years ago

See also my answer here: https://askubuntu.com/questions/113544/how-can-i-reduce-the-file-size-of-a-scanned-pdf-file/1303196#1303196

ElectricRCAircraftGuy commented 2 years ago

TODO: The commit below partially fulfills this ticket.

Also: