Class Form

Form class

Class representing Acro form object.

public sealed class Form : SaveableFacade

Constructors

NameDescription
Form()Construtcor of Form without parameters.
Form(Document)Initializes new Form object on base of the document.
Form(Stream)Constructor for form.
Form(string)Constructor of Form.

Properties

NameDescription
AttachmentName { get; set; }Gets or sets name of attachment when result of operation is stored into HttpResponse objects as attachment.
ContentDisposition { get; set; }Gets or sets how content will be stored when result of operation is stored into HttpResponse object. Possible value: inline / attachment. Default: inline.
ConvertTo { set; }Sets PDF file format. Result file will be saved in specified file format. If this property is not specified then file will be save in default PDF format without conversion.
Document { get; }Gets the document facade is working on.
FieldNames { get; }Gets list of field names on the form.
FormSubmitButtonNames { get; }Gets all form submit button names.
ImportResult { get; }Result of last import operation. Array of objects which descibre result of import for each field.
Response { get; set; }Gets or sets Response object where result of operation will be stored.
SaveOptions { get; set; }Gets or sets save options when result is stored as HttpResponse. Default value: PdfSaveOptions.

Methods

NameDescription
virtual BindPdf(Document)Initializes the facade.
virtual BindPdf(Stream)Initializes the facade.
virtual BindPdf(string)Initializes the facade.
override Close()Closes opened files without any changes.
Dispose()Disposes the facade.
ExportFdf(Stream)Exports the content of the fields of the pdf into the fdf stream.
ExportXfdf(Stream)Exports the content of the fields of the pdf into the xml stream. The button field’s value will not be exported.
ExportXml(Stream)Exports the content of the fields of the pdf into the xml stream. The button field’s value will not be exported.
ExtractXfaData(Stream)Extracts XFA data packet
FillBarcodeField(string, string)Fill a barcode field according to its fully qualified field name.
FillField(string, bool)Fills the check box field with a boolean value. Notice: Only be applied to Check Box. Please note that Aspose.Pdf.Facades supports only full field names and does not work with partial field names in contrast with Aspose.Pdf.Kit; For example if field has full name “Form.Subform.CheckBoxField” you should specify full name and not “CheckBoxField”. You can use FieldNames property to explore existing field names and search required field by its partial name.
FillField(string, int)Fills the radio box field with a valid index value according to a fully qualified field name. Before filling the fields, only field’s name must be known. While the value can be specified by its index. Notice: Only be applied to Radio Box, Combo Box and List Box fields. Please note that Aspose.Pdf.Facades supports only full field names and does not work with partial field names in contrast with Aspose.Pdf.Kit; For example if field has full name “Form.Subform.ListBoxField” you should specify full name and not “ListBoxField”. You can use FieldNames property to explore existing field names and search required field by its partial name.
FillField(string, string)Fills the field with a valid value according to a fully qualified field name. Before filling the fields, every field’s names and its corresponding valid values must be known. Both the fields’ name and values are case sensitive. Please note that Aspose.Pdf.Facades supports only full field names and does not work with partial field names in contrast with Aspose.Pdf.Kit; For example if field has full name “Form.Subform.TextField” you should specify full name and not “TextField”. You can use FieldNames property to explore existing field names and search required field by its partial name.
FillField(string, string[])Fill a field with multiple selections.Note: only for AcroForm List Box Field.
FillField(string, string, bool)Fills field with specified value.
FillFields(string[], string[], out Stream)Fills the text box fields with a text values and save the document. Relevant for signed documents. Notice: Only be applied to Text Box. Both the fields’ name and values are case sensitive.
FillImageField(string, Stream)Overloads function of FillImageField. The input is a image stream.
FillImageField(string, string)Pastes an image onto the existing button field as its appearance according to its fully qualified field name.
FlattenAllFields()Flattens all the fields.
FlattenField(string)Flattens a specified field with the fully qualified field name. Any other field will remain unchangable. If the fieldName is invalid, all the fields will remain unchangable.
GetButtonOptionCurrentValue(string)Returns the current value for radio button option fields.
GetButtonOptionValues(string)Gets the radio button option fields and related values based on the field name. This method has meaning for radio button groups.
GetField(string)Gets the field’s value according to its field name.
GetFieldFacade(string)Returns FrofmFieldFacade object containing all appearance attributes.
GetFieldFlag(string)Returns flags of the field.
GetFieldLimit(string)Get the limitation of text field.
GetFieldType(string)Returns type of field.
GetFullFieldName(string)Gets the full field name according to its short field name.
GetRichText(string)Get a Rich Text field’s value, including the formattinf information of every character.
GetSubmitFlags(string)Returns the submit button’s submission flags
ImportFdf(Stream)Imports the content of the fields from the fdf file and put them into the new pdf.
ImportXfdf(Stream)Imports the content of the fields from the xfdf(xml) file and put them into the new pdf.
ImportXml(Stream)Imports the content of the fields from the xml file and put them into the new pdf.
ImportXml(Stream, bool)Imports the content of the fields from the xml file and put them into the new pdf.
IsRequiredField(string)Determines whether field is required or not.
RenameField(string, string)Renames a field. Either AcroForm field or XFA field is OK.
override Save(Stream)Saves document into specified stream.
override Save(string)Saves document into specified file.
SetXfaData(Stream)Replaces XFA data with specified data packet. Data packet may be extracted using ExtractXfaData.

Other Members

NameDescription
class FormImportResultClass which describes result if field import.
enum ImportStatusStatus of imported field

See Also