Aspose::Pdf::Facades::FormEditor Class Referencefinal

Class for editing forms (ading/deleting field etc) More...

#include "FormEditor.h"

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

Public Member Functions

ASPOSE_PDF_SHARED_API System::String get_SrcFileName () const
 Gets name of source file. More...
 
ASPOSE_PDF_SHARED_API void set_SrcFileName (System::String value)
 Sets name of source file. More...
 
ASPOSE_PDF_SHARED_API System::String get_DestFileName () const
 Gets destination file name. More...
 
ASPOSE_PDF_SHARED_API void set_DestFileName (System::String value)
 Sets destination 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 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::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_Items () const
 Sets items which will be added t onewly created list box or combo box. More...
 
ASPOSE_PDF_SHARED_API void set_Items (System::ArrayPtr< System::String > value)
 Sets items which will be added t onewly created list box or combo box. More...
 
ASPOSE_PDF_SHARED_API System::ArrayPtr< System::ArrayPtr< System::String > > get_ExportItems () const
 Sets options for combo box with export values. More...
 
ASPOSE_PDF_SHARED_API void set_ExportItems (System::ArrayPtr< System::ArrayPtr< System::String >> value)
 Sets options for combo box with export values. More...
 
ASPOSE_PDF_SHARED_API System::SharedPtr< FormFieldFacadeget_Facade () const
 Sets visual attributes of the field. More...
 
ASPOSE_PDF_SHARED_API void set_Facade (System::SharedPtr< FormFieldFacade > value)
 Sets visual attributes of the field. More...
 
ASPOSE_PDF_SHARED_API float get_RadioGap ()
 The member to record the gap between two neighboring radio buttons in pixels,default is 50. More...
 
ASPOSE_PDF_SHARED_API void set_RadioGap (float value)
 The member to record the gap between two neighboring radio buttons in pixels,default is 50. More...
 
ASPOSE_PDF_SHARED_API bool get_RadioHoriz () const
 The flag to indicate whether the radios are arranged horizontally or vertically, default value is true. More...
 
ASPOSE_PDF_SHARED_API void set_RadioHoriz (bool value)
 The flag to indicate whether the radios are arranged horizontally or vertically, default value is true. More...
 
ASPOSE_PDF_SHARED_API double get_RadioButtonItemSize () const
 Gets size of radio button item size (when new radio button field is added).
formEditor = new Aspose.Pdf.Facades.FormEditor("PdfForm.pdf", "FormEditor_AddField_RadioButton.pdf");
formEditor.RadioGap = 4;
formEditor.RadioHoriz = false;
formEditor.RadioButtonItemSize = 20;
formEditor.Items = new string[] { "First", "Second", "Third" };
formEditor.AddField(FieldType.Radio, "AddedRadioButtonField", "Second", 1, 10, 30, 110, 130);
formEditor.Save();
More...
 
ASPOSE_PDF_SHARED_API void set_RadioButtonItemSize (double value)
 Sets size of radio button item size (when new radio button field is added).
formEditor = new Aspose.Pdf.Facades.FormEditor("PdfForm.pdf", "FormEditor_AddField_RadioButton.pdf");
formEditor.RadioGap = 4;
formEditor.RadioHoriz = false;
formEditor.RadioButtonItemSize = 20;
formEditor.Items = new string[] { "First", "Second", "Third" };
formEditor.AddField(FieldType.Radio, "AddedRadioButtonField", "Second", 1, 10, 30, 110, 130);
formEditor.Save();
More...
 
ASPOSE_PDF_SHARED_API SubmitFormFlag get_SubmitFlag () const
 Set the submit button's submission flags More...
 
ASPOSE_PDF_SHARED_API void set_SubmitFlag (SubmitFormFlag value)
 Set the submit button's submission flags 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 FormEditor (System::SharedPtr< System::IO::Stream > srcStream, System::SharedPtr< System::IO::Stream > destStream)
 Constructor for FormEditor. More...
 
