Package com.pd4ml.pdf.xfdf
Class XfdfWriter
- java.lang.Object
-
- com.pd4ml.pdf.xfdf.XfdfWriter
-
public final class XfdfWriter extends java.lang.ObjectSerializes anXfdfDocumentto XFDF XML bytes (ISO 19444-1), hand-rolled the same waycom.pd4ml.pdf.merge.internal.PdfConformancebuilds its XMP packets, rather than pulling in a DOM/serializer dependency for what is, structurally, a very small and fixed document shape.Fields are always written flat -- one
<field name="fully.qualified.name">per leaf, dot-joining every ancestor -- rather than as a nested hierarchy of<field>elements; both are valid XFDF andXfdfReaderaccepts either, but the flat form is simpler to generate correctly and is what the majority of real-world producers emit.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]write(XfdfDocument document)Serializesdocumentto a complete, well-formed XFDF file's bytes (UTF-8, with the standard<?xml?>declaration andxmlns="http://ns.adobe.com/xfdf/"root).
-
-
-
Method Detail
-
write
public static byte[] write(XfdfDocument document)
Serializesdocumentto a complete, well-formed XFDF file's bytes (UTF-8, with the standard<?xml?>declaration andxmlns="http://ns.adobe.com/xfdf/"root). An empty document (no fields, no annotations) still produces a valid, minimal<xfdf/>-rooted file, not an error.
-
-