Newbie question: Putting all occurrences of certain text string in a particular color

44 views
Skip to first unread message

Hans Schoenmakers

unread,
Feb 20, 2014, 12:06:13 PM2/20/14
to pdfne...@googlegroups.com
How can I change all occurrences of certain text string (say "software engineering") in a PDF in a particular color (e.g: red), and save the updated PDF.
I don't mean "highlighting" the text, but instead changing the actual color of the font (the ForeColor attribute).
Many thanks (sorry if this is an elementary question)

Aaron Gravesdale

unread,
Feb 20, 2014, 12:36:04 PM2/20/14
to pdfne...@googlegroups.com

You can search for text within a PDF document, finding the coordinates of matching strings, as the following sample code demonstrates:

http://www.pdftron.com/pdfnet/samplecode.html#TextSearch

Once you've found the text's location, you can change it as the following thread describes:

https://groups.google.com/d/msg/pdfnet-sdk/dLcJ9aQm00g/7Uy475ZlQAYJ

Hans Schoenmakers

unread,
Feb 20, 2014, 3:44:46 PM2/20/14
to pdfne...@googlegroups.com
Thanks!
Reply all
Reply to author
Forward
0 new messages