iText 8.0.5 API
|
This class represents a single annotation in form fields hierarchy in an AcroForm. More...
Public Member Functions |
|
virtual PdfWidgetAnnotation | GetWidget () |
Gets iText.Kernel.Pdf.Annot.PdfWidgetAnnotation that this form field refers to. More... |
|
override PdfString | GetDefaultAppearance () |
Gets default appearance string containing a sequence of valid page-content graphics or text state operators that define such properties as the field's text size and color. More... |
|
override bool | RegenerateField () |
This method regenerates appearance stream of the field. More... |
|
override String[] | GetAppearanceStates () |
Gets the appearance state names. More... |
|
virtual iText.Forms.Fields.PdfFormAnnotation | SetBackgroundColor (Color backgroundColor) |
Basic setter for the backgroundColor property. More... |
|
virtual iText.Forms.Fields.PdfFormAnnotation | SetCaption (String caption) |
Basic setter for the push button caption. More... |
|
virtual iText.Forms.Fields.PdfFormAnnotation | SetCaption (String caption, bool regenerateField) |
Basic setter for the push button caption. More... |
|
virtual int | GetRotation () |
Get rotation property specified in this form annotation. More... |
|
virtual iText.Forms.Fields.PdfFormAnnotation | SetRotation (int degRotation) |
Basic setter for the degRotation property. More... |
|
virtual iText.Forms.Fields.PdfFormAnnotation | SetAction (PdfAction action) |
Sets the action on widget of this annotation form field. More... |
|
virtual iText.Forms.Fields.PdfFormAnnotation | SetVisibility (int visibility) |
Set the visibility flags of the form field annotation. More... |
|
virtual float | GetBorderWidth () |
Gets the border width for the field. More... |
|
virtual iText.Forms.Fields.PdfFormAnnotation | SetBorderWidth (float borderWidth) |
Sets the border width for the field. More... |
|
virtual Border | GetBorder () |
Get border object specified in the widget annotation dictionary. More... |
|
virtual iText.Forms.Fields.PdfFormAnnotation | SetBorderStyle (PdfDictionary style) |
Sets the border style for the field. More... |
|
virtual iText.Forms.Fields.PdfFormAnnotation | SetBorderColor (Color color) |
Sets the Border Color. More... |
|
virtual iText.Forms.Fields.PdfFormAnnotation | SetPage (int pageNum) |
Specifies on which page the form field's widget must be shown. More... |
|
virtual iText.Forms.Fields.PdfFormAnnotation | SetFormFieldElement (IFormField element) |
This method sets the model element associated with the current annotation and can be useful to take into account when drawing those properties that the annotation does not have. More... |
|
virtual iText.Forms.Fields.PdfFormAnnotation | SetAppearance (PdfName appearanceType, String appearanceState, PdfStream appearanceStream) |
Sets an appearance for (the widgets related to) the form field. More... |
|
virtual iText.Forms.Fields.PdfFormAnnotation | SetCheckBoxAppearanceOnStateName (String onStateName) |
Sets on state name for the checkbox annotation normal appearance and regenerates widget. More... |
|
Public Member Functions inherited from iText.Forms.Fields.AbstractPdfFormField | |
override PdfDictionary | GetPdfObject () |
Gets the wrapped dictionary. More... |
|
virtual void | SetParent (PdfFormField parent) |
Sets a parent PdfFormField for the current object. More... |
|
virtual PdfDictionary | GetParent () |
Gets the parent dictionary. More... |
|
virtual PdfFormField | GetParentField () |
Gets the parent field. More... |
|
virtual PdfString | GetFieldName () |
Gets the current field name. More... |
|
virtual float | GetFontSize () |
Gets the current fontSize of the form field. More... |
|
virtual PdfFont | GetFont () |
Gets the current font of the form field. More... |
|
virtual Color | GetColor () |
Gets the current color of the form field. More... |
|
virtual PdfAConformanceLevel | GetPdfAConformanceLevel () |
Gets the declared conformance level. More... |
|
virtual IConformanceLevel | GetPdfConformanceLevel () |
Gets the declared conformance level. More... |
|
virtual void | DisableFieldRegeneration () |
This method disables regeneration of the field and its children appearance stream. More... |
|
virtual void | EnableFieldRegeneration () |
This method enables regeneration of the field appearance stream. More... |
|
virtual void | DisableCurrentFieldRegeneration () |
This method disables regeneration of the current field appearance stream. More... |
|
virtual void | EnableCurrentFieldRegeneration () |
This method enables regeneration of the current field appearance stream and regenerates it. More... |
|
virtual bool | IsFieldRegenerationEnabled () |
This method checks if field appearance stream regeneration is enabled. More... |
|
virtual iText.Forms.Fields.AbstractPdfFormField | Put (PdfName key, PdfObject value) |
Inserts the value into the iText.Kernel.Pdf.PdfDictionary of this field and associates it with the specified key. More... |
|
virtual iText.Forms.Fields.AbstractPdfFormField | Remove (PdfName key) |
Removes the specified key from the iText.Kernel.Pdf.PdfDictionary of this field. More... |
|
virtual void | Release () |
Releases underlying pdf object and other pdf entities used by wrapper. More... |
|
virtual PdfDocument | GetDocument () |
Gets the iText.Kernel.Pdf.PdfDocument that owns that form field. More... |
|
virtual iText.Forms.Fields.AbstractPdfFormField | SetColor (Color color) |
Sets the text color and regenerates appearance stream. More... |
|
virtual iText.Forms.Fields.AbstractPdfFormField | SetFont (PdfFont font) |
Basic setter for the font property. More... |
|
virtual iText.Forms.Fields.AbstractPdfFormField | SetFontSize (float fontSize) |
Basic setter for the fontSize property. More... |
|
virtual iText.Forms.Fields.AbstractPdfFormField | SetFontSize (int fontSize) |
Basic setter for the fontSize property. More... |
|
virtual iText.Forms.Fields.AbstractPdfFormField | SetFontSizeAutoScale () |
Sets zero font size which will be interpreted as auto-size according to ISO 32000-1, 12.7.3.3. More... |
|
virtual iText.Forms.Fields.AbstractPdfFormField | SetFontAndSize (PdfFont font, float fontSize) |
Combined setter for the font and fontSize properties. More... |
|
virtual bool | IsTerminalFormField () |
Determines whether current form field is terminal or not. More... |
|
override bool | Equals (Object o) |
Indicate whether some other object is "equal to" this one. More... |
|
override int | GetHashCode () |
Generate a hash code for this object. More... |
|
Public Member Functions inherited from iText.Kernel.Pdf.PdfObjectWrapper< PdfDictionary > | |
virtual iText.Kernel.Pdf.PdfObjectWrapper< T > | MakeIndirect (PdfDocument document, PdfIndirectReference reference) |
Marks object behind wrapper to be saved as indirect. More... |
|
virtual iText.Kernel.Pdf.PdfObjectWrapper< T > | MakeIndirect (PdfDocument document) |
Marks object behind wrapper to be saved as indirect. More... |
|
virtual iText.Kernel.Pdf.PdfObjectWrapper< T > | SetModified () |
virtual void | Flush () |
virtual bool | IsFlushed () |
Static Public Member Functions |
|
static iText.Forms.Fields.PdfFormAnnotation | MakeFormAnnotation (PdfObject pdfObject, PdfDocument document) |
Creates a PdfFormAnnotation object. More... |
|
Static Public Attributes |
|
const int | HIDDEN = 1 |
const int | VISIBLE_BUT_DOES_NOT_PRINT = 2 |
const int | HIDDEN_BUT_PRINTABLE = 3 |
const int | VISIBLE = 4 |
const String | OFF_STATE_VALUE = "Off" |
Value which represents "off" state of form field. More... |
|
const String | ON_STATE_VALUE = "Yes" |
Value which represents "on" state of form field. More... |
|
Static Public Attributes inherited from iText.Forms.Fields.AbstractPdfFormField | |
const int | DEFAULT_FONT_SIZE = 12 |
Size of text in form fields when font size is not explicitly set. More... |
|
const int | MIN_FONT_SIZE = 4 |
Minimal size of text in form fields. More... |
|
Package Functions |
|
PdfFormAnnotation (PdfWidgetAnnotation widget, PdfDocument pdfDocument) | |
Creates a form field annotation as a wrapper of a iText.Kernel.Pdf.Annot.PdfWidgetAnnotation. More... |
|
PdfFormAnnotation (PdfDictionary pdfObject) | |
Creates a form field annotation as a wrapper object around a iText.Kernel.Pdf.PdfDictionary. More... |
|
virtual Rectangle | GetRect (PdfDictionary field) |
Gets a iText.Kernel.Geom.Rectangle that matches the current size and position of this form field. More... |
|
virtual void | DrawBorder (PdfCanvas canvas, PdfFormXObject xObject, float width, float height) |
Draws a border using the borderWidth and borderColor of the form field. More... |
|
virtual void | DrawPushButtonFieldAndSaveAppearance () |
Draws the appearance of a push button and saves it into an appearance stream. More... |
|
virtual void | DrawSignatureFormFieldAndSaveAppearance () |
Draws the appearance of a signature field and saves it into an appearance stream. More... |
|
virtual void | DrawRadioButtonAndSaveAppearance (String value) |
Draws the appearance of a radio button with a specified value and saves it into an appearance stream. More... |
|
virtual void | DrawListFormFieldAndSaveAppearance () |
Draws the appearance of a list box form field and saves it into an appearance stream. More... |
|
virtual void | DrawTextFormFieldAndSaveAppearance () |
Draws the appearance of a text form field and saves it into an appearance stream. More... |
|
virtual void | DrawComboBoxAndSaveAppearance () |
Draws the appearance of a Combo box form field and saves it into an appearance stream. More... |
|
virtual void | DrawCheckBoxAndSaveAppearance (String onStateName) |
Draw a checkbox and save its appearance. More... |
|
Package Functions inherited from iText.Forms.Fields.AbstractPdfFormField | |
AbstractPdfFormField (PdfDictionary pdfObject) | |
Creates a form field as a wrapper object around a iText.Kernel.Pdf.PdfDictionary. More... |
|
Package Functions inherited from iText.Kernel.Pdf.PdfObjectWrapper< PdfDictionary > | |
PdfObjectWrapper (T pdfObject) | |
virtual void | SetPdfObject (T pdfObject) |
virtual void | SetForbidRelease () |
virtual void | UnsetForbidRelease () |
virtual void | EnsureUnderlyingObjectHasIndirectReference () |
Package Attributes |
|
float | borderWidth = 1 |
Color | backgroundColor |
Color | borderColor |
Package Attributes inherited from iText.Forms.Fields.AbstractPdfFormField | |
PdfFont | font |
float | fontSize = -1 |
Color | color |
PdfAConformanceLevel | pdfAConformanceLevel |
IConformanceLevel | pdfConformanceLevel |
PdfFormField | parent |
Parent form field. More... |
|
Additional Inherited Members |
|
Protected Member Functions inherited from iText.Forms.Fields.AbstractPdfFormField | |
override bool | IsWrappedObjectMustBeIndirect () |
Defines if the object behind this wrapper must be an indirect object in the resultant document. More... |
|
Static Package Functions inherited from iText.Kernel.Pdf.PdfObjectWrapper< PdfDictionary > | |
static void | MarkObjectAsIndirect (PdfObject pdfObject) |
static void | EnsureObjectIsAddedToDocument (PdfObject @object) |
Some wrappers use object's indirect reference to obtain the PdfDocument to which the object belongs to. More... |
|
This class represents a single annotation in form fields hierarchy in an AcroForm.
This class represents a single annotation in form fields hierarchy in an AcroForm.
To be able to be wrapped with this iText.Kernel.Pdf.PdfObjectWrapper
|
inlinepackage |
Creates a form field annotation as a wrapper of a iText.Kernel.Pdf.Annot.PdfWidgetAnnotation.
widget | The widget which will be a kid of the PdfFormField |
pdfDocument | The iText.Kernel.Pdf.PdfDocument instance. |
|
inlinepackage |
Creates a form field annotation as a wrapper object around a iText.Kernel.Pdf.PdfDictionary.
Creates a form field annotation as a wrapper object around a iText.Kernel.Pdf.PdfDictionary. This iText.Kernel.Pdf.PdfDictionary must be an indirect object.
pdfObject | the dictionary to be wrapped, must have an indirect reference. |
|
inlinepackagevirtual |
Draws a border using the borderWidth and borderColor of the form field.
canvas | The iText.Kernel.Pdf.Canvas.PdfCanvas on which to draw |
xObject | The PdfFormXObject |
width | The width of the rectangle to draw |
height | The height of the rectangle to draw |
|
inlinepackagevirtual |
Draw a checkbox and save its appearance.
onStateName | the name of the appearance state for the checked state |
|
inlinepackagevirtual |
Draws the appearance of a Combo box form field and saves it into an appearance stream.
|
inlinepackagevirtual |
Draws the appearance of a list box form field and saves it into an appearance stream.
|
inlinepackagevirtual |
Draws the appearance of a push button and saves it into an appearance stream.
|
inlinepackagevirtual |
Draws the appearance of a radio button with a specified value and saves it into an appearance stream.
value | the value of the radio button. |
|
inlinepackagevirtual |
Draws the appearance of a signature field and saves it into an appearance stream.
|
inlinepackagevirtual |
Draws the appearance of a text form field and saves it into an appearance stream.
|
inlinevirtual |
Gets the appearance state names.
Implements iText.Forms.Fields.AbstractPdfFormField.
|
inlinevirtual |
Get border object specified in the widget annotation dictionary.
iText.Layout.Borders.Border specified in the widget annotation dictionary
|
inlinevirtual |
Gets the border width for the field.
|
inlinevirtual |
Gets default appearance string containing a sequence of valid page-content graphics or text state operators that define such properties as the field's text size and color.
Gets default appearance string containing a sequence of valid page-content graphics or text state operators that define such properties as the field's text size and color.
Implements iText.Forms.Fields.AbstractPdfFormField.
|
inlinepackagevirtual |
Gets a iText.Kernel.Geom.Rectangle that matches the current size and position of this form field.
field | current form field. |
|
inlinevirtual |
Get rotation property specified in this form annotation.
int
value which represents field's rotation
|
inlinevirtual |
Gets iText.Kernel.Pdf.Annot.PdfWidgetAnnotation that this form field refers to.
|
inlinestatic |
Creates a PdfFormAnnotation object.
pdfObject | assumed to be either a iText.Kernel.Pdf.PdfDictionary , or a iText.Kernel.Pdf.PdfIndirectReference to a iText.Kernel.Pdf.PdfDictionary. |
document | the iText.Kernel.Pdf.PdfDocument to create the field in. |
null
if pdfObject
is not a widget annotation.
|
inlinevirtual |
This method regenerates appearance stream of the field.
This method regenerates appearance stream of the field.
Implements iText.Forms.Fields.AbstractPdfFormField.
|
inlinevirtual |
Sets the action on widget of this annotation form field.
action | The action. |
|
inlinevirtual |
Sets an appearance for (the widgets related to) the form field.
appearanceType | the type of appearance stream to be added
|
appearanceState | the state of the form field that needs to be true for the appearance to be used. Differentiates between several streams of the same type. |
appearanceStream | the appearance instructions, as a iText.Kernel.Pdf.PdfStream. |
|
inlinevirtual |
Basic setter for the backgroundColor
property.
Basic setter for the backgroundColor
property. Regenerates the field appearance after setting the new value.
backgroundColor | The new color to be set or null if no background needed. |
|
inlinevirtual |
Sets the Border Color.
color | the new value for the Border Color. |
|
inlinevirtual |
Sets the border style for the field.
style | the new border style. |
|
inlinevirtual |
Sets the border width for the field.
borderWidth | The new border width. |
|
inlinevirtual |
Basic setter for the push button caption.
Basic setter for the push button caption. Regenerates the field appearance after setting the new caption.
caption | button caption to be set. |
|
inlinevirtual |
Basic setter for the push button caption.
Basic setter for the push button caption. Regenerates the field appearance after setting the new caption if corresponding parameter is specified.
caption | button caption to be set. |
regenerateField | true if field should be regenerated, false otherwise. |
|
inlinevirtual |
Sets on state name for the checkbox annotation normal appearance and regenerates widget.
onStateName | the new appearance name representing on state. |
|
inlinevirtual |
This method sets the model element associated with the current annotation and can be useful to take into account when drawing those properties that the annotation does not have.
This method sets the model element associated with the current annotation and can be useful to take into account when drawing those properties that the annotation does not have. Note that annotation properties will take precedence, so such properties cannot be overridden by using this method (e.g. background, text color, etc.).
Also note that the model element won't be used for annotations for choice form field.
element | model element to set. |
|
inlinevirtual |
Specifies on which page the form field's widget must be shown.
pageNum | the page number. |
|
inlinevirtual |
Basic setter for the degRotation
property.
Basic setter for the degRotation
property. Regenerates the field appearance after setting the new value.
degRotation | The new degRotation to be set |
|
inlinevirtual |
Set the visibility flags of the form field annotation.
Set the visibility flags of the form field annotation. Options are: HIDDEN, HIDDEN_BUT_PRINTABLE, VISIBLE, VISIBLE_BUT_DOES_NOT_PRINT.
visibility | visibility option. |
|
static |
Value which represents "off" state of form field.
|
static |
Value which represents "on" state of form field.