标签结构初始化失败,标签结构被忽略,可能已损坏 [英] Tag structure initialization failed, tag structure is ignored, it might be corrupted

查看:79
本文介绍了标签结构初始化失败,标签结构被忽略,可能已损坏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Adobe Acrobat Pro创建了可填充的PDF,并标记了输入字段.我尝试使用itext填写的文档的辅助功能"检查中传递的标记内容",标记注释",标记表单字段".当我尝试使用itext库从Java代码填充文档时,出现此错误.

I created a fillable PDF using Adobe Acrobat pro and tagged the input fields. Tagged Content, Tagged annotations, Tagged Form Fields passed in the Accessibility check for the document I am trying to fill using itext. I am getting this error when i am trying to fill the document from java code using itext library.

ERROR com.itextpdf.kernel.pdf.PdfDocument - Tag structure initialization failed, tag structure is ignored, it might be corrupted.
com.itextpdf.kernel.PdfException: StructParent index not found in tagged object.
              at com.itextpdf.kernel.pdf.tagging.ParentTreeHandler.registerMcr(ParentTreeHandler.java:182)
              at com.itextpdf.kernel.pdf.tagging.ParentTreeHandler.registerAllMcrs(ParentTreeHandler.java:266)
              at com.itextpdf.kernel.pdf.tagging.ParentTreeHandler.<init>(ParentTreeHandler.java:104)
              at com.itextpdf.kernel.pdf.tagging.PdfStructTreeRoot.<init>(PdfStructTreeRoot.java:82)
              at com.itextpdf.kernel.pdf.PdfDocument.tryInitTagStructure(PdfDocument.java:1937)
              at com.itextpdf.kernel.pdf.PdfDocument.open(PdfDocument.java:1709)
              at com.itextpdf.kernel.pdf.PdfDocument.<init>(PdfDocument.java:293)
              at com.itextpdf.kernel.pdf.PdfDocument.<init>(PdfDocument.java:261)

pdf链接: https://drive.google.com/file/d/1KO772GQbolJ0oNMAzsdGPrLqfUtRcKbs/view?usp = sharing

推荐答案

我删除了所有字段标记,并使用自动标记表单字段"重新标记了整个文档.在可访问性"中菜单.这样就解决了这个问题.

I removed all the field tags and retagged the whole documents using "Autotag form fields" in the "Accessibility" menu. This fixed the issue.

这篇关于标签结构初始化失败,标签结构被忽略,可能已损坏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