Python Forum
How can I change with Python the underline colour in a PDF? [SOLVED]
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How can I change with Python the underline colour in a PDF? [SOLVED]
#1
Hello again, everybody!

I try to keep working on my better understanding and use of Python, at least, as much as my little free time allows me...

I was taught not to underline or make any other marks on a book, as it would be then deemed defiled. That's why I use the pdf format as long as I can afford it, and then I fill it up with underlines, highlights, and notes.

The problem I have now, is that Adobe automatically updates its software Acrobat reader, and now all the extensive soft magenta underlining I had made is invisible, as I show here:

[Image: missing-parts-of-the-characters-with-the-invisible.png]

On the left of the highlighted "True or False", there is "values: either" that supposedly is underlined in a soft magenta shade that now is invisible, and looks as if the lower parts of the underlined characters are missing. After changing the underline colour to red, it becomes visible again:

[Image: After-changing-the-invisible-magenta-und...to-red.png]

When I open the colour palette for the possible undelining, a pinkish magenta underline is possible, but actually not visible. The same applies to the two shades of orange underlining, and one shade of yellow underlining:

[Image: Another-shade-of-pinkish-magenta-underli...isible.png]

I spent hours changing a pdf with my now invisible underlining to a current visible underlining.

I would like to know if it is possible for this manually tiredsome and endless task to do it automatically with python, as I have the same problem with other pdf files.

I have no idea how to do it. Please, can you help me?

I guess another solution would be to find a previous version of the free Acrobat Reader before they changed the underline choice, and try to make it not updatable, if that is possible...

The option to do it automatically with Python would be a whole new challenge for me, using pdf files and working on a choice of underlining inside the software, but I would prefer trying to do it with Python and learn new things on the way.

Thanks a lot for your help,
newbieAuggie2019

"That's been one of my mantras - focus and simplicity. Simple can be harder than complex: You have to work hard to get your thinking clean to make it simple. But it's worth it in the end because once you get there, you can move mountains."
Steve Jobs
Reply
#2
Hello again!

1) About my first approach to the problem, I have spent a lot of hours trying to mimic some code I have seen to deal with pdf files. I have tried some modules for that task, like poppler, qt4, qt5, pdf2 and others. I cannot install some modules needed to mimic that code or make them work (if I was able to install them).

2) About my second approach, although it seems that I can download an older version of Adobe Acrobat Reader, it would erase my other version (Adobe doesn't allow two versions of the same product). Besides, I'm not sure if it would automatically update itself again or not.

3) Curiously, I found a shocking solution. While my underlining is now invisible on Adobe Acrobat Reader (which is the program I used to make that underlining), it is nevertheless visible with another free pdf reader!!! So I'll use this other pdf reader to read and see my old underlining, and Adobe Acrobat Reader for my new underlining (using a visible colour).


Thank you!
Gribouillis likes this post
newbieAuggie2019

"That's been one of my mantras - focus and simplicity. Simple can be harder than complex: You have to work hard to get your thinking clean to make it simple. But it's worth it in the end because once you get there, you can move mountains."
Steve Jobs
Reply
#3
I suggest okular which is entirely free and also open source and a very good pdf viewer.
Reply
#4
(Mar-29-2023, 09:03 AM)Gribouillis Wrote: I suggest okular which is entirely free and also open source and a very good pdf viewer.

Thank you!

After so many hours trying to find a solution to the invisible underlining, I'm just glad that with another pdf reader I was able to see my underlining. I think it is just ridiculous that an underlining is now invisible on the pdf reader where that underlining was made, while it is visible on another pdf reader!!!
newbieAuggie2019

"That's been one of my mantras - focus and simplicity. Simple can be harder than complex: You have to work hard to get your thinking clean to make it simple. But it's worth it in the end because once you get there, you can move mountains."
Steve Jobs
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020