Exactly what I wanted to avoid actually. You’re right it’s very tricky and almost impossible this way… If others have better ideas, let me know.
Thank you Tilman > Le 17 oct. 2018 à 18:25, Tilman Hausherr <[email protected]> a écrit : > > Tricky, you'd have to work on the PDF page content stream. Open a file with > PDFDebugger to see what I mean. You would have to insert a color operator + > parameters at the right place. (and it is difficult to find) > > Tilman > > Am 17.10.2018 um 18:11 schrieb Confidential Confidential: >> Hello all, >> >> I’m trying to modify the color of a given string/word in PDF documents >> (automatically). >> I have tried to render a blank rectangle and then render the string with the >> same font, style, size and position with the desired color. >> >> This works partially : the method is not 100% reliable. For some documents >> and fonts, some glyphs fail to render. >> >> So I’d like to use another technic : simply tell PDFBox to set the color of >> the glyphs without having to render them. As if I was opening a PDF editor, >> change the color and save. >> >> Is there a way to do achieve this programatically ? >> >> Thanks for your answers, >> >> Best regards >> >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] >
