public class FormField extends Paragraph
Represents a formfield Paragraph
in the Pdf document.
[C#] //Create pdf document Pdf pdf1 = new Pdf(); //Add a section into the pdf document Aspose.Pdf.Generator.Section Section1 = pdf1.Sections.Add(); //Create a new FormField object FormField ComboBox1 = new FormField(); // Set the formfield type to Combo box ComboBox1.FormFieldType = FormFieldType.Combo; // set field name ComboBox1.FieldName = "ACombo"; // Specify combo box option values ComboBox1.ChoiceOptions = new string[] { "Red", "Green", "Blue" }; // specify the combo field value to be selected as default ComboBox1.FieldValue = "Green"; // set the form fielf widht ComboBox1.FormWidth = 80; // set form field height ComboBox1.FormHeight = 20; //Add ComboBox to Paragraphs collection of section object Section1.Paragraphs.Add(ComboBox1); //Save the pdf document pdf1.Save(@"D:\pdftest\FormFieldTest_code.pdf"); [VisualBasic] � Create pdf document Dim pdf1 As Pdf = New Pdf � Add a section into the pdf document Dim Section1 As Section = pdf1.Sections.Add() � Create a new FormField object Dim ComboBox1 As FormField = New FormField � Set the formfield type to Combo box ComboBox1.FormFieldType = FormFieldType.Combo � set field name ComboBox1.FieldName = "ACombo" � Specify combo box option values ComboBox1.ChoiceOptions = New String() {"Red", "Green", "Blue"} � specify the combo field value to be selected as default ComboBox1.FieldValue = "Green" � set the form fielf widht ComboBox1.FormWidth = 80 � set form field height ComboBox1.FormHeight = 20 � Add ComboBox to Paragraphs collection of section object Section1.Paragraphs.Add(ComboBox1) � Save the pdf document pdf1.Save(...) [XML] <?xml version="1.0" encoding="utf-8" ?> <Pdf xmlns="Aspose.Pdf"> <Section> <FormField FormFieldType="Combo" FieldName="ACombo" FieldValue="Red" ChoiceOptions="Red Green Blue" FormWidth="80" FormHeight="20" /> </Section> </Pdf>
Paragraph.VerticalPositionInfo
Modifier and Type | Field and Description |
---|---|
int |
Flag |
String |
InnerHtml |
boolean |
isWidthSet |
absolutePosX, absolutePosY, ClippingArea, FixedHeight, FixedWidth, isAbsoluteLayout, isFixedLayout, IsNeedAddToPage, IsPositionGot, IsPositionProcessed, isRelativeLayout, MayNeedReprocess, NextParagraph, posBottom, posLeft, posRight, posTop, RefPara, relativePosX, relativePosY, VerticalPosInfo
Constructor and Description |
---|
FormField()
Initializes a new instance of the
FormField class. |
Modifier and Type | Method and Description |
---|---|
Object |
completeClone() |
Object |
deepClone() |
Color |
getBackgroundColor() |
com.aspose.ms.System.Drawing.Color |
getBackgroundColorInternal() |
Color |
getBorderColor() |
com.aspose.ms.System.Drawing.Color |
getBorderColorInternal() |
Color |
getButtonColor() |
com.aspose.ms.System.Drawing.Color |
getButtonColorInternal() |
boolean |
getCheckBoxIsChecked()
Gets or sets a bool value that indicates whether the checkbox is checked.
|
String[] |
getChoiceOptions()
Gets or sets a string array that indicates the options of combo or list field.
|
int[] |
getChoiceSelections()
Gets or sets a int array that indicates the choice selection indexes.
|
boolean |
getComboIsEditable()
Gets or sets a bool value that indicates whether the combo is editable.
|
String |
getFieldName()
Gets or sets a string that indicates the name of the field.
|
String |
getFieldValue()
Gets or sets a string that indicates the value of the field.
|
int |
getFormFieldType()
Gets or sets a
FormFieldType enumeration that indicates the formfield type. |
float |
getFormHeight()
Gets or sets a float value that indicates the height of the formfield.
|
float |
getFormWidth()
Gets or sets a float value that indicates the width of the formfield.
|
Segment |
getinlineSeg() |
Text |
getInWhichText() |
int |
getRadioButtonCheckedIndex()
Gets or sets a int value that indicates the index of the radiobutton that has been checked.
|
RadioButtons |
getRadioButtons()
Gets or sets a
RadioButtons collection that indicates the radiobuttons in this field. |
Color |
getTextColor() |
com.aspose.ms.System.Drawing.Color |
getTextColorInternal() |
String |
getTextFontName()
Gets or sets a string that indicates the font name of the text field.
|
float |
getTextFontSize()
Gets or sets a float value that indicates the font size of the text field.
|
boolean |
getTextIsMultiLine()
Gets or sets a bool value that indicate whether the text field can be multiline.
|
boolean |
getTextIsPassword()
Gets or sets a bool value that indicates whether the text field is password.
|
int |
getTextMaxLength()
Gets or sets a int value that indicates the max length of the text can be entered in this field.
|
int |
getTopIndex()
Gets or sets a int value that indicates the top index (in the options array) of combo or list field.
|
ValidatorCollection |
getValidators() |
boolean |
isBordered()
Gets or sets a bool value that indicates whether the text field is bordered.
|
void |
isBordered(boolean value) |
boolean |
isMultiSelect()
Gets or sets a bool value that indicates if multi-selecting is allowed.
|
void |
isMultiSelect(boolean value) |
boolean |
isReadOnly()
Gets or sets a bool value that indicates if the field is readonly.
|
void |
isReadOnly(boolean value) |
boolean |
isSizeSet() |
void |
setBackgroundColor(Color value) |
void |
setBackgroundColorInternal(com.aspose.ms.System.Drawing.Color value) |
void |
setBorderColor(Color value) |
void |
setBorderColorInternal(com.aspose.ms.System.Drawing.Color value) |
void |
setButtonColor(Color value) |
void |
setButtonColorInternal(com.aspose.ms.System.Drawing.Color value) |
void |
setCheckBoxIsChecked(boolean value) |
void |
setChoiceOptions(String[] value) |
void |
setChoiceSelections(int[] value) |
void |
setComboIsEditable(boolean value) |
void |
setFieldName(String value) |
void |
setFieldValue(String value) |
void |
setFormFieldType(int value) |
void |
setFormHeight(float value) |
void |
setFormWidth(float value) |
void |
setinlineSeg(Segment value) |
void |
setInWhichText(Text value) |
void |
setRadioButtonCheckedIndex(int value) |
void |
setRadioButtons(RadioButtons value) |
void |
setTextColor(Color value) |
void |
setTextColorInternal(com.aspose.ms.System.Drawing.Color value) |
void |
setTextFontName(String value) |
void |
setTextFontSize(float value) |
void |
setTextIsMultiLine(boolean value) |
void |
setTextIsPassword(boolean value) |
void |
setTextMaxLength(int value) |
void |
setTextWrapType(int value) |
void |
setTopIndex(int value) |
void |
setValidators(ValidatorCollection value) |
copyTo, getBookmarked, getComposer, getFootNoteProcessed, getHeight, getID, getLeft, getMargin, getNeedReprocess, getNextParagraphInHeading, getPageNumber, getParentCell, getPositioningType, getPosX, getPosY, getRealPageNumber, getReferencedParagraphWidth, getReferenceParagraphID, getRefPageNumber, getSection, getTop, getWidth, isDisabled, isDisabled, isEndNote, isFirstParagraph, isFirstParagraph, isFirstParagraphInColumn, isFirstParagraphInColumn, isFootNote, isFootNote, isInHeaderFooter, isInHeaderFooter, isInList, isInList, isKeptTogether, isKeptTogether, isKeptWithNext, isKeptWithNext, isOnOddPage, isOnOddPage, setBookmarked, setFootNoteProcessed, setHeight, setID, setLeft, setMargin, setNeedReprocess, setNextParagraphInHeading, setPageNumber, setParentCell, setParentIsTable, setPositioningType, setPosX, setPosY, setRealPageNumber, setReferencedParagraphWidth, setReferenceParagraphID, setRefPageNumber, setSection, setTop, setWidth
public String InnerHtml
public boolean isWidthSet
public int Flag
public int getFormFieldType()
Gets or sets a FormFieldType
enumeration that indicates the formfield type.
public void setFormFieldType(int value)
public boolean getComboIsEditable()
Gets or sets a bool value that indicates whether the combo is editable. Default value is true.
public void setComboIsEditable(boolean value)
public String[] getChoiceOptions()
Gets or sets a string array that indicates the options of combo or list field.
public void setChoiceOptions(String[] value)
public int[] getChoiceSelections()
Gets or sets a int array that indicates the choice selection indexes.
public void setChoiceSelections(int[] value)
public int getTopIndex()
Gets or sets a int value that indicates the top index (in the options array) of combo or list field. Default is 0.
public void setTopIndex(int value)
public String getFieldName()
Gets or sets a string that indicates the name of the field. Note that each field MUST have a unique name.
public void setFieldName(String value)
public String getFieldValue()
Gets or sets a string that indicates the value of the field.
public void setFieldValue(String value)
public float getFormWidth()
Gets or sets a float value that indicates the width of the formfield. Default value is 100 points.
public void setFormWidth(float value)
public float getFormHeight()
Gets or sets a float value that indicates the height of the formfield. Default value is 30 points.
public void setFormHeight(float value)
public boolean getCheckBoxIsChecked()
Gets or sets a bool value that indicates whether the checkbox is checked. Default is false.
public void setCheckBoxIsChecked(boolean value)
public String getTextFontName()
Gets or sets a string that indicates the font name of the text field. The core fonts (Courier,Courier-Bold,Courier-BoldOblique,Courier-Oblique,Helvetica,Helvetica-Bold, Helvetica-BoldOblique, Helvetica-Oblique,Symbol,Times-Bold,Times-BoldItalic,Times-Italic, Times-Roman and ZapfDingbats) and Truetype fonts are supported. When using Truetype font, you should use the font family name. If you want the font be bold or italic, set the font name like "Arial,Bold","Arial,Italic" or "Arial,BoldItalic".
public void setTextFontName(String value)
public com.aspose.ms.System.Drawing.Color getTextColorInternal()
public Color getTextColor()
public void setTextColorInternal(com.aspose.ms.System.Drawing.Color value)
public void setTextColor(Color value)
public com.aspose.ms.System.Drawing.Color getBackgroundColorInternal()
public Color getBackgroundColor()
public void setBackgroundColorInternal(com.aspose.ms.System.Drawing.Color value)
public void setBackgroundColor(Color value)
public com.aspose.ms.System.Drawing.Color getBorderColorInternal()
public Color getBorderColor()
public void setBorderColorInternal(com.aspose.ms.System.Drawing.Color value)
public void setBorderColor(Color value)
public com.aspose.ms.System.Drawing.Color getButtonColorInternal()
public Color getButtonColor()
public void setButtonColorInternal(com.aspose.ms.System.Drawing.Color value)
public void setButtonColor(Color value)
public float getTextFontSize()
Gets or sets a float value that indicates the font size of the text field. Default is 14 points.
public void setTextFontSize(float value)
public boolean getTextIsMultiLine()
Gets or sets a bool value that indicate whether the text field can be multiline. Default is false.
public void setTextIsMultiLine(boolean value)
public boolean getTextIsPassword()
Gets or sets a bool value that indicates whether the text field is password. If set to true, the field is intended for entering a secure password that should not be echoed visibly to the screen. Default value is false.
public void setTextIsPassword(boolean value)
public int getTextMaxLength()
Gets or sets a int value that indicates the max length of the text can be entered in this field.
public void setTextMaxLength(int value)
public boolean isBordered()
Gets or sets a bool value that indicates whether the text field is bordered. Default is false.
public void isBordered(boolean value)
public RadioButtons getRadioButtons()
Gets or sets a RadioButtons
collection that indicates the radiobuttons in this field.
public void setRadioButtons(RadioButtons value)
public int getRadioButtonCheckedIndex()
Gets or sets a int value that indicates the index of the radiobutton that has been checked.
public void setRadioButtonCheckedIndex(int value)
public boolean isReadOnly()
Gets or sets a bool value that indicates if the field is readonly.
public void isReadOnly(boolean value)
public boolean isMultiSelect()
Gets or sets a bool value that indicates if multi-selecting is allowed.
public void isMultiSelect(boolean value)
public boolean isSizeSet()
public Text getInWhichText()
public void setInWhichText(Text value)
public Segment getinlineSeg()
public void setinlineSeg(Segment value)
public ValidatorCollection getValidators()
public void setValidators(ValidatorCollection value)
public void setTextWrapType(int value)
public Object completeClone()
completeClone
in class Paragraph
public Object deepClone()
Copyright © 2016 Aspose. All Rights Reserved.