FormEditor.AddField

AddField(FieldType, string, int, float, float, float, float)

Add field of specified type to the form.

public bool AddField(FieldType fieldType, string fieldName, int pageNum, float llx, float lly, 
    float urx, float ury)
ParameterTypeDescription
fieldTypeFieldTypeType of the field which must be added.
fieldNameStringName of the field whic must be added.
pageNumInt32Page number where new field must be placed.
llxSingleAbscissa of the lower-left corner of the field.
llySingleOrdinate of the lower-left corner of the field.
urxSingleAbscissa of the upper-right corner of the field.
urySingleOrdinate of the upper-right corner of the field.

Return Value

true if field was successfully added.

Examples

FormEditor formEditor = new Aspose.Pdf.Facades.FormEditor("PdfForm.pdf", "FormEditor_AddField_Text.pdf");
formEditor.AddField(FieldType.Text, "AddedTextField",  1, 10, 30, 110, 46);
formEditor.Save();

See Also


AddField(FieldType, string, string, int, float, float, float, float)

Add field of specified type to the form.

public bool AddField(FieldType fieldType, string fieldName, string initValue, int pageNum, 
    float llx, float lly, float urx, float ury)
ParameterTypeDescription
fieldTypeFieldTypeType of the field which must be added.
fieldNameStringName of the field whic must be added.
initValueStringInitial value of the field.
pageNumInt32Page number where new field must be placed.
llxSingleAbscissa of the lower-left corner of the field.
llySingleOrdinate of the lower-left corner of the field.
urxSingleAbscissa of the upper-right corner of the field.
urySingleOrdinate of the upper-right corner of the field.

Return Value

true if field was successfully added.

Examples

FormEditor formEditor = new Aspose.Pdf.Facades.FormEditor("PdfForm.pdf", "FormEditor_AddField_Text.pdf");
formEditor.AddField(FieldType.Text, "AddedTextField", "Text Value", 1, 10, 30, 110, 46);
formEditor.Items = new string[] { "Item1", "Item2", Item3" };
formEditor.AddField(FieldType.Radio, "RadioButtonField", 1, 265, 695, 365, 720);
formEditor.Save();

See Also