1
votes

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.

1
See this link which should get you started stackoverflow.com/q/6882098/231316 - Chris Haas
@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

1 Answers

1
votes
int r = renderInfo.GetColorNonStroke().R;
int g = renderInfo.GetColorNonStroke().G;
int b = renderInfo.GetColorNonStroke().B;