ASPOSE_PDF_SHARED_API FormEditor (System::String srcFileName, System::String destFileName)
 Constructor for FormEditor More...
 
ASPOSE_PDF_SHARED_API FormEditor ()
 Constructor for FormEditor. More...
 
ASPOSE_PDF_SHARED_API void Save ()
 Saves changes into destination file. More...
 
ASPOSE_PDF_SHARED_API bool SetFieldAttribute (System::String fieldName, PropertyFlag flag)
 Set attributes of field. More...
 
ASPOSE_PDF_SHARED_API bool SetFieldAppearance (System::String fieldName, Aspose::Pdf::Annotations::AnnotationFlags flags)
 Set field flags More...
 
ASPOSE_PDF_SHARED_API Aspose::Pdf::Annotations::AnnotationFlags GetFieldAppearance (System::String fieldName)
 Get field flags. More...
 
ASPOSE_PDF_SHARED_API bool SetSubmitFlag (System::String fieldName, SubmitFormFlag submitFormFlag)
 Set submit flag of submit button. More...
 
ASPOSE_PDF_SHARED_API bool SetSubmitUrl (System::String fieldName, System::String url)
 Sets URL of the button. More...
 
ASPOSE_PDF_SHARED_API bool SetFieldLimit (System::String fieldName, int32_t fieldLimit)
 Sets maximum character count of the text field. More...
 
ASPOSE_PDF_SHARED_API bool SetFieldCombNumber (System::String fieldName, int32_t combNumber)
 Sets number of combs for a regular single-line text field (the field is automatically divided into as many equally spaced positions, or combs, as the value of combNumber parameter). More...
 
ASPOSE_PDF_SHARED_API bool MoveField (System::String fieldName, float llx, float lly, float urx, float ury)
 Set new position of field. More...
 
ASPOSE_PDF_SHARED_API bool AddField (FieldType fieldType, System::String fieldName, int32_t pageNum, float llx, float lly, float urx, float ury)
 Add field of specified type to the form. More...
 
ASPOSE_PDF_SHARED_API bool AddField (FieldType fieldType, System::String fieldName, System::String initValue, int32_t pageNum, float llx, float lly, float urx, float ury)
 Add field of specified type to the form. More...
 
ASPOSE_PDF_SHARED_API void RemoveField (System::String fieldName)
 Remove field from the form. More...
 
ASPOSE_PDF_SHARED_API void ResetFacade ()
 Reset all visual attribtues to empty value. More...
 
ASPOSE_PDF_SHARED_API void ResetInnerFacade ()
 Reset all visual attribtues of inner facade to empty value. More...
 
ASPOSE_PDF_SHARED_API void CopyInnerField (System::String fieldName, System::String newFieldName, int32_t pageNum)
 Copies an existing field to the same position in specified page number. A new document will be produced, which contains everything the source document has except for the newly copied field. More...
 
ASPOSE_PDF_SHARED_API void CopyInnerField (System::String fieldName, System::String newFieldName, int32_t pageNum, float abscissa, float ordinate)
 Copies an existing field to a new position specified by both page number and ordinates. A new document will be produced, which contains everything the source document has except for the newly copied field. More...
 
ASPOSE_PDF_SHARED_API void CopyOuterField (System::String srcFileName, System::String fieldName)
 Copies an existing field from one PDF document to another document with original page number and ordinates. Notice: Only for AcroForm fields (excluding radio box). More...
 
ASPOSE_PDF_SHARED_API void CopyOuterField (System::String srcFileName, System::String fieldName, int32_t pageNum)
 Copies an existing field from one PDF document to another document with specified page number and original ordinates. Notice: Only for AcroForm fields (excluding radio box). More...
 
ASPOSE_PDF_SHARED_API void CopyOuterField (System::String srcFileName, System::String fieldName, int32_t pageNum, float abscissa, float ordinate)
 Copies an existing field from one PDF document to another document with specified page number and ordinates. Notice: Only for AcroForm fields (excluding radio box). More...
 
