Class representing Acro form object. More...

#include "Form.h"

Inherits Aspose::Pdf::Facades::SaveableFacade.

Classes

class  FormImportResult
 Class which describes result if field import. More...
 

Public Types

enum  ImportStatus { ImportStatus::Success, ImportStatus::FieldNotFound }
 Status of imported field More...
 
- Public Types inherited from System::Object
typedef SmartPtr< Objectptr
 Alias for smart pointer type. More...
 

Public Member Functions

ASPOSE_PDF_SHARED_API System::ArrayPtr< System::SharedPtr< Form::FormImportResult > > get_ImportResult ()
 Result of last import operation. Array of objects which descibre result of import for each field. More...
 
ASPOSE_PDF_SHARED_API System::String get_SrcFileName () const
 Gets source file name. More...
 
ASPOSE_PDF_SHARED_API void set_SrcFileName (System::String value)
 Sets source file name. More...
 
ASPOSE_PDF_SHARED_API void set_ConvertTo (PdfFormat value)
 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. More...
 
ASPOSE_PDF_SHARED_API System::String get_DestFileName () const
 Gets destiination file name. More...
 
ASPOSE_PDF_SHARED_API void set_DestFileName (System::String value)
 Sets destiination file name. More...
 
ASPOSE_PDF_SHARED_API System::SharedPtr< System::IO::Streamget_SrcStream () const
 Gets source stream. More...
 
ASPOSE_PDF_SHARED_API void set_SrcStream (System::SharedPtr< System::IO::Stream > value)
 Sets source stream. More...
 
ASPOSE_PDF_SHARED_API System::SharedPtr< System::IO::Streamget_DestStream () const
 Gets destination stream. More...
 
ASPOSE_PDF_SHARED_API void set_DestStream (System::SharedPtr< System::IO::Stream > value)
 Sets destination stream. More...
 
ASPOSE_PDF_SHARED_API System::ArrayPtr< System::Stringget_FieldNames ()
 Gets list of field names on the form. More...
 
ASPOSE_PDF_SHARED_API System::ArrayPtr< System::Stringget_FormSubmitButtonNames ()
 Gets all form submit button names. More...
 
ASPOSE_PDF_SHARED_API Aspose::Pdf::ContentDisposition get_ContentDisposition () const
 Gets how content will be stored when result of operation is stored into HttpResponse object. Possible value: inline / attachment. Default: inline. More...
 
ASPOSE_PDF_SHARED_API void set_ContentDisposition (Aspose::Pdf::ContentDisposition value)
 Sets how content will be stored when result of operation is stored into HttpResponse object. Possible value: inline / attachment. Default: inline. More...
 
ASPOSE_PDF_SHARED_API System::SharedPtr< System::Web::HttpResponseget_Response () const
 Gets Response object where result of operation will be stored. More...
 
ASPOSE_PDF_SHARED_API void set_Response (System::SharedPtr< System::Web::HttpResponse > value)
 Sets Response object where result of operation will be stored. More...
 
ASPOSE_PDF_SHARED_API System::SharedPtr< Aspose::Pdf::SaveOptionsget_SaveOptions () const
 Gets save options when result is stored as HttpResponse. Default value: PdfSaveOptions. More...
 
ASPOSE_PDF_SHARED_API void set_SaveOptions (System::SharedPtr< Aspose::Pdf::SaveOptions > value)
 Sets save options when result is stored as HttpResponse. Default value: PdfSaveOptions. More...
 
ASPOSE_PDF_SHARED_API System::String get_AttachmentName () const
 Gets name of attachment when result of operation is stored into HttpResponse objects as attachment. More...
 
ASPOSE_PDF_SHARED_API void set_AttachmentName (System::String value)
 Sets name of attachment when result of operation is stored into HttpResponse objects as attachment. More...
 
ASPOSE_PDF_SHARED_API System::SharedPtr< FormFieldFacadeGetFieldFacade (System::String fieldName)
 Returns FrofmFieldFacade object containing all appearance attributes. More...
 
ASPOSE_PDF_SHARED_API Form (System::SharedPtr< System::IO::Stream > srcStream, System::SharedPtr< System::IO::Stream > destStream)
 Constructor of Form with two stream parameters. Specify same source and destination stream for incremental update. More...
 
ASPOSE_PDF_SHARED_API Form ()
 Construtcor of Form without parameters. More...
 
ASPOSE_PDF_SHARED_API bool FillField (System::String fieldName, System::String fieldValue)
 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. More...
 
ASPOSE_PDF_SHARED_API bool FillField (System::String fieldName, int32_t index)
 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. More...
 
ASPOSE_PDF_SHARED_API bool FillField (System::String fieldName, bool beChecked)
 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. More...
 
ASPOSE_PDF_SHARED_API bool FillFields (System::ArrayPtr< System::String > fieldNames, System::ArrayPtr< System::String > fieldValues, System::SharedPtr< System::IO::Stream > &output)
 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. More...
 
