You can call getStream() on the PDFormXObject and then change that one,
or are you asking something different?
I assume
https://stackoverflow.com/questions/75814243/pdfbox-how-to-replace-text-in-a-pdformxobject
is also from you?
Or is your question about replacing a form in the resources?
Tilman
On 23.03.2023 11:38, Kett, Bernward wrote:
Dear all,
I'm struggling with replacing text within a Form. I detect the text I can
replace it, but putting it back to the form seems to be the hell on earth.
What was my approach?
I'm using MKL's PdfContentStreamEditor (Thanks for that it was a very useful
starting point)
Replacing content within the main content is quite easy with that (Replacing
all changed Tj with TJ by the way)
I think the purpose of doing nothing in the showForm overwrite is exactly to
avoid replacements in Forms.
So creating a new outstream for the form and putting my redactions there is
also done (text is found and replaced).
But how to replace the old form stream with the new one?
Thanks a lot,
Bernward
EntServ Deutschland GmbH: Schickardstra?e 32, 71034 B?blingen, Germany - Board
of Directors: Joachim L?ffler (Chairman), Jacqueline Fechner - Registered in
Stuttgart: HRB 757510.
DXC Technology Company -- This message is transmitted to you by or on behalf of
DXC Technology Company or one of its affiliates. It is intended exclusively for
the addressee. The substance of this message, along with any attachments, may
contain proprietary, confidential or privileged information or information that
is otherwise legally exempt from disclosure. Any unauthorized review, use,
disclosure or distribution is prohibited. If you are not the intended recipient
of this message, you are not authorized to read, print, retain, copy or
disseminate any part of this message. If you have received this message in
error, please destroy and delete all copies and notify the sender by return
e-mail. Regardless of content, this e-mail shall not operate to bind DXC
Technology Company or any of its affiliates to any order or other contract
unless pursuant to explicit written agreement or government initiative
expressly permitting the use of e-mail for such purpose. --.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org