Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > PDF

Notices

Reply
 
Thread Tools Search this Thread
Old 10-24-2025, 11:13 AM   #1
JawadLeLogeur
Zealot
JawadLeLogeur is a jewel in the roughJawadLeLogeur is a jewel in the roughJawadLeLogeur is a jewel in the roughJawadLeLogeur is a jewel in the roughJawadLeLogeur is a jewel in the roughJawadLeLogeur is a jewel in the roughJawadLeLogeur is a jewel in the roughJawadLeLogeur is a jewel in the roughJawadLeLogeur is a jewel in the roughJawadLeLogeur is a jewel in the roughJawadLeLogeur is a jewel in the rough
 
Posts: 108
Karma: 7156
Join Date: Jun 2017
Location: Western Sahara
Device: Kobo Forma 4.15.12920
Dealing with white text on colored background when prepping PDFs for grayscale or B&W

This is mostly so that I can print a bunch of docs on my grayscale printer without using too much toner.

I've already found a number of solutions to convert a color PDF into pure B&W (as opposed to grayscale) which is ideal when the file only contains dark text on light background.

I'm running into issues when dealing with PDFs that feature BOTH color/000000 text on light/FFFFFF background and light/FFFFFF text on color/000000 background. The threshold function preserves the former as 000000 on FFFFFF but turns the latter into FFFFFF on 000000 which wastes a ton of toner. If I set the threshold too low, the text simply disappears. I can tweak grayscale of course, but it still leaves a ton of background grey that is not necessary. I will have to deal with close to a thousand pages so this is significant.

I'm looking for a method that can turn both portions that are light/FFFFFF text on color/000000 background and those that are color/000000 text on light/FFFFFF background into dark grey/000000 text on FFFFFF background.

It's okay if the end result looks nasty as long as the information on the page is legible. I can do conversions manually but if there is a way to batch these that would be awesome as well.
JawadLeLogeur is offline   Reply With Quote
Old 10-24-2025, 03:51 PM   #2
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 14,954
Karma: 110908135
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
k2pdfopt https://www.mobileread.com/forums/sh...d.php?t=144711

Imagemagick

also recent versions of the GIMP can import PDF pages -> layers and export layers -> pages
Quoth is offline   Reply With Quote
Old 10-26-2025, 11:06 AM   #3
rkomar
Wizard
rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.
 
Posts: 3,065
Karma: 18821071
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
This is a tough but interesting problem. After some googling, I came upon a python implementation of the algorithm produced by Grundland and Dodgson (https://github.com/damondpham/decolorize-RGB2grayscale). I haven't tried it, but it looks promising. It probably doesn't do anything about saving toner, so maybe you can make simple adjustments first before converting the image with this algorithm. Good luck!
rkomar is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
White text On Black Background moofychops Amazon Kindle 7 02-17-2018 05:39 PM
White vs. black background for text levander Amazon Kindle 21 01-15-2013 02:46 PM
White text on white background in dialog boxes Kikker123 Kobo Tablets 1 12-24-2011 06:20 PM
non white background for scanned PDFs? jian1 Onyx Boox 0 08-08-2011 01:16 AM
White Text on Black Background robogeek Which one should I buy? 6 07-20-2010 07:37 PM


All times are GMT -4. The time now is 02:21 AM.


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