ASPOSE_PDF_SHARED_API void DecorateField (System::String fieldName)
 Changes visual attributes of the specified field. More...
 
ASPOSE_PDF_SHARED_API void DecorateField (FieldType fieldType)
 Changes visual attributes of all fields with the specified field type. More...
 
ASPOSE_PDF_SHARED_API void DecorateField ()
 Changes visual attributes of all fields in the PDF document. More...
 
ASPOSE_PDF_SHARED_API void RenameField (System::String fieldName, System::String newFieldName)
 Change name of the field. More...
 
ASPOSE_PDF_SHARED_API void RemoveFieldAction (System::String fieldName)
 Remove submit action of the field. More...
 
ASPOSE_PDF_SHARED_API void AddSubmitBtn (System::String fieldName, int32_t page, System::String label, System::String url, float llx, float lly, float urx, float ury)
 Add submit button on the form. More...
 
ASPOSE_PDF_SHARED_API void AddListItem (System::String fieldName, System::String itemName)
 Adds new item to the list box. More...
 
ASPOSE_PDF_SHARED_API void AddListItem (System::String fieldName, System::ArrayPtr< System::String > exportName)
 Add a new item with Export value to the existing list box field, only for AcroForm combo box field. More...
 
ASPOSE_PDF_SHARED_API void DelListItem (System::String fieldName, System::String itemName)
 Delete item from the list field. More...
 
ASPOSE_PDF_SHARED_API bool SetFieldScript (System::String fieldName, System::String script)
 Set JavaScript for a PushButton field. If old JavaScript existed, it will be replaced by the new one. More...
 
ASPOSE_PDF_SHARED_API bool AddFieldScript (System::String fieldName, System::String script)
 Add JavaScript for a PushButton field. If old event exists, new event is added after it. More...
 
ASPOSE_PDF_SHARED_API bool Single2Multiple (System::String fieldName)
 Change a single-lined text field to a multiple-lined one. More...
 
ASPOSE_PDF_SHARED_API bool SetFieldAlignment (System::String fieldName, int32_t alignment)
 Set the alignment style of a text field. More...
 
ASPOSE_PDF_SHARED_API bool SetFieldAlignmentV (System::String fieldName, int32_t alignment)
 Set the vertical alignment style of a text field. More...
 
ASPOSE_PDF_SHARED_API FormEditor (System::SharedPtr< Aspose::Pdf::Document > document)
 Initializes new FormEditor object on base of the document . More...
 
ASPOSE_PDF_SHARED_API FormEditor (System::SharedPtr< Aspose::Pdf::Document > document, System::String destFileName)
 Initializes new FormEditor object on base of the document . More...
 
ASPOSE_PDF_SHARED_API FormEditor (System::SharedPtr< Aspose::Pdf::Document > document, System::SharedPtr< System::IO::Stream > destStream)
 Initializes new FormEditor object on base of the document . More...
 
ASPOSE_PDF_SHARED_API FormEditor (System::SharedPtr< System::IO::Stream > inputStream, System::SharedPtr< System::Web::HttpResponse > response)
 Creates FormEditor which will save result into HttpResponse object. More...
 
ASPOSE_PDF_SHARED_API FormEditor (System::String inputFile, System::SharedPtr< System::Web::HttpResponse > response)
 Creates FormEditor which will save result into HttpResponse object. More...
 
ASPOSE_PDF_SHARED_API void Close () override
 Closes the facade. More...
 
- Public Member Functions inherited from Aspose::Pdf::Facades::SaveableFacade
ASPOSE_PDF_SHARED_API void Save (System::String destFile) override
 Saves the PDF document to the specified file. More...
 
ASPOSE_PDF_SHARED_API void Save (System::SharedPtr< System::IO::Stream > destStream) override
 Saves the PDF document to the specified stream. 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...
 

