eclec-tech

This off topic area is a place where, while you are visiting the Crispin Colloquy, you can talk about beer, whiskey, kilts, the latest WWII re-enactment, BBQ, grandsons, shoes in the media, and even the odd meandering essay on "why we make shoes."
Message
Author
User avatar
dw
Seanchaidh
Posts: 5830
Joined: Wed Jan 01, 1997 10:00 am
Full Name: DWFII
Location: Redmond, OR
Has Liked: 204 times
Been Liked: 122 times
Contact:

Re: eclec-tech

#26 Post by dw »

Sent from my Samsung Galaxy S6...
it appears this forum isn't so Smartphone unfriendly after all. :lurk:
DWFII--HCC Member
Instagram
Without "good" there is no "better," without "better," no "best."
And without the recognition that there is a hierarchy of excellence in all things, nothing rises above the level of mundane.
carsten
3
3
Posts: 146
Joined: Wed Nov 06, 2019 2:24 am
Full Name: Carsten Metz
Has Liked: 4 times
Been Liked: 47 times

Re: eclec-tech

#27 Post by carsten »

Maybe somebody might find this useful:

If you find old shoe making books on the internet, often they have a yellow background and are hard to read when printed in black and white.

see e.g.: https://openlibrary.org/search?mode=eve ... ure&page=1

where you for example can find a book from golding, which might be too yellow to print on paper: https://archive.org/details/manufactureofboo00goldrich

Should you have a linux machine available you can easily fix this by using imagemagick and a textcleaner script provided by Fred Weinhaus.

see http://www.fmwconcepts.com/imagemagick/ ... /index.php

To convert full pdf books I added some stuff around it, which first extracts each page to a JPG image, cleans it and re-assembles everything back to a pdf. (Splitting and assembling is somewhat easier using Adobe Acrobat DC - but not everybody has it)

Here is the script (takes quite long to run though) and result for linux bash command line. To use it, download the textcleaner from Fred (link above) Throw the following code in a shell file e.g. "conv.sh", make it executable and run it as ./conv.sh filenameyouwanttoclean (without ".pdf")

Of course it does also work on non shoe making books :rofl:

------------------------------------------------------------------------------------
strings < $1.pdf | sed -n 's|.*/Count -\{0,1\}\([0-9]\{1,\}\).*|\1|p'| sort -rn | head -n 1 > pages.txt
pages=$(cat pages.txt)

echo $pages

for ((i=1; i<=$pages; i++))
do
echo $i 'of ' $pages 'done '
convert -density 300 -trim $1.pdf[$i] -quality 100 $1-$i.jpg
./textcleaner -g -e stretch -f 15 -o 5 -s 1 $1-$i.jpg final-$i.jpg
done
convert -monitor `ls -1v final*` file.pdf
----------------------------------------------------------------------------


Here is one treated page as a sample: (Before and after)
manufactureofboo00goldrich_Page_024.jpg
final-024.jpg
You do not have the required permissions to view the files attached to this post.
Post Reply