in reply to How to change font color in PDF based by font name

I'd recommend on not trying to parse the PDF in perl, but leave that to a PDF/postscript interpreter. First, convert the PDF to postscript. Then, edit the postscript to change setfont operations to some procedure that both sets the font and changes the color. (Hope that the postscript program does not change the color after that.) Try to extract the full name of a postscript font with /FontInfo get /FullName get , and change the color according to that.

Replies are listed 'Best First'.
Re^2: How to change font color in PDF based by font name
by vinothjaguva (Novice) on Jul 06, 2011 at 11:49 UTC

    Thanks for your suggestion. I am unable to find out FontInfo get /FullName get.

    Could you please recommand any module (or) sample coding

      A few more pointers. Convert the PDF to postscript using the pdf interpreter pdftops in the http://www.foolabs.com/xpdf/download.html. In the postscript file you get, setfont is used to change to a font. You change this operator to set not only the font but also the color. Finally, you run the modified postscript file with a real postscript interpreter, such as ghostscript (gs). If you want to produce a pdf file, the utility script a2ping (which also uses ghostscript) may help.

        Hi

        Thanks for your help

        I am able to find the (/FontName /XJQTHX+NewsGothicStd def) with in the postscript file. Please help me out how to change the color of the font.

        If i go and inserting individual line before text (0.134 0.473 0.790 setrgbcolor) the color information, the color is change and i can able to see in PDF

        Can i get any guidence from you

        Thanks in Advance