[ 
https://issues.apache.org/jira/browse/PDFBOX-3063?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14975877#comment-14975877
 ] 

Tilman Hausherr edited comment on PDFBOX-3063 at 10/27/15 7:30 AM:
-------------------------------------------------------------------

Please try this - in your derived class, put this in your constructor:

{code}
        addOperator(new SetStrokingColorSpace());
        addOperator(new SetNonStrokingColorSpace());
        addOperator(new SetStrokingDeviceCMYKColor());
        addOperator(new SetNonStrokingDeviceCMYKColor());
        addOperator(new SetNonStrokingDeviceRGBColor());
        addOperator(new SetStrokingDeviceRGBColor());
        addOperator(new SetStrokingColor());
        addOperator(new SetStrokingColorN());
        addOperator(new SetNonStrokingColor());
        addOperator(new SetNonStrokingColorN());
{code}
this is from the PreflightStreamEngine code... I see two are missing there, so 
add these too: SetNonStrokingDeviceGrayColor and SetStrokingDeviceGrayColor.


was (Author: tilman):
Please try this - in your derived class, put this in your constructor:

{code}
        addOperator(new SetStrokingColorSpace());
        addOperator(new SetNonStrokingColorSpace());
        addOperator(new SetStrokingDeviceCMYKColor());
        addOperator(new SetNonStrokingDeviceCMYKColor());
        addOperator(new SetNonStrokingDeviceRGBColor());
        addOperator(new SetStrokingDeviceRGBColor());
        addOperator(new SetStrokingColor());
        addOperator(new SetStrokingColorN());
        addOperator(new SetNonStrokingColor());
        addOperator(new SetNonStrokingColorN());
{code}
this is from the preflight code... I see two are missing, so add these too: 
SetNonStrokingDeviceGrayColor and SetStrokingDeviceGrayColor.

> Appears that getStrokingColor/getNonStrokingColor are broken
> ------------------------------------------------------------
>
>                 Key: PDFBOX-3063
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3063
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Text extraction
>            Reporter: Joel Hirsh
>         Attachments: whitetext.pdf
>
>
> I am using PDFTextStripper and overriding processTextPosition so that I can 
> test for white on white text.
> In version 1.8 I called getGraphicsState().getStrokingColor() and 
> getGraphicsState().getNonStrokingColor() to get the colors and then could 
> test for white on white text.
> In version 2.0 I am making the same calls on the same file, but the PDColor 
> returned for both methods never changes from PDColor{components=[0.0], 
> patternName=null}
> In the attached file, there is some white text '661.37' just above and to the 
> left of the 2.00.  Can find it in Acrobat by searching or careful selecting



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to