Class XfdfReader
- Namespace
- iTextSharp.text.pdf
- Assembly
- iTextSharp.LGPLv2.Core.dll
Reads a XFDF. @author Leonard Rosenthol (leonardr@pdfsages.com)
public class XfdfReader : ISimpleXmlDocHandler
- Inheritance
-
XfdfReader
- Implements
- Inherited Members
Constructors
XfdfReader(byte[])
Reads an XFDF form. @throws IOException on error
public XfdfReader(byte[] xfdfIn)
Parameters
xfdfIn
byte[]the byte array with the form
XfdfReader(string)
Reads an XFDF form. @throws IOException on error
public XfdfReader(string filename)
Parameters
filename
stringthe file name of the form
Fields
ListFields
Storage for field values if there's more than one value for a field. @since 2.1.4
protected INullValueDictionary<string, List<string>> ListFields
Field Value
Properties
Fields
Gets all the fields. The map is keyed by the fully qualified field name and the value is a merged PdfDictionary with the field content.
public INullValueDictionary<string, string> Fields { get; }
Property Value
- INullValueDictionary<string, string>
all the fields
FileSpec
Gets the PDF file specification contained in the FDF.
public string FileSpec { get; }
Property Value
- string
the PDF file specification contained in the FDF
Methods
EndDocument()
Called after the document is parsed.
public void EndDocument()
EndElement(string)
Called when an end tag is found.
public void EndElement(string tag)
Parameters
tag
stringthe tag name
GetField(string)
Gets the field value.
public string GetField(string name)
Parameters
name
stringthe fully qualified field name
Returns
- string
the field's value
GetFieldValue(string)
Gets the field value or null if the field does not exist or has no value defined.
public string GetFieldValue(string name)
Parameters
name
stringthe fully qualified field name
Returns
- string
the field value or null
GetListValues(string)
Gets the field values for a list or null if the field does not exist or has no value defined. @since 2.1.4
public List<string> GetListValues(string name)
Parameters
name
stringthe fully qualified field name
Returns
StartDocument()
Called when the document starts to be parsed.
public void StartDocument()
StartElement(string, INullValueDictionary<string, string>)
Called when a start tag is found.
public void StartElement(string tag, INullValueDictionary<string, string> h)
Parameters
tag
stringthe tag name
h
INullValueDictionary<string, string>the tag's attributes
Text(string)
Called when a text element is found.
public void Text(string str)
Parameters
str
stringthe text element, probably a fragment.