I am extending PDFGraphicsStreamEngine
and reading stroked lines. That works fine.
I am also trying to get the color of the lines with code like
@Override
public void lineTo(float x, float y) throws IOException
{
PDGraphicsState gs = super.getGraphicsState();
int rgb = gs.getStrokingColorSpace().getInitialColor().toRGB();
or
int rgb = gs.getStrokingColor().toRGB();
}
rgb is always zero, and if I breakpoint and look at the PDGraphicsState
structure it seems to have an infinite loop of pointers to ColorSpaces and
InitialColors.
Is there a way to read the stroke color?
What I am trying to do is ignore white on white lines.
Thanks