ASPOSE_PDF_SHARED_API System::String GetButtonOptionCurrentValue (System::String fieldName)
 Returns the current value for radio button option fields. More...
 
ASPOSE_PDF_SHARED_API System::SharedPtr< System::Collections::Generic::Dictionary< System::String, System::String > > GetButtonOptionValues (System::String fieldName)
 Gets the radio button option fields and related values based on the field name. This method has meaning for radio button groups. More...
 
ASPOSE_PDF_SHARED_API System::String GetField (System::String fieldName)
 Gets the field's value according to its field name. More...
 
ASPOSE_PDF_SHARED_API System::String GetFullFieldName (System::String fieldName)
 Gets the full field name according to its short field name. More...
 
ASPOSE_PDF_SHARED_API int32_t GetFieldLimit (System::String fieldName)
 Get the limitation of text field. More...
 
ASPOSE_PDF_SHARED_API void Save ()
 Saves the value of the filled fields and close the opened Pdf document. More...
 
ASPOSE_PDF_SHARED_API void Save (System::String destFile) override
 Saves document into specified file. More...
 
ASPOSE_PDF_SHARED_API void Save (System::SharedPtr< System::IO::Stream > destStream) override
 Saves document into specified stream. More...
 
ASPOSE_PDF_SHARED_API void Close () override
 Closes opened files without any changes. More...
 
ASPOSE_PDF_SHARED_API void FlattenAllFields ()
 Flattens all the fields. More...
 
ASPOSE_PDF_SHARED_API void FlattenField (System::String fieldName)
 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. More...
 
ASPOSE_PDF_SHARED_API bool FillBarcodeField (System::String fieldName, System::String data)
 Fill a barcode field according to its fully qualified field name. More...
 
ASPOSE_PDF_SHARED_API void ImportFdf (System::SharedPtr< System::IO::Stream > inputFdfStream)
 Imports the content of the fields from the fdf file and put them into the new pdf. More...
 
ASPOSE_PDF_SHARED_API void ExportFdf (System::SharedPtr< System::IO::Stream > outputFdfStream)
 Exports the content of the fields of the pdf into the fdf stream. More...
 
ASPOSE_PDF_SHARED_API void ImportXml (System::SharedPtr< System::IO::Stream > inputXmlStream)
 Imports the content of the fields from the xml file and put them into the new pdf. More...
 
ASPOSE_PDF_SHARED_API void ExportXml (System::SharedPtr< System::IO::Stream > outputXmlStream)
 Exports the content of the fields of the pdf into the xml stream. The button field's value will not be exported. More...
 
ASPOSE_PDF_SHARED_API void ExtractXfaData (System::SharedPtr< System::IO::Stream > outputXmlStream)
 Extracts XFA data packet More...
 
ASPOSE_PDF_SHARED_API void SetXfaData (System::SharedPtr< System::IO::Stream > inputXmlStream)
 Replaces XFA data with specified data packet. Data packet may be extracted using ExtractXfaData. More...
 
ASPOSE_PDF_SHARED_API void ImportXfdf (System::SharedPtr< System::IO::Stream > inputXfdfStream)
 Imports the content of the fields from the xfdf(xml) file and put them into the new pdf. More...
 
ASPOSE_PDF_SHARED_API void ExportXfdf (System::SharedPtr< System::IO::Stream > outputXfdfStream)
 Exports the content of the fields of the pdf into the xml stream. The button field's value will not be exported. More...
 
ASPOSE_PDF_SHARED_API void FillField (System::String fieldName, System::ArrayPtr< System::String > fieldValues)
 Fill a field with multiple selections.Note: only for AcroForm List Box Field. More...
 
ASPOSE_PDF_SHARED_API void RenameField (System::String fieldName, System::String newFieldName)
 Renames a field. Either AcroForm field or XFA field is OK. More...
 
ASPOSE_PDF_SHARED_API System::String GetRichText (System::String fieldName)
 Get a Rich Text field's value, including the formattinf information of every character. More...
 
ASPOSE_PDF_SHARED_API SubmitFormFlag GetSubmitFlags (System::String fieldName)
 Returns the submit button's submission flags More...
 
ASPOSE_PDF_SHARED_API Form (System::String srcFileName)
 Constructor of Form. More...
 
ASPOSE_PDF_SHARED_API Form (System::SharedPtr< System::IO::Stream > srcStream)
 Constructor for form. More...
 
ASPOSE_PDF_SHARED_API Form (System::String srcFileName, System::String destFileName)
 Constructor of Form class. Specify same source file name and destination file name to perform incremental update. More...
 
ASPOSE_PDF_SHARED_API Form (System::String srcFileName, System::SharedPtr< System::IO::Stream > destStream)
 Constructor of Form. More...
 
ASPOSE_PDF_SHARED_API Form (System::SharedPtr< System::IO::Stream > srcStream, System::String destFileName)
 Constructor of Form More...
 