Additional Inherited Members

- Public Types inherited from System::Object
typedef SmartPtr< Objectptr
 Alias for smart pointer type. More...
 
- 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...
 
- 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 BindPdf (System::String srcFile, System::String password)
 Initializes the facade. More...
 
virtual ASPOSE_PDF_SHARED_API void BindPdf (System::SharedPtr< System::IO::Stream > srcStream, System::String password)
 Initializes the facade. More...
 
virtual ASPOSE_PDF_SHARED_API void AssertDocument () const
 Asserts if the facade is initialized. More...
 
virtual ASPOSE_PDF_SHARED_API ~Facade ()
 

Detailed Description

Class for editing forms (ading/deleting field etc)

Constructor & Destructor Documentation

◆ FormEditor() [1/8]

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

Constructor for FormEditor.

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

◆ FormEditor() [2/8]

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

Constructor for FormEditor

Deprecated:
Use constructor without destination.
Parameters
srcFileNameName of source file.
destFileNameName of destination file.

◆ FormEditor() [3/8]

ASPOSE_PDF_SHARED_API Aspose::Pdf::Facades::FormEditor::FormEditor ( )

Constructor for FormEditor.

◆ FormEditor() [4/8]

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

Initializes new FormEditor object on base of the document .

Parameters
documentPdf document.

◆ FormEditor() [5/8]

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

Initializes new FormEditor object on base of the document .

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

◆ FormEditor() [6/8]

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

Initializes new FormEditor object on base of the document .

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

◆ FormEditor() [7/8]

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

Creates FormEditor which will save result into HttpResponse object.

Deprecated:
Use constructor without destination.
Parameters
inputStreamSource stream.
responseHttpResponse object where result will be saved.

◆ FormEditor() [8/8]

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

Creates FormEditor which will save result into HttpResponse object.

Deprecated:
Use constructor without destination.
Parameters
inputFileSource file name.
responseHttpResponse objects where result be saved.

Member Function Documentation

◆ AddField() [1/2]

ASPOSE_PDF_SHARED_API bool Aspose::Pdf::Facades::FormEditor::AddField ( FieldType  fieldType,
System::String  fieldName,
int32_t  pageNum,
float  llx,
float  lly,
float  urx,
float  ury 
)

Add field of specified type to the form.

Parameters
fieldTypeType of the field which must be added.
fieldNameName of the field whic must be added.
pageNumPage number where new field must be placed.
llxAbscissa of the lower-left corner of the field.
llyOrdinate of the lower-left corner of the field.
urxAbscissa of the upper-right corner of the field.
uryOrdinate of the upper-right corner of the field.
Returns
true if field was successfully added.

◆ AddField() [2/2]

ASPOSE_PDF_SHARED_API bool Aspose::Pdf::Facades::FormEditor::AddField ( FieldType  fieldType,
System::String  fieldName,
System::String  initValue,
int32_t  pageNum,
float  llx,
float  lly,
float  urx,
float  ury 
)

Add field of specified type to the form.

Parameters
fieldTypeType of the field which must be added.
fieldNameName of the field whic must be added.
initValueInitial value of the field.
pageNumPage number where new field must be placed.
llxAbscissa of the lower-left corner of the field.
llyOrdinate of the lower-left corner of the field.
urxAbscissa of the upper-right corner of the field.
uryOrdinate of the upper-right corner of the field.
Returns
true if field was successfully added.

///

◆ AddFieldScript()

ASPOSE_PDF_SHARED_API bool Aspose::Pdf::Facades::FormEditor::AddFieldScript ( System::String  fieldName,
System::String  script 
)

Add JavaScript for a PushButton field. If old event exists, new event is added after it.

Parameters
fieldNameThe fully qualified field name.
scriptThe Java script to be added/placed into a push button field.
Returns
True in case script was added successfully.

