[
https://issues.apache.org/jira/browse/PDFBOX-3063?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14976718#comment-14976718
]
Tilman Hausherr commented on PDFBOX-3063:
-----------------------------------------
However you'll still get the same results. All texts are black (0 g in the
content stream), including the one you don't see. The reason it is "invisible"
is because white rectangles (1 g in the content stream") are drawn over it. I
doubt that this was different in 1.8. (If it was, I'd be interested to be
proven wrong)
Note also that the used color (stroking/nonstroking etc.) depends on the used
text rendering mode. In your file, it is mode 0 (default) so it is the
nonstroking color that counts.
To see how it works with the trick I described, use the file from PDFBOX-3046
as input.
Read also this
https://stackoverflow.com/questions/19809813/how-to-check-if-a-text-is-transparent-with-pdfbox/20179928#20179928
it is not about your problem, but somewhat related.
> 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]