ASPOSE_PDF_SHARED_API FieldType GetFieldType (System::String fieldName)
 Returns type of field. More...
 
ASPOSE_PDF_SHARED_API bool IsRequiredField (System::String fieldName)
 Determines whether field is required or not. More...
 
ASPOSE_PDF_SHARED_API PropertyFlag GetFieldFlag (System::String fieldName)
 Returns flags of the field. More...
 
ASPOSE_PDF_SHARED_API void FillImageField (System::String fieldName, System::String imageFileName)
 Pastes an image onto the existing button field as its appearance according to its fully qualified field name. More...
 
ASPOSE_PDF_SHARED_API void FillImageField (System::String fieldName, System::SharedPtr< System::IO::Stream > imageStream)
 Overloads function of FillImageField. The input is a image stream. More...
 
ASPOSE_PDF_SHARED_API Form (System::SharedPtr< Aspose::Pdf::Document > document)
 Initializes new Form object on base of the document . More...
 
ASPOSE_PDF_SHARED_API Form (System::SharedPtr< Aspose::Pdf::Document > document, System::String destFileName)
 Initializes new Form object on base of the document . More...
 
ASPOSE_PDF_SHARED_API Form (System::SharedPtr< Aspose::Pdf::Document > document, System::SharedPtr< System::IO::Stream > destStream)
 Initializes new Form object on base of the document . More...
 
ASPOSE_PDF_SHARED_API void ImportXml (System::SharedPtr< System::IO::Stream > inputXmlStream, bool IgnoreFormTemplateChanges)
 Imports the content of the fields from the xml file and put them into the new pdf. More...
 
ASPOSE_PDF_SHARED_API bool FillField (System::String fieldName, System::String value, bool fitFontSize)
 Fills field with specified value. More...
 
ASPOSE_PDF_SHARED_API Form (System::SharedPtr< System::IO::Stream > inputStream, System::SharedPtr< System::Web::HttpResponse > response)
 Creates form which will save result into HttpResponse object. More...
 
ASPOSE_PDF_SHARED_API Form (System::String inputFile, System::SharedPtr< System::Web::HttpResponse > response)
 Creates form which will save result into HttpResponse object. More...
 
- Public Member Functions inherited from Aspose::Pdf::Facades::Facade
ASPOSE_PDF_SHARED_API System::SharedPtr< Aspose::Pdf::Documentget_Document () const
 Gets the document facade is working on. More...
 
ASPOSE_PDF_SHARED_API void BindPdf (System::String srcFile) override
 Initializes the facade. More...
 
ASPOSE_PDF_SHARED_API void BindPdf (System::SharedPtr< System::IO::Stream > srcStream) override
 Initializes the facade. More...
 
ASPOSE_PDF_SHARED_API void BindPdf (System::SharedPtr< Aspose::Pdf::Document > srcDoc) override
 Initializes the facade. More...
 
ASPOSE_PDF_SHARED_API void Dispose () override
 Disposes the facade. More...
 
- Public Member Functions inherited from Aspose::Pdf::Facades::IFacade
virtual void BindPdf (System::SharedPtr< Document > srcDoc)=0
 Binds PDF document for editing. More...
 
- Public Member Functions inherited from System::Object
ASPOSECPP_SHARED_API Object ()
 Creates object. Initializes all internal data structures. More...
 
virtual ASPOSECPP_SHARED_API ~Object ()
 Destroys object. Frees all internal data structures. More...
 
ASPOSECPP_SHARED_API Object (Object const &x)
 Copy constructor. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
Objectoperator= (Object const &x)
 Assignment operator. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
ObjectSharedRefAdded ()
 Increments shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int SharedRefRemovedSafe ()
 Decrements and returns shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int RemovedSharedRefs (int count)
 Decreases shared reference count by specified value. More...
 
Detail::SmartPtrCounter * WeakRefAdded ()
 Increments weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
void WeakRefRemoved ()
 Decrements weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
Detail::SmartPtrCounter * GetCounter ()
 Gets reference counter data structure associated with the object. More...
 
int SharedCount () const
 Gets current value of shared reference counter. More...
 
ASPOSECPP_SHARED_API void Lock ()
 Implements C# lock() statement locking. Call directly or use LockContext sentry object. More...
 
ASPOSECPP_SHARED_API void Unlock ()
 Implements C# lock() statement unlocking. Call directly or use LockContext sentry object. More...
 
virtual ASPOSECPP_SHARED_API bool Equals (ptr obj)
 Compares objects using C# Object.Equals semantics. More...
 
virtual ASPOSECPP_SHARED_API int32_t GetHashCode () const
 Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. More...
 
virtual ASPOSECPP_SHARED_API String ToString () const
 Analog of C# Object.ToString() method. Enables converting custom objects to string. More...
 
