Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > Workshop

Notices

Reply
 
Thread Tools Search this Thread
Old 01-25-2019, 01:46 PM   #1
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,273
Karma: 11087488
Join Date: Jun 2011
Location: California
Device: iPad
Scanning book for night reading

I just wanted to show the utility of k2pdfopt for a recent project. I am reading Asimov’s “A Short History of Chemistry” in paperback, but I’d prefer to read it on my iPad, white text on black background, to minimize the light so I don’t disturb my wife when reading at night. I started by scanning the pages 2-up format at 300 dpi (see first attachment). I then ran two passes of k2pdfopt on this scanned file as shown below. The first k2pdfopt command rotates the PDF and crops out each page from the 2-up format, creating a temp.pdf file used by the second command. The second straightens each page, converts it to a negative image for white on black text, applies some contrast and gamma adjustment, applies an OCR layer (using Tesseract), and fits it to the format of my iPad screen. The result is attached both as the PDF and as a screenshot on my iPad. Several parameters can be adjusted per individual preferences—the dpi of the scan, the contrast adjustment, the gamma adjustment. It’s a compromise between scan time, converted file size (in bytes), and readability on the end device.

N.B. If you'd like to make the text yellow instead of white in order to reduce blue light emission (studies have shown that reducing blue light emission helps you fall asleep easier), you can add this option to the second command: -colorbg ffff00

Command #1
Code:
k2pdfopt -mode crop -rt 90 -cbox- -ibox- -cbox 0.43in,0.23in,3.56in,6.5in -cbox 4.5in,0.27in,3.56in,6.5in asimov_short_hist_of_chem_sample_300dpi_scan.pdf -o temp.pdf
Command #2 (iPad viewable area in ibooks is 1004 x 768)
Code:
k2pdfopt -wrap- -col 1 -fc- -n- -bpc 8 -as -cmax -3 -g 0.3 -neg+ -ocr t -odpi 300 -w 3.3in -h 4.314in temp.pdf -o asimov_short_hist_of_chem_sample_ipad.pdf
Attached Thumbnails
Click image for larger version

Name:	ipad_screenshot.png
Views:	273
Size:	471.6 KB
ID:	169293  
Attached Files
File Type: pdf asimov_short_hist_of_chem_sample_300dpi_scan.pdf (1.34 MB, 282 views)
File Type: pdf asimov_short_hist_of_chem_sample_ipad.pdf (1.33 MB, 266 views)

Last edited by willus; 01-25-2019 at 05:00 PM. Reason: Added OCR to converted file using Tesseract; and yellow text option
willus is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
AMOLED and reading at night rjbouw Android Devices 15 12-05-2016 03:46 AM
Night time reading borisb Kobo Tablets 5 10-29-2011 04:39 PM
What are you reading on Halloween night? Williamlk Lounge 12 07-21-2011 04:47 AM
Book Scanning Lordblacknail Workshop 1 10-13-2010 06:04 PM
Gen3 Scanning with Acrobat 9 and reading on Cybook Gen3 krapo Bookeen 0 06-11-2010 01:55 PM


All times are GMT -4. The time now is 07:25 AM.


MobileRead.com is a privately owned, operated and funded community.