问题
Found the solution by using adobe - https://answers.acrobatusers.com/How-I-fix-Tagged-Annotations-fail-error-accessibility-links-q228128.aspx
How can I add Link-OBJR (object reference to link annotation) using pdfbox.
`PDAnnotationLink txtLink = new PDAnnotationLink();
PDRectangle position = new PDRectangle();
position.setLowerLeftX(PDFUtils.lw_lft_x);
position.setLowerLeftY(PDFUtils.lw_lft_y);
position.setUpperRightX(PDFUtils.tp_rgt_x);
position.setUpperRightY(PDFUtils.tp_rgt_y);
txtLink.setRectangle(position);
txtLink.setHidden(true);
txtLink.getCOSObject().setInt(COSName.STRUCT_PARENT,1);
PDActionURI action = new PDActionURI();
action.setURI(PDFUtils.link);
txtLink.setAction(action);
page.getAnnotations().add(txtLink);
PDObjectReference pd= new PDObjectReference();
pd.setReferencedObject(txtLink);
structureElement.appendKid(pd);
currentSection.appendKid(structureElement);
structureElement formBuilder.addContentToParent(COSName.P, null, page, structureElement, PDFUtils.mcid);`
Tagged using above code-
Tagged document reference- https://drive.google.com/file/d/1n_T361G6LTNLycQbw-3gP2nmBV-oTJdR/view?usp=sharing
Looking for below structure
来源:https://stackoverflow.com/questions/59172513/how-do-i-fix-the-tagged-annotations-fail-error-for-accessibility-for-links-using