virtual ASPOSECPP_SHARED_API ptr MemberwiseClone () const
 Analog of C# Object.MemberwiseClone() method. Enables cloning custom types. More...
 
virtual ASPOSECPP_SHARED_API const TypeInfoGetType () const
 Gets actual type of object. Analog of C# System.Object.GetType() call. More...
 
virtual ASPOSECPP_SHARED_API bool Is (const TypeInfo &targetType) const
 Check if object represents an instance of type described by targetType. Analog of C# 'is' operator. More...
 
virtual ASPOSECPP_SHARED_API void SetTemplateWeakPtr (uint32_t argument)
 Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode. More...
 
virtual ASPOSECPP_SHARED_API bool FastCast (const Details::FastRttiBase &helper, void **out_ptr) const
 For internal purposes only. More...
 
template<>
bool Equals (float const &objA, float const &objB)
 Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN. More...
 
template<>
bool Equals (double const &objA, double const &objB)
 Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN. More...
 
template<>
bool ReferenceEquals (String const &str, std::nullptr_t)
 Specialization of Object::ReferenceEquals for case of string and nullptr. More...
 
template<>
bool ReferenceEquals (String const &str1, String const &str2)
 Specialization of Object::ReferenceEquals for case of strings. More...
 

Protected Member Functions

ASPOSE_PDF_SHARED_API void BindPdf (System::SharedPtr< System::IO::Stream > srcStream, System::String password) override
 Initializes the facade. More...
 
ASPOSE_PDF_SHARED_API void BindPdf (System::String srcFile, System::String password) override
 Initializes the facade. More...
 
System::SharedPtr< System::Xml::XmlNodeGetFieldTemplate (System::String fieldName)
 
- Protected Member Functions inherited from Aspose::Pdf::Facades::SaveableFacade
ASPOSE_PDF_SHARED_API SaveableFacade ()
 The constructor. More...
 
ASPOSE_PDF_SHARED_API SaveableFacade (System::SharedPtr< Aspose::Pdf::Document > srcDoc)
 The constructor. More...
 
- Protected Member Functions inherited from Aspose::Pdf::Facades::Facade
bool get__IsObjectLicensed ()
 Gets licensed state of the system. Returns true is system works in licensed mode and false otherwise. More...
 
ASPOSE_PDF_SHARED_API Facade ()
 The constructor. More...
 
ASPOSE_PDF_SHARED_API Facade (System::SharedPtr< Aspose::Pdf::Document > srcDoc)
 The constructor. More...
 
virtual ASPOSE_PDF_SHARED_API void AssertDocument () const
 Asserts if the facade is initialized. More...
 
virtual ASPOSE_PDF_SHARED_API ~Facade ()
 

Static Protected Member Functions

static bool IsImageField (System::SharedPtr< Aspose::Pdf::Annotations::WidgetAnnotation > annotation)
 
static FieldType getFieldType (System::SharedPtr< Aspose::Pdf::Annotations::WidgetAnnotation > annotation)
 

Additional Inherited Members

- Static Public Member Functions inherited from System::Object
static bool ReferenceEquals (ptr const &objA, ptr const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, T const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, std::nullptr_t)
 Reference-compares value type object with nullptr. More...
 
template<typename T1 , typename T2 >
static std::enable_if< IsSmartPtr< T1 >::value &&IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares reference type objects in C# style. More...
 
template<typename T1 , typename T2 >
static std::enable_if<!IsSmartPtr< T1 >::value &&!IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares value type objects in C# style. More...
 
static const TypeInfoType ()
 Implements C# typeof(System.Object) construct. More...
 

Detailed Description

Class representing Acro form object.

Member Enumeration Documentation

◆ ImportStatus

Status of imported field

Enumerator
Success 

Field was successfully imported

FieldNotFound 

Field with this name was not found in the document form.

Constructor & Destructor Documentation

◆ Form() [1/12]

ASPOSE_PDF_SHARED_API Aspose::Pdf::Facades::Form::Form ( System::SharedPtr< System::IO::Stream srcStream,
System::SharedPtr< System::IO::Stream destStream 
)

Constructor of Form with two stream parameters. Specify same source and destination stream for incremental update.

Deprecated:
Use constructor without destination.
Parameters
srcStreamSource stream.
destStreamDestination stream.

◆ Form() [2/12]

ASPOSE_PDF_SHARED_API Aspose::Pdf::Facades::Form::Form ( )

Construtcor of Form without parameters.

◆ Form() [3/12]

ASPOSE_PDF_SHARED_API Aspose::Pdf::Facades::Form::Form ( System::String  srcFileName)

Constructor of Form.

Parameters
srcFileNameSource file path.

◆ Form() [4/12]

ASPOSE_PDF_SHARED_API Aspose::Pdf::Facades::Form::Form ( System::SharedPtr< System::IO::Stream srcStream)

Constructor for form.

Parameters
srcStreamsource stream.

◆ Form() [5/12]

