Dear Team,
We have purchased Aspose.Pdf for Java Site OEM license with Enterprise Support.
We have following issue with current version of API. Could you please help us to resolve these issues?
ISSUE:
How to verify there is already hyperlink existed in the current rectangle position / found TextFragment’s rect dimensions?
Is there any way to find the hyperlink present or not using the found TextFragment / Rectangle object? At present we are able to create a new LinkAnnotion, however our requirement is to update the existing LinkAnnotation. Could you please help us the right solution or with code snippet examples.
CODE SNIPPET:
// Get rectangular dimensions of TextFragment object
Rectangle rect = new Rectangle((float) textFragment.getPosition().getXIndent(), (float) textFragment.getPosition().getYIndent(), (float) textFragment.getPosition().getXIndent() + (float) textFragment.getRectangle().getWidth(), (float) textFragment.getPosition().getYIndent() + (float) textFragment.getRectangle().getHeight());
// Create LinkAnnotation object and specify rectangular region
LinkAnnotation link = new LinkAnnotation(textFragment.getPage(), rect);
// Set target file
link.setAction(new GoToRemoteAction(remotePDF, remotePageNumber));
// Add annotation to annotations collection of TextFragment
textFragment.getPage().getAnnotations().add(link);
Could you please let us know the right solution with example code snippets.
Highly appreciate for your support and resolution.
Thanks & Regards,
Radha Krishna Garnepudi