使用 adobe 找到了解决方案 -https://answers.acrobatusers.com/How-I-fix-Tagged-Annotations-fail-error-accessibility-links-q228128.aspx https://answers.acrobatusers.com/How-I-fix-Tagged-Annotations-fail-error-accessibility-links-q228128.aspx
如何使用 pdfbox 添加 Link-OBJR(对链接注释的对象引用)。
`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);`
使用上面的代码标记-
标记文档参考-https://drive.google.com/file/d/1n_T361G6LTNLycQbw-3gP2nmBV-oTJdR/view?usp=sharing https://drive.google.com/file/d/1n_T361G6LTNLycQbw-3gP2nmBV-oTJdR/view?usp=sharing
寻找下面的结构
None
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)