ASPOSE_PDF_SHARED_API Aspose::Pdf::Facades::Form::Form ( System::String  srcFileName,
System::String  destFileName 
)

Constructor of Form class. Specify same source file name and destination file name to perform incremental update.

Deprecated:
Use constructor without destination.
Parameters
srcFileNamePath of the source file.
destFileNamePath of the destination file.

◆ Form() [6/12]

ASPOSE_PDF_SHARED_API Aspose::Pdf::Facades::Form::Form ( System::String  srcFileName,
System::SharedPtr< System::IO::Stream destStream 
)

Constructor of Form.

Deprecated:
Use constructor without destination.
Parameters
srcFileNameSource file path.
destStreamDestination file path.

◆ Form() [7/12]

ASPOSE_PDF_SHARED_API Aspose::Pdf::Facades::Form::Form ( System::SharedPtr< System::IO::Stream srcStream,
System::String  destFileName 
)

Constructor of Form

Deprecated:
Use constructor without destination.
Parameters
srcStreamSource stream.
destFileNameDestination file path.

◆ Form() [8/12]

ASPOSE_PDF_SHARED_API Aspose::Pdf::Facades::Form::Form ( System::SharedPtr< Aspose::Pdf::Document document)

Initializes new Form object on base of the document .

Parameters
documentPdf document.

◆ Form() [9/12]

ASPOSE_PDF_SHARED_API Aspose::Pdf::Facades::Form::Form ( System::SharedPtr< Aspose::Pdf::Document document,
System::String  destFileName 
)

Initializes new Form object on base of the document .

Deprecated:
Use constructor without destination.
Parameters
documentPdf document.
destFileNamePath of the destination file.

◆ Form() [10/12]

ASPOSE_PDF_SHARED_API Aspose::Pdf::Facades::Form::Form ( System::SharedPtr< Aspose::Pdf::Document document,
System::SharedPtr< System::IO::Stream destStream 
)

Initializes new Form object on base of the document .

Deprecated:
Use constructor without destination.
Parameters
documentPdf document.
destStreamDestination stream.

◆ Form() [11/12]

ASPOSE_PDF_SHARED_API Aspose::Pdf::Facades::Form::Form ( System::SharedPtr< System::IO::Stream inputStream,
System::SharedPtr< System::Web::HttpResponse response 
)

Creates form which will save result into HttpResponse object.

Deprecated:
Use constructor without destination.
Parameters
inputStreamStream containing source document.
responseHttpResponse object where result will be saved.

◆ Form() [12/12]

ASPOSE_PDF_SHARED_API Aspose::Pdf::Facades::Form::Form ( System::String  inputFile,
System::SharedPtr< System::Web::HttpResponse response 
)

Creates form which will save result into HttpResponse object.

Deprecated:
Use constructor without destination.
Parameters
inputFileName of input file.
responseHttpResponse object where result will be stored.

Member Function Documentation

◆ BindPdf() [1/2]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::Form::BindPdf ( System::SharedPtr< System::IO::Stream srcStream,
System::String  password 
)
overrideprotectedvirtual

Initializes the facade.

Parameters
srcStreamThe stream of PDF file.
passwordThe password of the PDF document.

Reimplemented from Aspose::Pdf::Facades::Facade.

◆ BindPdf() [2/2]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::Form::BindPdf ( System::String  srcFile,
System::String  password 
)
overrideprotectedvirtual

Initializes the facade.

Parameters
srcFileThe PDF file.
passwordThe password of the PDF document.

Reimplemented from Aspose::Pdf::Facades::Facade.

◆ Close()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::Form::Close ( )
overridevirtual

Closes opened files without any changes.

Reimplemented from Aspose::Pdf::Facades::Facade.

◆ ExportFdf()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::Form::ExportFdf ( System::SharedPtr< System::IO::Stream outputFdfStream)

Exports the content of the fields of the pdf into the fdf stream.

Parameters
outputFdfStreamThe output fdf stream.

◆ ExportXfdf()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::Form::ExportXfdf ( System::SharedPtr< System::IO::Stream outputXfdfStream)

Exports the content of the fields of the pdf into the xml stream. The button field's value will not be exported.

Parameters
outputXfdfStreamThe output xml stream.

◆ ExportXml()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::Form::ExportXml ( System::SharedPtr< System::IO::Stream outputXmlStream)

Exports the content of the fields of the pdf into the xml stream. The button field's value will not be exported.

Parameters
outputXmlStreamOutput Xml stream.

◆ ExtractXfaData()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::Form::ExtractXfaData ( System::SharedPtr< System::IO::Stream outputXmlStream)

Extracts XFA data packet

Parameters
outputXmlStreamStream where XML data will be stored.

◆ FillBarcodeField()

ASPOSE_PDF_SHARED_API bool Aspose::Pdf::Facades::Form::FillBarcodeField ( System::String  fieldName,
System::String  data 
)

Fill a barcode field according to its fully qualified field name.

