Dear Gilad,

at this point in time PDFBox doesn't support the appearance generation for rich 
text (neither for annotations nor for form fields).

Sorry to be of no better help.

With kind regards
Maruan


> Hi all,
> 
> I'm working on a project where I need to edit the contents of a "FreeText"
> comment (an arrow with a text box attached to it). I was trying for a while
> to do it by using the setContents method but that made no difference, when
> I recalled that this kind of annotation has a Rich Contents value
> (basically an XML string), so I tried to edit that one instead. The results
> were mixed, so I'm asking for help...
> 
> First of all, PDAnnotationMarkup has no getter/setter for this property, so
> maybe that should be added. It's just a string that is saved under
> COSName.RC. It can be called something like getRichContents(String s) and
> setRichContents(), I think.
> 
> Instead of parsing the XML string I just did a straight-forward search &
> replace on the string, which updates the value correctly, but the
> appearance of the comment remains the same (ie. it's still showing the old
> value, even though it's nowhere to be found in the COS Dictionary), as can
> be seen from the screenshot in the shared folder.
> Is there a way to force an update of the comment's appearance on the page,
> like can be done with fields?
> 
> A code sample, as well as the original and edited files, and the screenshot
> mentioned above can be found here:
> https://drive.google.com/drive/folders/1u1mBP5IePF_Kt6bT4ggvflmbq58UQvNY?usp=sharing
> 
> I'm using PDFBox 2.0.21 on Windows 7 in Eclipse 4.2.2.
> 
> Thanks in advance!
> Gilad



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

Reply via email to