◆ AddListItem() [1/2]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::FormEditor::AddListItem ( System::String  fieldName,
System::String  itemName 
)

Adds new item to the list box.

Parameters
fieldNameName of the field ot which new item will be added.
itemNameName if new item.

◆ AddListItem() [2/2]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::FormEditor::AddListItem ( System::String  fieldName,
System::ArrayPtr< System::String exportName 
)

Add a new item with Export value to the existing list box field, only for AcroForm combo box field.

Parameters
fieldNameName of field to which items will be added.
exportNameA string array denoting a new list item with Export Value, i.e. (Item Label, Export Value).

◆ AddSubmitBtn()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::FormEditor::AddSubmitBtn ( System::String  fieldName,
int32_t  page,
System::String  label,
System::String  url,
float  llx,
float  lly,
float  urx,
float  ury 
)

Add submit button on the form.

Parameters
fieldNameName of new button.
pagePage where button will be placed.
labelButton caption.
urlURL of the submit button.
llxAbscissa of the lower-left corner.
llyOrdinate of the lower-left corner.
urxAbscissa of the upper-right corner.
uryOrdinate of the upper-right corner.

◆ Close()

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

Closes the facade.

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

◆ CopyInnerField() [1/2]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::FormEditor::CopyInnerField ( System::String  fieldName,
System::String  newFieldName,
int32_t  pageNum 
)

Copies an existing field to the same position in specified page number. A new document will be produced, which contains everything the source document has except for the newly copied field.

Parameters
fieldNameThe old fully qualified field name.
newFieldNameThe new fully qualified field name. If null, it will be set as fieldName + "~".
pageNumThe number of page to hold the new field. If -1, new field will be copid to the same page as old one hosted.

◆ CopyInnerField() [2/2]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::FormEditor::CopyInnerField ( System::String  fieldName,
System::String  newFieldName,
int32_t  pageNum,
float  abscissa,
float  ordinate 
)

Copies an existing field to a new position specified by both page number and ordinates. A new document will be produced, which contains everything the source document has except for the newly copied field.

Parameters
fieldNameThe old fully qualified field name.
newFieldNameThe new fully qualified field name. If null, it will be set as fieldName + "~".
pageNumThe number of page to hold the new field. If -1, new field will be copid to the same page as old one hosted.
abscissaThe abscissa of the new field. If -1, the abscissa will be equaled to the original one.
ordinateThe ordinate of the new field. If -1, the ordinate will be equaled to the original one.

◆ CopyOuterField() [1/3]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::FormEditor::CopyOuterField ( System::String  srcFileName,
System::String  fieldName 
)

Copies an existing field from one PDF document to another document with original page number and ordinates. Notice: Only for AcroForm fields (excluding radio box).

Parameters
srcFileNameThe name of PDF document which containes the field to be copied.
fieldNameThe original fully qualified field name.

◆ CopyOuterField() [2/3]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::FormEditor::CopyOuterField ( System::String  srcFileName,
System::String  fieldName,
int32_t  pageNum 
)

Copies an existing field from one PDF document to another document with specified page number and original ordinates. Notice: Only for AcroForm fields (excluding radio box).

Parameters
srcFileNameThe name of PDF document which containes the field to be copied.
fieldNameThe original fully qualified field name.
pageNumThe number of page to hold the new field. If -1, new field will be copid to the same page as old one hosted.

◆ CopyOuterField() [3/3]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::FormEditor::CopyOuterField ( System::String  srcFileName,
System::String  fieldName,
int32_t  pageNum,
float  abscissa,
float  ordinate 
)

Copies an existing field from one PDF document to another document with specified page number and ordinates. Notice: Only for AcroForm fields (excluding radio box).

Parameters
srcFileNameThe name of PDF document which containes the field to be copied.
fieldNameThe original fully qualified field name.
pageNumThe number of page to hold the new field. If -1, new field will be copid to the same page as old one hosted.
abscissaThe abscissa of the new field. If -1, the abscissa will be equaled to the original one.
ordinateThe ordinate of the new field. If -1, the ordinate will be equaled to the original one.