Parameters
fieldNameThe fully qualified field name.
dataThe new barcode value.
Returns
If filling succeed, return true; otherwise, false.

◆ FillField() [1/5]

ASPOSE_PDF_SHARED_API bool Aspose::Pdf::Facades::Form::FillField ( System::String  fieldName,
System::String  fieldValue 
)

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.

Parameters
fieldNameThe field's name to be filled.
fieldValueThe field's value which must be a valid value for some fields.
Returns
true if field is found and filled successfully.

◆ FillField() [2/5]

ASPOSE_PDF_SHARED_API bool Aspose::Pdf::Facades::Form::FillField ( System::String  fieldName,
int32_t  index 
)

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.

Parameters
fieldNameName of field to be filled.
indexIndex of chosen item.
Returns
true if field was found and successfully filled.
Form form = new Form("PdfForm.pdf");
form.FillField("listboxField", 2);
form.FillField("comboboxField", 2);
form.FillField("radiobuttonField", 2);
//how to search field by its partial name:
Form form = new Form("input.pdf", "output.pdf");
foreach(string fieldName in form.FieldNames)
{
if (fieldName.EndsWith("ListBoxField"))
{
Console.WriteLine("Full name is: " + fieldName);
}
}

◆ FillField() [3/5]

ASPOSE_PDF_SHARED_API bool Aspose::Pdf::Facades::Form::FillField ( System::String  fieldName,
bool  beChecked 
)

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.

Parameters
fieldNameThe field's name to be filled.
beCheckedA boolean flag: true means to check the box, while false to uncheck it.
Returns
true if field was found and successfully filled.

◆ FillField() [4/5]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::Form::FillField ( System::String  fieldName,
System::ArrayPtr< System::String fieldValues 
)

Fill a field with multiple selections.Note: only for AcroForm List Box Field.

Parameters
fieldNameThe fully qualified field name.
fieldValuesA string array which contains several items to be selected.

◆ FillField() [5/5]

ASPOSE_PDF_SHARED_API bool Aspose::Pdf::Facades::Form::FillField ( System::String  fieldName,
System::String  value,
bool  fitFontSize 
)

Fills field with specified value.

Parameters
fieldNameName of field
valueNew value of the field
fitFontSizeIf true, the font size in the edit boxes will be fitted.
Returns
true if field was found and successfully filled.

◆ FillFields()

ASPOSE_PDF_SHARED_API bool Aspose::Pdf::Facades::Form::FillFields ( System::ArrayPtr< System::String fieldNames,
System::ArrayPtr< System::String fieldValues,
System::SharedPtr< System::IO::Stream > &  output 
)

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.

Parameters
fieldNamesNames of fields.
fieldValuesNew values of the fields.
outputStream where document will be saved.
Returns
true if fields was found and successfully filled.

◆ FillImageField() [1/2]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::Form::FillImageField ( System::String  fieldName,
System::String  imageFileName 
)

Pastes an image onto the existing button field as its appearance according to its fully qualified field name.

Parameters
fieldNameThe fully qualified field name of the image button field.
imageFileNameThe path of the image file, relative and absolute are both ok.

◆ FillImageField() [2/2]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::Form::FillImageField ( System::String  fieldName,
System::SharedPtr< System::IO::Stream imageStream 
)

Overloads function of FillImageField. The input is a image stream.

Parameters
fieldNameThe fully qualified field name.
imageStreamThe image's stream.

◆ FlattenAllFields()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::Form::FlattenAllFields ( )

Flattens all the fields.

◆ FlattenField()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::Form::FlattenField ( System::String  fieldName)

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.

Parameters
fieldNameThe name of the field to be flattened.

◆ get_AttachmentName()

ASPOSE_PDF_SHARED_API System::String Aspose::Pdf::Facades::Form::get_AttachmentName ( ) const

Gets name of attachment when result of operation is stored into HttpResponse objects as attachment.

◆ get_ContentDisposition()

ASPOSE_PDF_SHARED_API Aspose::Pdf::ContentDisposition Aspose::Pdf::Facades::Form::get_ContentDisposition ( ) const

Gets how content will be stored when result of operation is stored into HttpResponse object. Possible value: inline / attachment. Default: inline.

◆ get_DestFileName()

ASPOSE_PDF_SHARED_API System::String Aspose::Pdf::Facades::Form::get_DestFileName ( ) const

Gets destiination file name.

Deprecated:
Use Save(outputFile) method for getting facade results.

◆ get_DestStream()

ASPOSE_PDF_SHARED_API System::SharedPtr<System::IO::Stream> Aspose::Pdf::Facades::Form::get_DestStream ( ) const

Gets destination stream.

Deprecated:
Use Save(outputStream) method for getting facade results.

◆ get_FieldNames()

ASPOSE_PDF_SHARED_API System::ArrayPtr<System::String> Aspose::Pdf::Facades::Form::get_FieldNames ( )

