if (linkTraitFound) {
if (!annotsAllowed) {
log.warn("Skipping annotation for a link due to PDF profile: "
+ pdfDoc.getProfile());
} else if (action != null) {
PDFLink pdfLink = factory.makeLink(ipRect, action);
if (accessEnabled) {
String ptr = (String) ip.getTrait(Trait.PTR);
logicalStructureHandler.addLinkContentItem(pdfLink, ptr);
}
currentPage.addAnnotation(pdfLink);