◆ DecorateField() [1/3]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::FormEditor::DecorateField ( System::String  fieldName)

Changes visual attributes of the specified field.

Parameters
fieldNameThe fully qualified field name.

◆ DecorateField() [2/3]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::FormEditor::DecorateField ( FieldType  fieldType)

Changes visual attributes of all fields with the specified field type.

Parameters
fieldTypeType of fields which will be decorated.

◆ DecorateField() [3/3]

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::FormEditor::DecorateField ( )

Changes visual attributes of all fields in the PDF document.

◆ DelListItem()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::FormEditor::DelListItem ( System::String  fieldName,
System::String  itemName 
)

Delete item from the list field.

Parameters
fieldNameName of the field.
itemNameName of the item which must be deleted.

◆ get_AttachmentName()

ASPOSE_PDF_SHARED_API System::String Aspose::Pdf::Facades::FormEditor::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::FormEditor::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::FormEditor::get_DestFileName ( ) const

Gets destination 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::FormEditor::get_DestStream ( ) const

Gets destination stream.

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

◆ get_ExportItems()

ASPOSE_PDF_SHARED_API System::ArrayPtr<System::ArrayPtr<System::String> > Aspose::Pdf::Facades::FormEditor::get_ExportItems ( ) const

Sets options for combo box with export values.

◆ get_Facade()

ASPOSE_PDF_SHARED_API System::SharedPtr<FormFieldFacade> Aspose::Pdf::Facades::FormEditor::get_Facade ( ) const

Sets visual attributes of the field.

◆ get_Items()

ASPOSE_PDF_SHARED_API System::ArrayPtr<System::String> Aspose::Pdf::Facades::FormEditor::get_Items ( ) const

Sets items which will be added t onewly created list box or combo box.

◆ get_RadioButtonItemSize()

ASPOSE_PDF_SHARED_API double Aspose::Pdf::Facades::FormEditor::get_RadioButtonItemSize ( ) const

Gets size of radio button item size (when new radio button field is added).

formEditor = new Aspose.Pdf.Facades.FormEditor("PdfForm.pdf", "FormEditor_AddField_RadioButton.pdf");
formEditor.RadioGap = 4;
formEditor.RadioHoriz = false;
formEditor.RadioButtonItemSize = 20;
formEditor.Items = new string[] { "First", "Second", "Third" };
formEditor.AddField(FieldType.Radio, "AddedRadioButtonField", "Second", 1, 10, 30, 110, 130);
formEditor.Save();

◆ get_RadioGap()

ASPOSE_PDF_SHARED_API float Aspose::Pdf::Facades::FormEditor::get_RadioGap ( )

The member to record the gap between two neighboring radio buttons in pixels,default is 50.

◆ get_RadioHoriz()

ASPOSE_PDF_SHARED_API bool Aspose::Pdf::Facades::FormEditor::get_RadioHoriz ( ) const

The flag to indicate whether the radios are arranged horizontally or vertically, default value is true.

◆ get_Response()

ASPOSE_PDF_SHARED_API System::SharedPtr<System::Web::HttpResponse> Aspose::Pdf::Facades::FormEditor::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::FormEditor::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::FormEditor::get_SrcFileName ( ) const

Gets name of source file.

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

◆ get_SrcStream()

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

Gets source stream.

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

◆ get_SubmitFlag()

ASPOSE_PDF_SHARED_API SubmitFormFlag Aspose::Pdf::Facades::FormEditor::get_SubmitFlag ( ) const

Set the submit button's submission flags

◆ GetFieldAppearance()

ASPOSE_PDF_SHARED_API Aspose::Pdf::Annotations::AnnotationFlags Aspose::Pdf::Facades::FormEditor::GetFieldAppearance ( System::String  fieldName)

Get field flags.

