DynaPDF Manual - Page 70

Previous Page 69   Index   Next Page 71

Interactive Forms
Page 70 of 860
Calc order:
Get/SetFieldCalcOrder()
// Get or change the calc order
Other:
DeleteAcroForm()
// Delete the entire AcroForm
DeleteXFAForm()
// Delete the XFA form of a hybrid form
DeleteJavaScripts() // Delete global Javascripts and JS Actions
LoadFDFData()
// Load form data from a FDF file
The global NeedAppearance flag of an Interactive Form defines whether the viewer should
create the field appearances on demand when opening the file or whether the existing
definitions should be taken from the PDF file. DynaPDF creates always appearance streams for
all field types with exception of barcode fields. However, in certain cases it can be useful to let
the viewer render fields with their own algorithms because the exact way how Adobe’s Acrobat
builds the field appearances is not documented.
For example, when editing the contents of a text field in Adobe’s Acrobat the viewer rebuilds
first the field appearance before placing the editing cursor into the field. The new appearance
created from Adobe’s Acrobat can be slightly different in comparison to the one that was
created by DynaPDF. The visible content, especially of text fields, is sometimes not absolutely
stable.
If the NeedAppearance flag is set, the viewer uses already its own algorithms to build the field
appearances when opening the file. This avoids visible changes when editing a field. However,
the NeedAppearance flag must not be set to true if a form contains page templates.
Important field properties when creating new fields
The line width of the field border is derived from the current graphics state when a new field is
created (see SetLineWidth()). No border will be drawn if either the line width is set to zero or if
the border color is set to NO_COLOR (see SetFieldBorderColor()). The default background color
for new fields is NO_COLOR; that means the background appears transparent. Form fields
support the color spaces DeviceGray, DeviceRGB, and DeviceCMYK. The default background,
border, and text color must be defined in the current color space. Note that DynaPDF does not
convert the current color values if the color space will be changed.
Field Properties
Most field properties and values can be read and changed with DynaPDF. The following list
gives an overview over the available functions and for what they can be used.
AddValToChoiceField()
// List & combo boxes
GetFieldChoiceValue()
// List & combo boxes, radio buttons
GetFieldCount()
// Number of fields in the document
GetFieldEx()/GetFieldEx2()
// Most important properties
GetFullyQualifiedFieldName()// Returns the fully qualified field name
 

Previous topic: Interactive Forms, Functions to create form fields, Field Appearance

Next topic: What is a Group Type?