Package com.pd4ml.pdf.xfdf
Class XfdfReader
- java.lang.Object
-
- com.pd4ml.pdf.xfdf.XfdfReader
-
public final class XfdfReader extends java.lang.ObjectParses an XFDF document (ISO 19444-1) into anXfdfDocument. The XML itself may come from an arbitrary, untrusted source (an XFDF file handed to an import pipeline is no more trustworthy than the PDF it targets), so parsing is namespace-aware and hardened against XXE/entity-expansion the same waycom.pd4ml.pdf.merge.internal.PdfConformancehardens its own XMP parsing.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static XfdfDocumentread(byte[] xfdfBytes)Parses a complete XFDF document's bytes into anXfdfDocument.
-
-
-
Method Detail
-
read
public static XfdfDocument read(byte[] xfdfBytes) throws XfdfException
Parses a complete XFDF document's bytes into anXfdfDocument. Unrecognized top-level elements (some producers add their own, e.g. PDFTron's<pages>/<pdf-info>) and unrecognized annotation attributes/child elements are silently ignored rather than rejected -- only a root element other than<xfdf>fails outright.- Throws:
XfdfException- ifxfdfBytesisn't well-formed XML, or its root element isn't<xfdf>
-
-