问题
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 link: https://drive.google.com/file/d/1KO772GQbolJ0oNMAzsdGPrLqfUtRcKbs/view?usp=sharing
来源:https://stackoverflow.com/questions/65581194/tag-structure-initialization-failed-tag-structure-is-ignored-it-might-be-corru