Change text color or highlight text with multiple colors in PDF using python

I am trying to read the pdf and highlight some sub-strings in pdf, and i am able to achieve it using python libraries PYPDF2 and fitz

but i wanted to make to highlight/ change text with different colors and retain the layout as the original pdf,

please advice on this, thank you

There are numerous libraries in Python which can help you with coloring/highlighting text :

Refer to this source -

Coloroma is extremely easy to use.

I am trying highlight/color the words inside pdf, any idea how to use for those ?

© Copyright 2013-2019 Analytics Vidhya