Sure, either replace all color related commands you find, or if there
are none, insert one at the beginning of the content stream.
For example, "1 0 0 rg" sets red as nonstroking color.
Tilman
Am 27.08.2020 um 21:38 schrieb Gary Grosso:
Would it be possible to search for all text and set its color regardless of
what color it was before?
- Gary
-----Original Message-----
From: Tilman Hausherr <thaush...@t-online.de>
Sent: Thursday, August 27, 2020 2:42 PM
To: users@pdfbox.apache.org
Subject: Re: Change the font color of all text elements
Hi,
There was a somewhat related thread a week or two ago... you need to find the
operators that set a color, and then change their parameters.
The difficulty is that there are quite a lot (see PDF specification, it's g,
rg, k, sc, scn, maybe more). You should look at the content stream with
PDFDebugger, and hover over the operator and it will display the color.
Tilman
Am 27.08.2020 um 18:30 schrieb Gilad Denneboom:
Hi all,
I know this is a long shot, but is there any way to change the font
color of all static text elements in a PDF file using PDFBox? I played
around with some examples I found for processing text (like
RemoveAllText), but I don't see a way to use them to edit existing
text. Any help would be appreciated!
Thanks, Gilad.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: users-h...@pdfbox.apache.org
The content of this email and any attached files are intended for the recipient
specified in this message only. It may contain information that is
confidential, proprietary, privileged, and/or exempt from disclosure under
applicable law. It is strictly forbidden to share any part of this message with
any third party or rely on any of its contents, without the written consent of
the sender. If you received this message by mistake, please reply to this
message and follow with deletion of the original message, any copies and all
attachments, so that Oberon Technologies can ensure such a mistake does not
occur in the future.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: users-h...@pdfbox.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: users-h...@pdfbox.apache.org