pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bose, Nilanjan - New Delhi" <nb...@wiley.com>
Subject Could not able to get Text fill color for Artificial Bold and Artificial outline text
Date Mon, 20 Jan 2014 04:55:36 GMT
Hi
I am currently trying to check artificial bold and outline text in PDF.
Currently what I understood from PDF specification that in case of artificial bold and outline
two same text are written in different rendering mode and in different stroking color.
In case of artificial bold the fill color between two text should be Black. this leaves the
impression of a thicker letter.
On the other hand for artificial outline text the filling color should be in White.


Now I am using following code to check Rendering mode and stroking color for particular text
by overriding processTextPosition method of PDFTextStripper class.

For Rendering Mode:
getGraphicsState().getTextState().getRenderingMode().

The above method gives me different rendering node for two same text (0 and 1).

For Text Color:
getGraphicsState().getStrokingColor().getJavaColor()


Now the problem is this method always gives me color as Black (java.awt.Color[r=0,g=0,b=0]).
This creates a problem as I could not able to determine which one is outline and which one
is artificial bold.


Is there any way to check fill color between two text if they are in different rendering mode.

Thanks,
Nilanjan

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message