Parameters
fieldNameName of the field.
Returns
Set of field flags

◆ MoveField()

ASPOSE_PDF_SHARED_API bool Aspose::Pdf::Facades::FormEditor::MoveField ( System::String  fieldName,
float  llx,
float  lly,
float  urx,
float  ury 
)

Set new position of field.

Parameters
fieldNameName of field which must be moved.
llxAbscissa of the lower-left corner of the field.
llyOrdinate of the lower-left coerner of the field.
urxAbscissa of the upper-right corner of the field.
uryOrdinate of the upper-right corner of the field.
Returns
true if field position was changed successfully.

◆ RemoveField()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::FormEditor::RemoveField ( System::String  fieldName)

Remove field from the form.

Parameters
fieldNameName of the field which must be removed.

◆ RemoveFieldAction()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::FormEditor::RemoveFieldAction ( System::String  fieldName)

Remove submit action of the field.

Parameters
fieldNameName of the field.

◆ RenameField()

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

Change name of the field.

Parameters
fieldNameOld name of the field.
newFieldNameNew name of the field.

◆ ResetFacade()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::FormEditor::ResetFacade ( )

Reset all visual attribtues to empty value.

◆ ResetInnerFacade()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::FormEditor::ResetInnerFacade ( )

Reset all visual attribtues of inner facade to empty value.

◆ Save()

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

Saves changes into destination file.

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

FormEditor formEditor = new FormEditor("InFile.pdf", "OutFile.pdf"); //make some changes... formEditor.Save();

◆ set_AttachmentName()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::FormEditor::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::FormEditor::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::FormEditor::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::FormEditor::set_DestFileName ( System::String  value)

Sets destination file name.

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

◆ set_DestStream()

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

Sets destination stream.

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

◆ set_ExportItems()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::FormEditor::set_ExportItems ( System::ArrayPtr< System::ArrayPtr< System::String >>  value)

Sets options for combo box with export values.

◆ set_Facade()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::FormEditor::set_Facade ( System::SharedPtr< FormFieldFacade value)

Sets visual attributes of the field.

◆ set_Items()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::FormEditor::set_Items ( System::ArrayPtr< System::String value)

Sets items which will be added t onewly created list box or combo box.

◆ set_RadioButtonItemSize()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::FormEditor::set_RadioButtonItemSize ( double  value)

Sets size of radio button item size (when new radio button field is added).

formEditor = new Aspose.Pdf.Facades.FormEditor("PdfForm.pdf", "FormEditor_AddField_RadioButton.pdf");
formEditor.RadioGap = 4;
formEditor.RadioHoriz = false;
formEditor.RadioButtonItemSize = 20;
formEditor.Items = new string[] { "First", "Second", "Third" };
formEditor.AddField(FieldType.Radio, "AddedRadioButtonField", "Second", 1, 10, 30, 110, 130);
formEditor.Save();

◆ set_RadioGap()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::FormEditor::set_RadioGap ( float  value)

The member to record the gap between two neighboring radio buttons in pixels,default is 50.

◆ set_RadioHoriz()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::FormEditor::set_RadioHoriz ( bool  value)

The flag to indicate whether the radios are arranged horizontally or vertically, default value is true.

◆ set_Response()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::FormEditor::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::FormEditor::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::FormEditor::set_SrcFileName ( System::String  value)

Sets name of source file.

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

◆ set_SrcStream()

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

Sets source stream.

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

◆ set_SubmitFlag()

ASPOSE_PDF_SHARED_API void Aspose::Pdf::Facades::FormEditor::set_SubmitFlag ( SubmitFormFlag  value)

Set the submit button's submission flags

◆ SetFieldAlignment()

ASPOSE_PDF_SHARED_API bool Aspose::Pdf::Facades::FormEditor::SetFieldAlignment ( System::String  fieldName,
int32_t  alignment 
)

Set the alignment style of a text field.

