View Single Post
Old 05-17-2023, 12:50 AM   #12
willus
Fuzzball, the purple cat
willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.
 
willus's Avatar
 
Posts: 1,303
Karma: 11087488
Join Date: Jun 2011
Location: California
Device: iPad
I found these settings worked pretty well:

Code:
k2pdfopt -p 50-52 -mode copy -c- -m .25,.42,.25,1 -t -om 0.25 -as -ocr t input.pdf -o output.pdf
The -p 50-52 just tries it out on pages 50-52 as a trial since the book is very long (you can remove this once you want to try it on the whole book).
The -mode copy defaults to copying the source page size
The -m arguments ignore the left 0.25 inches, the top 0.42 inches, the right 0.25 inches, and the bottom 1 inch of each source page
The -t trims to the text
The -om adds a small blank border to the output edges (0.25 in)
The -as auto-straightens (de-skews) each page
The -ocr t uses Tesseract OCR
willus is offline   Reply With Quote