Gets list of field names on the form.

◆ get_FormSubmitButtonNames()

ASPOSE_PDF_SHARED_API System::ArrayPtr<System::String> Aspose::Pdf::Facades::Form::get_FormSubmitButtonNames ( )

Gets all form submit button names.

◆ get_ImportResult()

ASPOSE_PDF_SHARED_API System::ArrayPtr<System::SharedPtr<Form::FormImportResult> > Aspose::Pdf::Facades::Form::get_ImportResult ( )

Result of last import operation. Array of objects which descibre result of import for each field.

◆ get_Response()

ASPOSE_PDF_SHARED_API System::SharedPtr<System::Web::HttpResponse> Aspose::Pdf::Facades::Form::get_Response ( ) const

Gets Response object where result of operation will be stored.

◆ get_SaveOptions()

ASPOSE_PDF_SHARED_API System::SharedPtr<Aspose::Pdf::SaveOptions> Aspose::Pdf::Facades::Form::get_SaveOptions ( ) const

Gets save options when result is stored as HttpResponse. Default value: PdfSaveOptions.

◆ get_SrcFileName()

ASPOSE_PDF_SHARED_API System::String Aspose::Pdf::Facades::Form::get_SrcFileName ( ) const

Gets source file name.

Deprecated:
Use BindPdf(inputFile) method for facade initialization.

◆ get_SrcStream()

ASPOSE_PDF_SHARED_API System::SharedPtr<System::IO::Stream> Aspose::Pdf::Facades::Form::get_SrcStream ( ) const

Gets source stream.

Deprecated:
Use BindPdf(inputStream) method for facade initialization.

◆ GetButtonOptionCurrentValue()

ASPOSE_PDF_SHARED_API System::String Aspose::Pdf::Facades::Form::GetButtonOptionCurrentValue ( System::String  fieldName)

Returns the current value for radio button option fields.

Parameters
fieldNameField Name
Returns
String value for the current radio group optino. See also GetButtonOptionValues

◆ GetButtonOptionValues()

ASPOSE_PDF_SHARED_API System::SharedPtr<System::Collections::Generic::Dictionary<System::String, System::String> > Aspose::Pdf::Facades::Form::GetButtonOptionValues ( System::String  fieldName)

Gets the radio button option fields and related values based on the field name. This method has meaning for radio button groups.

Parameters
fieldNameField Name
Returns
Hash table of option values keyed by form item name

◆ GetField()

ASPOSE_PDF_SHARED_API System::String Aspose::Pdf::Facades::Form::GetField ( System::String  fieldName)

Gets the field's value according to its field name.

Parameters
fieldNameThe fully qualified field name.
Returns
The field's value.

◆ GetFieldFacade()

ASPOSE_PDF_SHARED_API System::SharedPtr<FormFieldFacade> Aspose::Pdf::Facades::Form::GetFieldFacade ( System::String  fieldName)

Returns FrofmFieldFacade object containing all appearance attributes.

Parameters
fieldNameName of field to read.
Returns
FormFieldFacade object

◆ GetFieldFlag()

ASPOSE_PDF_SHARED_API PropertyFlag Aspose::Pdf::Facades::Form::GetFieldFlag ( System::String  fieldName)

Returns flags of the field.

