Aspose::Pdf::Facades::FormEditor class

FormEditor class

Class for editing forms (ading/deleting field etc)

class FormEditor : public Aspose::Pdf::Facades::SaveableFacade

Methods

MethodDescription
AddField(FieldType, System::String, int32_t, float, float, float, float)Add field of specified type to the form.
AddField(FieldType, System::String, System::String, int32_t, float, float, float, float)Add field of specified type to the form.
AddFieldScript(System::String, System::String)Add JavaScript for a PushButton field. If old event exists, new event is added after it.
AddListItem(System::String, System::String)Adds new item to the list box.
AddListItem(System::String, System::ArrayPtr<System::String>)Add a new item with Export value to the existing list box field, only for AcroForm combo box field.
AddSubmitBtn(System::String, int32_t, System::String, System::String, float, float, float, float)Add submit button on the form.
BindPdf(System::String) overrideInitializes the facade.
BindPdf(System::SharedPtr<System::IO::Stream>) overrideInitializes the facade.
BindPdf(System::SharedPtr<Aspose::Pdf::Document>) overrideInitializes the facade.
virtual BindPdf(System::SharedPtr<Document>)Binds PDF document for editing.
Close() overrideCloses the facade.
CopyInnerField(System::String, System::String, int32_t)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.
CopyInnerField(System::String, System::String, int32_t, float, float)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.
CopyOuterField(System::String, System::String)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).
CopyOuterField(System::String, System::String, int32_t)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).
CopyOuterField(System::String, System::String, int32_t, float, float)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).
DecorateField(System::String)Changes visual attributes of the specified field.
DecorateField(FieldType)Changes visual attributes of all fields with the specified field type.
DecorateField()Changes visual attributes of all fields in the PDF document.
DelListItem(System::String, System::String)Delete item from the list field.
Dispose() overrideDisposes the facade.
FormEditor(System::SharedPtr<System::IO::Stream>, System::SharedPtr<System::IO::Stream>)Constructor for FormEditor.
FormEditor(System::String, System::String)Constructor for FormEditor.
FormEditor()Constructor for FormEditor.
FormEditor(System::SharedPtr<Aspose::Pdf::Document>)Initializes new FormEditor object on base of the document .
FormEditor(System::SharedPtr<Aspose::Pdf::Document>, System::String)Initializes new FormEditor object on base of the document .
FormEditor(System::SharedPtr<Aspose::Pdf::Document>, System::SharedPtr<System::IO::Stream>)Initializes new FormEditor object on base of the document .
FormEditor(System::SharedPtr<System::IO::Stream>, System::SharedPtr<System::Web::HttpResponse>)Creates FormEditor which will save result into HttpResponse object.
FormEditor(System::String, System::SharedPtr<System::Web::HttpResponse>)Creates FormEditor which will save result into HttpResponse object.
get_AttachmentName() constGets name of attachment when result of operation is stored into HttpResponse objects as attachment.
get_ContentDisposition() constGets how content will be stored when result of operation is stored into HttpResponse object. Possible value: inline / attachment. Default: inline.
get_DestFileName() constGets destination file name.
get_DestStream() constGets destination stream.
get_Document() constGets the document facade is working on.
get_ExportItems() constSets options for combo box with export values.
get_Facade() constSets visual attributes of the field.
get_Items() constSets items which will be added t onewly created list box or combo box.
get_RadioButtonItemSize() constGets 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()The member to record the gap between two neighboring radio buttons in pixels,default is 50.
get_RadioHoriz() constThe flag to indicate whether the radios are arranged horizontally or vertically, default value is true.
get_Response() constGets Response object where result of operation will be stored.
get_SaveOptions() constGets save options when result is stored as HttpResponse. Default value: PdfSaveOptions.
get_SrcFileName() constGets name of source file.
get_SrcStream() constGets source stream.
get_SubmitFlag() constSet the submit button’s submission flags.
GetFieldAppearance(System::String)Get field flags.
MoveField(System::String, float, float, float, float)Set new position of field.
RemoveField(System::String)Remove field from the form.
RemoveFieldAction(System::String)Remove submit action of the field.
RenameField(System::String, System::String)Change name of the field.
ResetFacade()Reset all visual attribtues to empty value.
ResetInnerFacade()Reset all visual attribtues of inner facade to empty value.
Save()Saves changes into destination file.
Save(System::String) overrideSaves the PDF document to the specified file.
Save(System::SharedPtr<System::IO::Stream>) overrideSaves the PDF document to the specified stream.
set_AttachmentName(System::String)Sets name of attachment when result of operation is stored into HttpResponse objects as attachment.
set_ContentDisposition(Aspose::Pdf::ContentDisposition)Sets how content will be stored when result of operation is stored into HttpResponse object. Possible value: inline / attachment. Default: inline.
set_ConvertTo(PdfFormat)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(System::String)Sets destination file name.
set_DestStream(System::SharedPtr<System::IO::Stream>)Sets destination stream.
set_ExportItems(System::ArrayPtr<System::ArrayPtr<System::String>>)Sets options for combo box with export values.
set_Facade(System::SharedPtr<FormFieldFacade>)Sets visual attributes of the field.
set_Items(System::ArrayPtr<System::String>)Sets items which will be added t onewly created list box or combo box.
set_RadioButtonItemSize(double)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(float)The member to record the gap between two neighboring radio buttons in pixels,default is 50.
set_RadioHoriz(bool)The flag to indicate whether the radios are arranged horizontally or vertically, default value is true.
set_Response(System::SharedPtr<System::Web::HttpResponse>)Sets Response object where result of operation will be stored.
set_SaveOptions(System::SharedPtr<Aspose::Pdf::SaveOptions>)Sets save options when result is stored as HttpResponse. Default value: PdfSaveOptions.
set_SrcFileName(System::String)Sets name of source file.
set_SrcStream(System::SharedPtr<System::IO::Stream>)Sets source stream.
set_SubmitFlag(SubmitFormFlag)Set the submit button’s submission flags.
SetFieldAlignment(System::String, int32_t)Set the alignment style of a text field.
SetFieldAlignmentV(System::String, int32_t)Set the vertical alignment style of a text field.
SetFieldAppearance(System::String, Aspose::Pdf::Annotations::AnnotationFlags)Set field flags.
SetFieldAttribute(System::String, PropertyFlag)Set attributes of field.
SetFieldCombNumber(System::String, int32_t)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).
SetFieldLimit(System::String, int32_t)Sets maximum character count of the text field.
SetFieldScript(System::String, System::String)Set JavaScript for a PushButton field. If old JavaScript existed, it will be replaced by the new one.
SetSubmitFlag(System::String, SubmitFormFlag)Set submit flag of submit button.
SetSubmitUrl(System::String, System::String)Sets URL of the button.
Single2Multiple(System::String)Change a single-lined text field to a multiple-lined one.

See Also