Parameters
fieldNameThe qualified field name.
alignmentThe alignment style definition, including FormFieldFacade.AlignLeft, FormFieldFacade.AlignCenter and FormFieldFacade.AlignRight.
Returns
true if true if field was found and alignment was set.

◆ SetFieldAlignmentV()

ASPOSE_PDF_SHARED_API bool Aspose::Pdf::Facades::FormEditor::SetFieldAlignmentV ( System::String  fieldName,
int32_t  alignment 
)

Set the vertical alignment style of a text field.

Parameters
fieldNameThe qualified field name.
alignmentThe alignment style definition, including FormFieldFacade.AlignTop, FormFieldFacade.AlignMiddle and FormFieldFacade.AlignRight.
Returns
true if field was found and alignment was successfully filled.

◆ SetFieldAppearance()

ASPOSE_PDF_SHARED_API bool Aspose::Pdf::Facades::FormEditor::SetFieldAppearance ( System::String  fieldName,
Aspose::Pdf::Annotations::AnnotationFlags  flags 
)

Set field flags

Parameters
fieldNameName of field whose flags should be updated.
flagsFlag of the field.
Returns
true if flags were updated successfully.

◆ SetFieldAttribute()

ASPOSE_PDF_SHARED_API bool Aspose::Pdf::Facades::FormEditor::SetFieldAttribute ( System::String  fieldName,
PropertyFlag  flag 
)

Set attributes of field.

Parameters
fieldNameName of field which attributes should be set.
flagFlag (NoExport/ReadOnly/Required)
Returns
true if attribute was set successfully.

◆ SetFieldCombNumber()

ASPOSE_PDF_SHARED_API bool Aspose::Pdf::Facades::FormEditor::SetFieldCombNumber ( System::String  fieldName,
int32_t  combNumber 
)

Sets number of combs for a regular single-line text field (the field is automatically divided into as many equally spaced positions, or combs, as the value of combNumber parameter).

Parameters
fieldNameThe qualified field name.
combNumberThe number of combs to divide the field into.
Returns
If success, return true;else false.

◆ SetFieldLimit()

ASPOSE_PDF_SHARED_API bool Aspose::Pdf::Facades::FormEditor::SetFieldLimit ( System::String  fieldName,
int32_t  fieldLimit 
)

Sets maximum character count of the text field.

Parameters
fieldNameName of the text field.
fieldLimitNew value of limit for the field.
Returns
true if field limit was successfully set.

◆ SetFieldScript()

ASPOSE_PDF_SHARED_API bool Aspose::Pdf::Facades::FormEditor::SetFieldScript ( System::String  fieldName,
System::String  script 
)

Set JavaScript for a PushButton field. If old JavaScript existed, it will be replaced by the new one.

Parameters
fieldNameThe fully qualified field name.
scriptThe Java script to be added/placed into a push button field.
Returns
true if field scrip was successfully set.

◆ SetSubmitFlag()

ASPOSE_PDF_SHARED_API bool Aspose::Pdf::Facades::FormEditor::SetSubmitFlag ( System::String  fieldName,
SubmitFormFlag  submitFormFlag 
)

Set submit flag of submit button.

Parameters
fieldNameName of submit button.
submitFormFlagSubmit flag.
Returns
true if field was found and submit flag was successfully set.

◆ SetSubmitUrl()

ASPOSE_PDF_SHARED_API bool Aspose::Pdf::Facades::FormEditor::SetSubmitUrl ( System::String  fieldName,
System::String  url 
)

Sets URL of the button.

Parameters
fieldNameSubmit button name.
urlFully qualified URL.
Returns
true if URL for button was successfully set.

◆ Single2Multiple()

ASPOSE_PDF_SHARED_API bool Aspose::Pdf::Facades::FormEditor::Single2Multiple ( System::String  fieldName)

Change a single-lined text field to a multiple-lined one.

Parameters
fieldNameThe qualified field name.
Returns
If success, return true;else false.