Parameters
fieldNameField name
Returns
Property flag (ReadOnly/ Required/NoExport

◆ GetFieldLimit()

ASPOSE_PDF_SHARED_API int32_t Aspose::Pdf::Facades::Form::GetFieldLimit ( System::String  fieldName)

Get the limitation of text field.

Parameters
fieldNameThe qualified field name.
Returns
Return the limitation number of characters a text field can be filled. It not set, return 0.

◆ GetFieldTemplate()

System::SharedPtr<System::Xml::XmlNode> Aspose::Pdf::Facades::Form::GetFieldTemplate ( System::String  fieldName)
protected

◆ GetFieldType()

ASPOSE_PDF_SHARED_API FieldType Aspose::Pdf::Facades::Form::GetFieldType ( System::String  fieldName)

Returns type of field.

Parameters
fieldNameField name.
Returns
Element of FileType enumeration corresponding to field type.

◆ getFieldType()

static FieldType Aspose::Pdf::Facades::Form::getFieldType ( System::SharedPtr< Aspose::Pdf::Annotations::WidgetAnnotation annotation)
staticprotected

◆ GetFullFieldName()

ASPOSE_PDF_SHARED_API System::String Aspose::Pdf::Facades::Form::GetFullFieldName ( System::String  fieldName)

Gets the full field name according to its short field name.

Parameters
fieldNameThe fully qualified field name.
Returns
The full field name.

◆ GetRichText()

ASPOSE_PDF_SHARED_API System::String Aspose::Pdf::Facades::Form::GetRichText ( System::String  fieldName)

Get a Rich Text field's value, including the formattinf information of every character.

Parameters
fieldNameThe fully qualified field name of the Rich Text field.
Returns
Return a string containing formatting information of the Rich Text field.

◆ GetSubmitFlags()

ASPOSE_PDF_SHARED_API SubmitFormFlag Aspose::Pdf::Facades::Form::GetSubmitFlags ( System::String  fieldName)

Returns the submit button's submission flags

Parameters
fieldNameThe qualified field name.
Returns
Submission flags of the button.

◆ ImportFdf()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::Form::ImportFdf ( System::SharedPtr< System::IO::Stream inputFdfStream)

Imports the content of the fields from the fdf file and put them into the new pdf.

Parameters
inputFdfStreamThe input fdf stream.

◆ ImportXfdf()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::Form::ImportXfdf ( System::SharedPtr< System::IO::Stream inputXfdfStream)

Imports the content of the fields from the xfdf(xml) file and put them into the new pdf.

Parameters
inputXfdfStreamThe input xfdf(xml) stream.

◆ ImportXml() [1/2]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::Form::ImportXml ( System::SharedPtr< System::IO::Stream inputXmlStream)

Imports the content of the fields from the xml file and put them into the new pdf.

Parameters
inputXmlStreamStream from which XML for import is read.

◆ ImportXml() [2/2]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::Form::ImportXml ( System::SharedPtr< System::IO::Stream inputXmlStream,
bool  IgnoreFormTemplateChanges 
)

Imports the content of the fields from the xml file and put them into the new pdf.

Parameters
inputXmlStreamThe input xml stream.
IgnoreFormTemplateChangesIf this parameter is true then all changes of the XFA form template will not be saved

◆ IsImageField()

static bool Aspose::Pdf::Facades::Form::IsImageField ( System::SharedPtr< Aspose::Pdf::Annotations::WidgetAnnotation annotation)
staticprotected

◆ IsRequiredField()

ASPOSE_PDF_SHARED_API bool Aspose::Pdf::Facades::Form::IsRequiredField ( System::String  fieldName)

Determines whether field is required or not.

Parameters
fieldNameThe name of field.
Returns
True - the field is required; otherwise, false.

◆ RenameField()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::Form::RenameField ( System::String  fieldName,
System::String  newFieldName 
)

Renames a field. Either AcroForm field or XFA field is OK.

Parameters
fieldNamethe old field name
newFieldNamethe new field name

◆ Save() [1/3]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::Form::Save ( )

Saves the value of the filled fields and close the opened Pdf document.

Deprecated:
Use Save(destination) method for saving facade results.

◆ Save() [2/3]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::Form::Save ( System::String  destFile)
overridevirtual

Saves document into specified file.

Parameters
destFileFile where document will be saved.

Reimplemented from Aspose::Pdf::Facades::SaveableFacade.

◆ Save() [3/3]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::Form::Save ( System::SharedPtr< System::IO::Stream destStream)
overridevirtual

Saves document into specified stream.

Parameters
destStreamStream where document will be saved.

Reimplemented from Aspose::Pdf::Facades::SaveableFacade.

◆ set_AttachmentName()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::Form::set_AttachmentName ( System::String  value)

Sets name of attachment when result of operation is stored into HttpResponse objects as attachment.

◆ set_ContentDisposition()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::Form::set_ContentDisposition ( Aspose::Pdf::ContentDisposition  value)

Sets how content will be stored when result of operation is stored into HttpResponse object. Possible value: inline / attachment. Default: inline.

◆ set_ConvertTo()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::Form::set_ConvertTo ( PdfFormat  value)

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.

◆ set_DestFileName()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::Form::set_DestFileName ( System::String  value)

Sets destiination file name.

Deprecated:
Use Save(outputFile) method for getting facade results.

◆ set_DestStream()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::Form::set_DestStream ( System::SharedPtr< System::IO::Stream value)

Sets destination stream.

Deprecated:
Use Save(outputStream) method for getting facade results.

◆ set_Response()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::Form::set_Response ( System::SharedPtr< System::Web::HttpResponse value)

Sets Response object where result of operation will be stored.

◆ set_SaveOptions()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::Form::set_SaveOptions ( System::SharedPtr< Aspose::Pdf::SaveOptions value)

Sets save options when result is stored as HttpResponse. Default value: PdfSaveOptions.

◆ set_SrcFileName()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::Form::set_SrcFileName ( System::String  value)

Sets source file name.

Deprecated:
Use BindPdf(inputFile) method for facade initialization.

◆ set_SrcStream()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::Form::set_SrcStream ( System::SharedPtr< System::IO::Stream value)

Sets source stream.

Deprecated:
Use BindPdf(inputStream) method for facade initialization.

◆ SetXfaData()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::Form::SetXfaData ( System::SharedPtr< System::IO::Stream inputXmlStream)

Replaces XFA data with specified data packet. Data packet may be extracted using ExtractXfaData.

Parameters
inputXmlStreamStream where XML is stored.