[]
        
(Showing Draft Content)

GrapeCity.Documents.Pdf.AcroForms.Field

Class Field

Namespace
GrapeCity.Documents.Pdf.AcroForms
Assembly
GcDocs.Pdf.dll

Defines AcroForm field.

public class Field : PdfDictWrapper, IPdfDict, IOwnedObject, ActionHide.ILinkedObject, ActionFieldsBase.IFieldDef
Inheritance
object
Field
Implements
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Extension Methods

Constructors

Field()

Initializes a new instance of the Field class.

public Field()

Properties

AcroForm

Gets the AcroForm that owns this object.

public AcroForm AcroForm { get; }

Property Value

AcroForm

ActualJustification

Gets the actual justification to be used when displaying the field’s text.

public VariableTextJustification ActualJustification { get; }

Property Value

VariableTextJustification
See Also

AlternateName

Gets or sets an alternate field name to be used in place of the actual field name wherever the field must be identified in the user interface (such as in error or status messages referring to the field). This text is also useful when extracting the document’s contents in support of accessibility to users with disabilities or for other purposes.

public string AlternateName { get; set; }

Property Value

string

CalculationIndex

Gets or sets an index that is used to determine the field's calculation order. Fields with lower indices are calculated before fields with higher indices.

If several fields have the same CalculationIndex, the calculation order is determined by the order of fields in the collection.

RecalculateValue can be used to specify JavaScript that is used to calculate the field's value.

public int CalculationIndex { get; set; }

Property Value

int

Children

Gets the list of child fields.

public FieldCollection Children { get; }

Property Value

FieldCollection

DefaultValue

Gets or sets the field's default value.

public object DefaultValue { get; set; }

Property Value

object

Doc

Gets the GcPdfDocument owning this field.

public GcPdfDocument Doc { get; }

Property Value

GcPdfDocument

Events

Gets the Field.TriggerEvents object defining events of this field.

public Field.TriggerEvents Events { get; }

Property Value

Field.TriggerEvents

Export

Gets or sets a value indicating whether the field must not be exported by a ActionSubmitForm action.

public bool Export { get; set; }

Property Value

bool

GcProps

Gets the PdfDict object that can be used to associate arbitrary data with this field.

Note that for text values, in most cases the PdfString type should be used rather than string.

public PdfDict GcProps { get; }

Property Value

PdfDict

HasGcProps

Gets a value indicating whether the GcProps is not empty (i.e. whether this filed has any associated custom properties).

public bool HasGcProps { get; }

Property Value

bool

Justification

Gets or sets the justification to be used in displaying the field’s text.

Note that this field is used only if Justification is not specified.

public VariableTextJustification? Justification { get; set; }

Property Value

VariableTextJustification?

MappingName

Gets or sets the mapping name to be used when exporting interactive form field data from the document.

public string MappingName { get; set; }

Property Value

string

Name

Gets or sets the field's name.

public string Name { get; set; }

Property Value

string

Owner

Gets the FieldCollection containing this field.

public FieldCollection Owner { get; }

Property Value

FieldCollection

Parent

Gets the parent field.

public Field Parent { get; }

Property Value

Field

PdfDefaultValue

Gets or sets the default field's value.

public IPdfObject PdfDefaultValue { get; set; }

Property Value

GrapeCity.Documents.Pdf.Spec.IPdfObject

PdfValue

Gets or sets the field's value.

public IPdfObject PdfValue { get; set; }

Property Value

GrapeCity.Documents.Pdf.Spec.IPdfObject

ReadOnly

Gets or sets a value indicating whether the user may not change the value of the field. Any associated widget annotations will not interact with the user; that is, they will not respond to mouse clicks or change their appearance in response to mouse motions. This flag is useful for fields whose values are computed or imported from a database.

public bool ReadOnly { get; set; }

Property Value

bool

Required

Gets or sets a value indicating whether the field must have a value at the time it is exported by a ActionSubmitForm action.

public bool Required { get; set; }

Property Value

bool

UserData

Gets or sets arbitrary data associated with the current field.

Note that this data is runtime only and is not persisted in the PDF.

public object UserData { get; set; }

Property Value

object

Value

Gets or sets the field's value.

public object Value { get; set; }

Property Value

object

Widgets

Gets the list of widget annotations associated with this field.

public FieldWidgetCollection Widgets { get; }

Property Value

FieldWidgetCollection

Methods

FormatDateTimeValue(DateTime, string)

Formats a System.DateTime value using the specified date format string.

The syntax of the format string is similar to .NET format strings. Some examples are "m/d/yyyy" or "d-mmm-yy".

public static string FormatDateTimeValue(DateTime value, string format)

Parameters

value System.DateTime

The value to format.

format string

The format string. Cannot be null or empty.

Returns

string

FormatNumberValue(double, int, NumberSeparatorStyle, NumberNegativeStyle, string, CurrencySymbolStyle)

Formats a value using the specified numeric formatting options.

public static string FormatNumberValue(double value, int decimalPlaces, Field.NumberSeparatorStyle separatorStyle, Field.NumberNegativeStyle negativeStyle, string currencySymbol, Field.CurrencySymbolStyle currencySymbolStyle)

Parameters

value double

The value to format.

decimalPlaces int

The number of digits that appear to the right of the decimal point. Valid values are from 0 to 10, inclusive.

separatorStyle Field.NumberSeparatorStyle

The placement of commas and periods, see Field.NumberSeparatorStyle.

negativeStyle Field.NumberNegativeStyle

How negative numbers are displayed.

currencySymbol string

The currency symbol, or null or empty string.

currencySymbolStyle Field.CurrencySymbolStyle

The location of the currency symbol in relation to the number. This parameter is meaningful only if currencySymbol is not null or empty.

Returns

string

FormatPercentValue(double, int, NumberSeparatorStyle)

Formats a value using the specified percentage formatting options.

public static string FormatPercentValue(double value, int decimalPlaces, Field.NumberSeparatorStyle separatorStyle)

Parameters

value double

The value to format.

decimalPlaces int

The number of digits that appear to the right of the decimal point. Valid values are from 0 to 10, inclusive.

separatorStyle Field.NumberSeparatorStyle

The placement of commas and periods, see Field.NumberSeparatorStyle.

Returns

string

The string containing the formatted value.