View Single Post
Old 05-28-2010, 05:43 AM   #8
eksor
Connoisseur
eksor ought to be getting tired of karma fortunes by now.eksor ought to be getting tired of karma fortunes by now.eksor ought to be getting tired of karma fortunes by now.eksor ought to be getting tired of karma fortunes by now.eksor ought to be getting tired of karma fortunes by now.eksor ought to be getting tired of karma fortunes by now.eksor ought to be getting tired of karma fortunes by now.eksor ought to be getting tired of karma fortunes by now.eksor ought to be getting tired of karma fortunes by now.eksor ought to be getting tired of karma fortunes by now.eksor ought to be getting tired of karma fortunes by now.
 
eksor's Avatar
 
Posts: 94
Karma: 999884
Join Date: Jun 2009
Device: prs700, i-mate JAMin, smartq v7, GeeksPhone Zero, iPad 3rd Gen
Quote:
Originally Posted by Mike_73 View Post
Having a comparison would be awesome. I would appreciate your input.

Still, it sounds tedious!?!?
I'm glad to be useful.

Yes, it is tedious.

Lets begun with a pdf, Sample.pdf, in a Linux environment and finally I'd managed to do the whole thing without scantailor

Obtain individual pages with pdftk:

pdftk Sample.pdf burst

This outputs in the same directory pg_0001.pdf pg_0002.pdf and so on, in this case ends with the third page

Adjust individually the contrast and perform some filtering:

for a in $(seq -w 1 3); do convert -contrast -enhance pg_000$a.pdf eq_pg_000$a.pdf;done

(replace 3 with the last page, caution is needed with the number of zeroes, if more than 9 pages, and less than 100, then use pg_00$a.pdf instead as input and eq_pg_00$a.pdf as output and so on, the -w in seq means ad zeroes to the left)

after this we have eq_pg_0001.pdf eq_pg_0002.pdf eq_pg_0003.pdf in the working directory.

Now we want to build a new pdf with the processed pages:

pdftk eq*.pdf cat output eqSample.pdf

and that's all. Convert is a cross platform tool http://www.imagemagick.org/script/index.php. I don't know how to make scripts in MSDOS. I could try good old Digital DCL in VMS :-))

Hope this helps, regards.
Attached Files
File Type: pdf eqSample.pdf (307.6 KB, 386 views)
File Type: pdf Sample.pdf (245.8 KB, 333 views)
eksor is offline   Reply With Quote