Then I assume it isn't possible. Unless you come up with a document where it works, then it should be investigated with PDFDebugger whether there is something that I missed.

Tilman

Am 05.12.2021 um 05:17 schrieb chitgoks:
This didnt work. when i clicked the textmarkup annotation nothing happens.

this is my code

PDActionURI action = new PDActionURI();
action.setURI("https://www.google.com";);
txtMark.getCOSObject().setItem(COSName.AA, action);

On Sun, Dec 5, 2021 at 12:09 PM Tilman Hausherr <thaush...@t-online.de>
wrote:

Am 05.12.2021 um 04:57 schrieb chitgoks:
Hi tilman. the sample there is for PDAnnotationWidget
PDAnnotationTextMarkup  does not have a setAction() or setActions()
method though.
it's additional actions

widget.setActions(annotationActions);

but I see this is missing for other annotations. Try setting it manually

annotation.getCOSObject().setItem(COSName.AA, actions);

the PDF specification is unclear, in "trigger events" it mentions that
it works in annotations, but then it's only specifically mentioned in
widget annotations.

Tilman




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: users-h...@pdfbox.apache.org

Reply via email to