2

This is a question which keeps coming back to me and hitherto has remained unanswered. Having once again spent too much time googling for a solution in vain, can anyone help?

Goal

I'm looking for a quick and efficient way to change the text font color on multiple PDF pages.

Motivation

Why? Because I'd like to print a pdf (with light colored fonts) on a black-and-white printer.

Attempts so far

Two things I tried so far (which haven't yet worked **):

  1. I tried a bit of gs command line fu, which gave a bw or grayscale result of the entire pdf, albeit at the expense of making all text becoming rasterized (losing vectorization): no good.

  2. I tried two different tools which work, - but neither of which seem to offer the option of changing font color for text on multiple pages at once, but rather one-page-at-a-time (see here and here).

Not yet attempted

As I haven't yet exhausted all options within these tools, I can still imagine solutions coming from both gs and/or the pdfedit command line. Just need to dig deeper and/or get creative I guess.

Alternatively, there are some tools (beyond pdfedit) which allow for perusal of a PDF's internal structure. I can imagine one of these tools also allowing for a search-and-replace of the fonts' color-coding...

  • 1
    I am not an expert, but have you tried cupsfilter? My googling is also very bad for these topics, but I guess that you can find some pre-ready ppd file that will print in Black and White. The idea is to print a new PDF black and white. – dadexix86 May 29 '16 at 09:01
  • @dadexix86 Nope, haven't tried it but happy to (as a workable workaround). In case you already know: would cupsfilter convert (or filter) to grayscale, or directly to black (which is what I'd want)? – nutty about natty May 29 '16 at 09:27
  • As far as I understood, if you use the right ppd file, it will do it. Unfortunately, I am not able to find more info on this, probably it is written somewhere on some mailing list, but this is as far as my googling skills go :( – dadexix86 May 29 '16 at 09:32
  • interesting cups feature: http://127.0.0.1:631/ (...) and from within: http://127.0.0.1:631/help/spec-ipp.html?QUERY=black#blackplot – nutty about natty May 29 '16 at 09:51
  • ... but ultimately probably obsolete :-( – nutty about natty May 29 '16 at 09:57
  • There, they suggest to write a ppd file as I said before. Here there are instructions to create a ppd from a drv, and in /usr/share/cups/examples/ there are examples of drv files... Maybe adapting one of them might be the solution. – dadexix86 May 29 '16 at 10:19

2 Answers2

2

I will try to help you. My answer is a bit long, but once you have followed all of the steps you won't have to follow them again. This is not a command line answer, but it is automatic.

Step One

Press CTRL + ALT + T to get to your Terminal.

Step Two Type this into the Terminal:

sudo add-apt-repository "deb http://archive.canonical.com/ precise partner"

Step Three

sudo apt-get update

Step Four

sudo apt-get install acroread

Step Five

After properly installed Adobe Reader, don’t forget to remove the Canonical Partners repository for Precise:

sudo add-apt-repository -r "deb http://archive.canonical.com/ precise partner"

sudo apt-get update

Step Six

Now what you want to do is set it up so that Adobe is your default pdf reader. To do this, type this in the Terminal:

sudo gedit /etc/gnome/defaults.list

Now, find this line:

application/pdf=evince.desktop

And change it to this:

application/pdf=acroread.desktop

After this is accomplished, add these lines below the first one:

application/fdf=acroread.desktop

application/xdp=acroread.desktop

application/xfdf=acroread.desktop

application/pdx=acroread.desktop

Now save the file and restart nautilus. https://www.youtube.com/watch?v=IO6KTVsZQkg

Now that you have adobe on your computer, follow these instructions.

Step One: go to Adobe. There is a menu bar on the top. Click Edit, then Scroll all the way down to Preferences.

Step Two: Click on the Accessibility tab. You should she these menus: Changing_Settings

Step Three: Click on Replace Document Colors. You should see a color next to Document Text. Click on the color. Unfortunately I cannot show you a screenshot of this, but it's just a color palette. I will continue to give you step by step instructions but if you want, you can check out this Youtube video where you will be able to see everything:https://www.youtube.com/watch?v=IO6KTVsZQkg. It's only about four minutes long.

Step Four: Click on the color of your choice. Currently not all colors are displayed. If you don't see one you like, click on the Other Color tab below all the colors. Once your done with settings, click ok. All of your pdf files will automatically be changed to the color preferences you have picked. I hope this helps.

BJsgoodlife
  • 1,160
  • 5
  • 31
  • 59
  • Interesting solution! Would the color change be reflected when printed, or just on the screen? – Nick Weinberg Jun 05 '16 at 03:13
  • From some of the comments on the youtube video I showed you they say things like "I ran out of ink" so yes I think it is but so far I have not been able to see how they did it. My best guess from the research I have been doing is it on the printer side but I don't know how to fix it yet. – BJsgoodlife Jun 05 '16 at 06:27
  • thanks @BJsgoodlife this might serve the purpose; a solution I'd prefer would, however, actually modify the pdf -- not just the way it is displayed in proprietory software... – nutty about natty Jun 05 '16 at 07:40
  • @nuttyaboutnatty If the color changes are indeed reflected when printed, you could just print to a new PDF file using CUPS-PDF (instead of an actual printer) – Nick Weinberg Jun 05 '16 at 10:02
  • @nuttyaboutnatty-yes the color changes are reflected in the printer menu. I am having trouble learning about how to do this so that I can help him. From what I gather cups-pdf is done virtually. – BJsgoodlife Jun 05 '16 at 13:36
1

This tool changes colors in multi-page PDFs:

https://supertool.org/automatically-add-color-to-pdfs-to-print-without-black-ink/

A similar tool has more options for converting to black and white, which may be more precisely what you want:

https://supertool.org/convert-color-pdfs-to-black-and-white/

The Pure B&W button results in solid blacks, solid whites, and nothing in between. This would likely make light-colored fonts into solid black (adjusting the threshold slider will prevent those light-colored fonts from turning white!).

dca
  • 11