1

I want to extract color fom PDF If a text is highlighted with color extract and font color from pdf using itextsharp . can anyone proide how to extract color from pdf. thanku.

pdp
  • 609
  • 9
  • 22
  • 2
    See this link which should get you started http://stackoverflow.com/q/6882098/231316 – Chris Haas Apr 02 '13 at 13:15
  • 1
    @chris haas. thanku. but i think the code will not give spot colors . can i get the cmyk or rgb value of the text and background color used in pdf.for example i created a pdf using ms word. where the text contains colors which i need to extract . can i get hexadecimal code of a color or rgb or cmyk color such that which will be easy for me to get color name thanku – pdp Apr 08 '13 at 18:46

1 Answers1

1
int r = renderInfo.GetColorNonStroke().R;
int g = renderInfo.GetColorNonStroke().G;
int b = renderInfo.GetColorNonStroke().B;
jhr
  • 653
  • 5
  • 12
pdp
  • 609
  • 9
  • 22