Form Class
Class representing Acro form object.
Inheritance Hierarchy

Namespace: Aspose.Pdf.Facades
Assembly: Aspose.PDF (in Aspose.PDF.dll) Version: 19.12
Syntax
public sealed class Form : SaveableFacade

The Form type exposes the following members.

Constructors
  NameDescription
Public methodCode exampleForm
Construtcor of Form without parameters.
Examples
C#
Form form = new Aspose.Pdf.Facades.Form();
form.SrcFileName = "file.pdf";
Public methodCode exampleForm(Stream)
Constructor for form.
Public methodCode exampleForm(String)
Constructor of Form.
Public methodForm(Document)
Initializes new Form object on base of the document.
Public methodCode exampleForm(Stream, Stream) Obsolete.
Constructor of Form with two stream parameters. Specify same source and destination stream for incremental update.
Public methodCode exampleForm(Stream, String) Obsolete.
Constructor of Form
Public methodForm(Stream, HttpResponse) Obsolete.
Creates form which will save result into HttpResponse object.
Public methodCode exampleForm(String, Stream) Obsolete.
Constructor of Form.
Public methodCode exampleForm(String, String) Obsolete.
Constructor of Form class. Specify same source file name and destination file name to perform incremental update.
Public methodForm(String, HttpResponse) Obsolete.
Creates form which will save result into HttpResponse object.
Public methodForm(Document, Stream) Obsolete.
Initializes new Form object on base of the document.
Public methodForm(Document, String) Obsolete.
Initializes new Form object on base of the document.
Properties
  NameDescription
Public propertyAttachmentName
Gets or sets name of attachment when result of operation is stored into HttpResponse objects as attachment.
Public propertyContentDisposition
Gets or sets how content will be stored when result of operation is stored into HttpResponse object. Possible value: inline / attachment. Default: inline.
Public propertyConvertTo
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.
Public propertyCode exampleDestFileName Obsolete.
Gets or sets destiination file name.
Public propertyCode exampleDestStream Obsolete.
Gets or sets destination stream.
Public propertyDocument
Gets the document facade is working on.
(Inherited from Facade.)
Public propertyCode exampleFieldNames
Gets list of field names on the form.
Public propertyCode exampleFormSubmitButtonNames
Gets all form submit button names.
Public propertyImportResult
Result of last import operation. Array of objects which descibre result of import for each field.
Public propertyResponse
Gets or sets Response object where result of operation will be stored.
Public propertySaveOptions
Gets or sets save options when result is stored as HttpResponse. Default value: PdfSaveOptions.
Public propertyCode exampleSrcFileName Obsolete.
Gets or sets source file name.
Examples
C#
Form form = new Aspose.Pdf.Facades.Form();
form.SrcFileName = "file.pdf";
Public propertyCode exampleSrcStream Obsolete.
Gets or sets source stream.
Examples
C#
Form form = new Aspose.Pdf.Facades.Form();
form.SrcStream = new FileStream("source.pdf", FileMode.Open, FileAccess.Read);
Methods
  NameDescription
Public methodBindPdf(Stream)
Initializes the facade.
(Inherited from Facade.)
Public methodBindPdf(String)
Initializes the facade.
(Inherited from Facade.)
Public methodBindPdf(Document)
Initializes the facade.
(Inherited from Facade.)
Public methodClose
Closes opened files without any changes.
(Overrides FacadeClose.)
Public methodDispose
Disposes the facade.
(Inherited from Facade.)
Public methodEquals (Inherited from Object.)
Public methodCode exampleExportFdf
Exports the content of the fields of the pdf into the fdf stream.
Public methodCode exampleExportXfdf
Exports the content of the fields of the pdf into the xml stream. The button field's value will not be exported.
Public methodCode exampleExportXml
Exports the content of the fields of the pdf into the xml stream. The button field's value will not be exported.
Public methodExtractXfaData
Extracts XFA data packet
Public methodCode exampleFillBarcodeField
Fill a barcode field according to its fully qualified field name.
Public methodCode exampleFillField(String, Boolean)
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.
Public methodCode exampleFillField(String, Int32)
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.
Public methodCode exampleFillField(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.
Public methodCode exampleFillField(String, String)
Fill a field with multiple selections.Note: only for AcroForm List Box Field.
Public methodFillField(String, String, Boolean)
Fills field with specified value.
Public methodCode exampleFillImageField(String, Stream)
Overloads function of FillImageField. The input is a image stream.
Public methodCode exampleFillImageField(String, String)
Pastes an image onto the existing button field as its appearance according to its fully qualified field name.
Public methodCode exampleFlattenAllFields
Flattens all the fields.
Public methodCode exampleFlattenField
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.
Public methodCode exampleGetButtonOptionCurrentValue
Returns the current value for radio button option fields.
Public methodCode exampleGetButtonOptionValues
Gets the radio button option fields and related values based on the field name. This method has meaning for radio button groups.
Public methodCode exampleGetField
Gets the field's value according to its field name.
Public methodCode exampleGetFieldFacade
Returns FrofmFieldFacade object containing all appearance attributes.
Examples
C#
Aspose.Pdf.Facades.Form form = new Aspose.Pdf.Facades.Form("form.pdf");
FormFieldFacade field = form.GetFieldFacade("field1");
Console.WriteLine("Color of field border: " + field.BorderColor);
Public methodCode exampleGetFieldFlag
Returns flags of the field.
Public methodCode exampleGetFieldLimit
Get the limitation of text field.
Public methodCode exampleGetFieldType
Returns type of field.
Public methodCode exampleGetFullFieldName
Gets the full field name according to its short field name.
Public methodGetHashCode (Inherited from Object.)
Public methodCode exampleGetRichText
Get a Rich Text field's value, including the formattinf information of every character.
Public methodCode exampleGetSubmitFlags
Returns the submit button's submission flags
Public methodGetType (Inherited from Object.)
Public methodCode exampleImportFdf
Imports the content of the fields from the fdf file and put them into the new pdf.
Public methodCode exampleImportXfdf
Imports the content of the fields from the xfdf(xml) file and put them into the new pdf.
Public methodCode exampleImportXml(Stream)
Imports the content of the fields from the xml file and put them into the new pdf.
Public methodImportXml(Stream, Boolean)
Imports the content of the fields from the xml file and put them into the new pdf.
Public methodIsRequiredField
Determines whether field is required or not.
Public methodCode exampleRenameField
Renames a field. Either AcroForm field or XFA field is OK.
Public methodCode exampleSave Obsolete.
Saves the value of the filled fields and close the opened Pdf document.
Public methodSave(Stream)
Saves document into specified stream.
(Overrides SaveableFacadeSave(Stream).)
Public methodSave(String)
Saves document into specified file.
(Overrides SaveableFacadeSave(String).)
Public methodSetXfaData
Replaces XFA data with specified data packet. Data packet may be extracted using ExtractXfaData.
Public methodToString (Inherited from Object.)
See Also