LayerAcrobat_Forms_Layer
ObjectAcroForm

The Acrobat Forms plug-in exports its own Host Function Table (HFT), whose methods can be used by other plug-ins. To use the Acrobat Forms plug-ins' HFT, a plug-in must:

Data may be imported and exported into Acrobat Forms in Forms Data Format (FDF). FDF is used to submit form data to a server, as well as to receive the response and incorporate it into a form. FDF is based on PDF and uses the same syntax and set of basic object types as PDF. It also has the same file structure, except that the cross-reference table is optional. See the PDF Reference for more information.

OLE for Forms

This document describes the Forms HFT. The Interapplication Communication (IAC) APIs supported by the Acrobat Forms plug-in are described in Developing Applications using Interapplication Communication and the Interapplication Communication API Reference.



Define Summary
 Define
 AcroFormHFT_LATEST_VERSION
 AcroFormHFT_NAME
 AcroFormNum_SEL
 AcroTTSHFT_LATEST_VERSION
 AcroTTSHFT_NAME
 AcroTTSNum_SEL
 AFAVignore_F
 Init_AcroFormHFT
 Init_AcroTTSHFT
Use this to initialize and make the TTS HFT functions available to your plug-in.
 Init_TextAppearanceP
Macro for setting text appearance.
 kAFOptionsR2LDirection
The default paragraph direction is right to left.
 SetDefault_TextAppearanceP
Macro for setting text appearance. This macro uses Helvetica as the default font.
 TextApperanceIsValid
Macro for checking whether a text appearance is valid.
Typedef Summary
 Typedef
 AcroForm
 AFPDFieldBorder
Field border data type.
 AFPDFieldFlags_t
Used for the value of flags set by AFPDFieldSetFlags.
 AFPDWidgetBorder
 AFPDWidgetBorderRec
 AFTextAttributesP
 ExportAsFDFParams
 ExportAsFDFParamsRec
 TextAppearanceP
Enumeration Summary
 Enumeration
  AF_Flags_t
The type of flag to be set in AFPDFieldSetFlags(). If Flags_Annot, SetFlagsAnnot, or ClrFlagsAnnot is specified and the PDField is not an annotation, no flags are changed.
  AF_NotificationSelector_t
Deprecated as of Acrobat 8.0.
  AFHorizontalAlign
  AFPDWidgetBorderStyle
Form field appearance definitions for the outside border of an annotation.
  AFPDWidgetPosition
  AFRenderModeFlags
  AFVerticalAlign
Structure Summary
 Structure
 _AFPDWidgetBorderRec
Form field appearance definitions for the outside border of an annotation.
 _t_ExportAsFDFParams
A parameter block used in the call to ExportAsFDFWithParams().
 AF_NtfyParams_t
Deprecated as of Acrobat 8.0.
 AFTextAttributesRec
 TextAppearance_t
A structure containing information about the text appearance of a field.
Callback Summary
 Callback
 AF_NotificationFailureProc
Deprecated as of Acrobat 8.0.
 AF_NotificationProc
Deprecated as of Acrobat 8.0.
 AFPDFieldEnumProc
Callback used by AFPDDocEnumPDFields(). It is called once for each PDField in a form.
Method Summary
 Method
 
ASInt32 AcroFormRegisterObserver(AF_NotificationSelector_t notificationID, AF_NotificationProc notifyProc, AF_NotificationFailureProc notifyFailure, void* clientData)
Deprecated as of Acrobat 8.0.
 
Deprecated as of Acrobat 8.0.
 
ASBool AFCalculateFields(PDDoc pdd, ASCab asc)
Deprecated as of Acrobat 8.0.
 
CosObj AFDrawText(CosDoc cd, ASFixedRectP frBbox, PDRotate annotRotation, ASBool bWrap, AFPDWidgetBorder border, AFTextAttributesP textAttrs, ASConstText asText, ASFixed fxMinFontSize, ASFixed fxMaxFontSize)
Lays out the text and creates a Cos XObject with the content stream for the text and required Resources. This API supports Unicode text. If required, different fonts may be used for different characters in the text. It has support for western scripts, Arabic, Hebrew, Thai, Vietnamese, Chinese, Japanese, and Korean. Other scripts may be added in the future.
 
ASBool AFExecuteThisScript(PDDoc pdd, const char* cScript, char** pRetValue)
Executes an AcroForm JavaScript script.
 
Get the default size for a specific field type. This method will get the new default value if the user changes it.
 
ASBool AFGetScriptingContext(void** pcx, void** pobj)
Deprecated as of Acrobat 8.0.
 
 
ASBool AFImportAppearance(CosDoc cd, CosObj* coIcon, AVDoc avd, char* cTitle)
Opens the dialog box that allows the user to select a PDF to use as the icon for a button.
 
void AFLayoutBorder(void* vlayout, AFPDWidgetBorder border, PDColorValue pdcvBrdr, PDColorValue pdcvBg, ASBool bDown)
Draws a border into the layout context.
 
CosObj AFLayoutCreateStream(void* vlayout)
Creates a layout stream that can be used as an annotation appearance.
 
void AFLayoutDelete(void* vlayout)
Frees the layout context.
 
void AFLayoutIconText(void* vLayout, AFPDWidgetPosition nPosition, CosObj coIcon, AFPDWidgetBorder border, TextAppearanceP ta, char* cBytes)
Deprecated as of Acrobat 8.0.
 
void* AFLayoutNew(ASFixedRectP frBbox, PDRotate annotRotation, CosDoc cd)
Creates a new layout context for annotations. Use PDAnnotGetRect() to get the annotation's bounding box, then use this method to define new layout context.
 
void AFLayoutText(void* vlayout, ASBool bMultline, ASBool bWrap, AFPDWidgetBorder border, TextAppearanceP ta, char* cBytes)
Sets the text layout for the annotation.
 
void AFLayoutTextEx(void* vlayout, ASBool bMultline, ASBool bWrap, AFPDWidgetBorder border, TextAppearanceP ta, char* cBytes, ASFixed fxMinFontSize, ASFixed fxMaxFontSize)
Sets the text layout for the annotation.
 
void AFPDDocEnumPDFields(PDDoc doc, ASBool terminals, ASBool parameterIgnored, AFPDFieldEnumProc proc, void* clientData)
Enumerates all PDField objects that exist in a PDDoc.
 
PDField AFPDDocGetPDFieldFromName(PDDoc doc, char* name)
Retrieves a PDField with a given name from a PDDoc. (If multiple fields have the same name, a change to any of them affects all of them.)
 
Ensures that every PDField in the given PDDoc exists.
 
Retrieves the PDField object for which a Cos object is the dictionary.
 
CosObj AFPDFieldGetCosObj(PDField fldP)
Retrieves the Cos object which is the field object of a PDField object.
 
This routine is deprecated: use AFPDFieldGetDefaultTextAppearanceEx() instead.
 
void AFPDFieldGetDefaultTextAppearanceEx(PDField fldP, TextAppearanceP aP, size_t size)
Gets the default text appearance of a field. Use this method to get the font, size, color, and other values that were set through the field properties dialog box.
 
ASUns32 AFPDFieldGetFlags(PDField fldP, AF_Flags_t flagType)
Retrieves the flags of a PDField for a given flag type.
 
char* AFPDFieldGetName(PDField fldP)
Gets the name of a PDField object.
 
CosObj AFPDFieldGetValue(PDField fldP)
Retrieves the value from a PDField. The value is stored in the field entry with the V key.
 
ASBool AFPDFieldIsAnnot(PDField fldP)
Determines whether a PDField is an annotation (PDAnnot), that is, whether the field dictionary is also an annotation. If this is the case, the value of Subtype is Widget.
 
ASBool AFPDFieldIsTerminal(PDField fldP)
Determines whether a field is terminal, which means that the field has no children or it has the same name as its children.
 
ASBool AFPDFieldIsValid(PDField fldP)
Determines whether a field is valid.
 
void AFPDFieldReset(PDField fldP)
Sets a PDField object's value to its default state. This is the value associated with the DV key for the field. If there is no DV key for the field, set the field's value to the NULL Cos object; otherwise, if the field has options, the default DV is the first element of the Opt array.
 
This routine is deprecated. Use AFPDFieldSetDefaultTextAppearanceEx() instead.
 
void AFPDFieldSetDefaultTextAppearanceEx(PDField fldP, TextAppearanceP aP, size_t size)
Sets the default text appearance of a field. Use this method to set the font, size, color, and so on.
 
void AFPDFieldSetFlags(PDField fldP, AF_Flags_t flagType, AFPDFieldFlags_t flags)
Sets the flags of type flagType for a PDField.
 
RetCode AFPDFieldSetOptions(PDField fldP, CosObj array)
Sets the options entry for a field. The options entry has the key Opt and represents a list of options for a choice field.
 
ASBool AFPDFieldSetValue(PDField fldP, CosObj val)
Sets the value for a PDField. The value is stored in the field entry with the V key. The method updates the display of the field and its namesakes; that is, fields with the same fully qualified names, if any. Changing the field dictionary's value for the V entry directly does not change the appearance of the field, which is represented by the AP key.
 
void AFPDFieldValueChanged(PDDoc pdd, PDField fldP)
Deprecated as of Acrobat 8.0.
 
Creates an XObject form from a PDF page. A form XObject is a content stream that can be treated as a single graphics object. Use this method for importing PDF graphics into documents.
 
Gets the border and background colors of an annotation.
 
Gets the border of an annotation.
 
Gets the rotation of the annotation.
 
Sets the border and background color of the annotation.
 
Sets the border of an annotation.
 
ASBool AFTTSEnd()
Finalizes a speech section shutting down the speech engines used by the TTS object. AFTTSIsAvailable() should return false after that. Its use by a plug-in should not be needed at any time, since AcroForms already handles TTS termination. Initialization of TTS is also handled automatically. By calling any function below, AFTTSIsAvailable() should then return true, in case a SAPI engine is installed on the system.
 
Not implemented in 4.05.
 
Gets the number of different speakers available to the current TTS engine.
 
ASUns32 AFTTSGetPitch()
Gets the baseline pitch for the voice of a speaker.
 
Not implemented in 4.05.
 
Gets the name of the current speaker.
 
Gets the speed at which text is being spoken by the TTS engine.
 
Gets the voice name of any of the available speakers in the installed TTS engine.
 
ASUns32 AFTTSGetVolume()
Gets the volume for the speaker.
 
Determines whether the TTS object is available and the Text-to-Speech engine can be used.
 
ASBool AFTTSPause()
Immediately pauses TTS output on a TTS object. Playback of the remaining queued text can be resumed via AFTTSResume().
 
ASBool AFTTSQSilence(ASUns32 duration)
Queues a period of silence into the text.
 
ASBool AFTTSQSound(const char* soundName)
Puts a sound into the queue. The sound can then be performed by AFTTSTalk().
 
ASBool AFTTSQTone(ASUns32 frequency, ASUns32 duration)
Not implemented in 4.05.
 
ASBool AFTTSQueueTextData(const char* textdata, ASBool UseDefaultSpeaker)
Puts text into the queue to be performed by AFTTSTalk().
 
ASBool AFTTSReset()
Stops playback of the currently queued text, and flushes the queue. It resets all the properties of the TTS object to their default values.
 
ASBool AFTTSResume()
Resumes playback of text on a paused TTS object.
 
Not implemented in 4.05.
 
void AFTTSSetNotify(AFTTSNotifyProc proc)
Sets the function to be called when TTS finished speaking. NULL disables callbacks.
 
ASBool AFTTSSetPitch(ASUns32 pitch)
Sets the baseline pitch for the voice of a speaker.
 
ASBool AFTTSSetPunctuations(const char* punctuations)
Not implemented in 4.05.
 
ASBool AFTTSSetSpeaker(const char* voiceName)
Sets the current voice. Valid values are any of those enumerated via AFTTSGetVoiceName() and AFTTSGetNumberOfVoices().
 
Sets the speed at which text is being spoken by the TTS engine.
 
ASBool AFTTSSetVolume(ASUns32 volume)
Sets the speech volume.
 
ASBool AFTTSStop()
Stops playback of currently queued text, and flushes the queue. Playback of queued text cannot be resumed.
 
ASBool AFTTSTalk()
Sends whatever is in the queue to be spoken by the SAPI TTS engine. If the text output had been paused, it resumes playback of the queued text.
 
PDDoc AssembleFormAndImportFDF(PDDoc pdCurrForm, CosDoc cdFDF, ASBool bAddToCurr)
Constructs an Acrobat form from templates and imports an FDF file.
 
CosDoc ExportAsFDF(PDDoc pdForm, CosObj rgIncExcFlds, ASBool bIncl, ASBool bEmpty, ASBool bMenu, ASBool bLoadFields, ASPathName fdfPath)
Exports form data to a CosDoc, which can be written to an FDF file. See the PDF Reference for a description of this format.
 
CosDoc ExportAsFDFEx(PDDoc pdForm, CosObj rgIncExcFlds, ASBool bIncl, ASBool bEmpty, ASBool bMenu, ASBool bLoadFields, ASPathName fdfPath, const char* submitBtnName)
Exports form data to a CosDoc object, which can be written to an FDF file. See the PDF Reference for a description of this format.
 
Exports form data to a CosDoc, which can be written to an FDF file. See the PDF Reference for a description of this format.
 
void ExportAsHtml(PDDoc pdForm, CosObj rgIncExcFlds, ASBool bIncl, ASBool bEmpty, ASFile Hfile)
Exports data from a form to a file in HTML format.
 
void ExportAsHtmlEx(PDDoc pdForm, CosObj rgIncExcFlds, ASBool bIncl, ASBool bEmpty, ASFile Hfile, const char* submitBtnName)
Exports data from a form to a file in HTML format.
 
ASBool ImportAnFDF(PDDoc pdForm, CosDoc cdFDF)
Imports data from an FDF file into a PDDoc object's form. See the PDF Reference for a description of this format.
 
Indicates whether a PDDoc contains an Acrobat form.
 
void ResetForm(PDDoc pdForm, CosObj rgIncExcFlds, ASBool bIncl)
Resets the indicated fields of a PDDoc object's form to their default values.
Defines Detail
AcroFormHFT_LATEST_VERSION 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define AcroFormHFT_LATEST_VERSION (0x00010002)

File: AF_Sel.h
Line: 42
AcroFormHFT_NAME 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define AcroFormHFT_NAME "Forms"

File: AF_Sel.h
Line: 41
AcroFormNum_SEL 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define AcroFormNum_SEL AcroFormLast_SEL - 1

File: AF_Sel.h
Line: 40
AcroTTSHFT_LATEST_VERSION 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define AcroTTSHFT_LATEST_VERSION (0x00010012)

File: AFTTS_Sel.h
Line: 44
AcroTTSHFT_NAME 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define AcroTTSHFT_NAME "TTS"

File: AFTTS_Sel.h
Line: 43
AcroTTSNum_SEL 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define AcroTTSNum_SEL AcroTTSLast_SEL - 1

File: AFTTS_Sel.h
Line: 42
AFAVignore_F 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define AFAVignore_F ((AFPDFieldFlags_t)0x00000001)

File: AF_ExpT.h
Line: 155
Init_AcroFormHFT 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define Init_AcroFormHFT ASExtensionMgrGetHFT(ASAtomFromString(AcroFormHFT_NAME), AcroFormHFT_LATEST_VERSION)

File: FormsHFT.h
Line: 41
Init_AcroTTSHFT 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define Init_AcroTTSHFT ASExtensionMgrGetHFT(ASAtomFromString(AcroTTSHFT_NAME), AcroTTSHFT_LATEST_VERSION)

Description

Use this to initialize and make the TTS HFT functions available to your plug-in.


File: TtsHFT.h
Line: 54
Init_TextAppearanceP 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define Init_TextAppearanceP {\ memset(aP, 0, sizeof(TextAppearance_t));\ (aP)->baseFont = ASAtomNull;\ (aP)->nameFont = ASAtomNull;\ }

Description

Macro for setting text appearance.


File: AF_ExpT.h
Line: 368
kAFOptionsR2LDirection 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define kAFOptionsR2LDirection ((ASUns32)0x0001)

Description

The default paragraph direction is right to left.


File: AF_ExpT.h
Line: 267
SetDefault_TextAppearanceP 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define SetDefault_TextAppearanceP d = fixedOne;\ (aP)->quadding = LeftQ;\ (aP)->nativeZeroDigit = 0x0030;\ }

Description

Macro for setting text appearance. This macro uses Helvetica as the default font.


File: AF_ExpT.h
Line: 383
TextApperanceIsValid 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define TextApperanceIsValid (\ (aP)->quadding <= RightQ && \ (aP)->renderMode <= Invisible_text && \ (aP)->baseFont != ASAtomNull && \ (aP)->textSize >= AutoSize)

Description

Macro for checking whether a text appearance is valid.


File: AF_ExpT.h
Line: 390

Typedefs Detail
AcroForm 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

typedef OPAQUE_64_BITS AcroForm;

File: AF_ExpT.h
Line: 66
AFPDFieldBorder 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

typedef AFPDWidgetBorderRec AFPDFieldBorder;

Field border data type.

See Also


File: AF_ExpT.h
Line: 244
AFPDFieldFlags_t 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

typedef ASUns32 AFPDFieldFlags_t;

Used for the value of flags set by AFPDFieldSetFlags.


File: AF_ExpT.h
Line: 144
AFPDWidgetBorder 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

typedef _AFPDWidgetBorderRec AFPDWidgetBorder;

File: AF_ExpT.h
Line: 236
AFPDWidgetBorderRec 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

typedef _AFPDWidgetBorderRec AFPDWidgetBorderRec;

File: AF_ExpT.h
Line: 236
AFTextAttributesP 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

typedef AFTextAttributesRec AFTextAttributesP;

File: AF_ExpT.h
Line: 314
ExportAsFDFParams 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

typedef _t_ExportAsFDFParams ExportAsFDFParams;

File: AF_ExpT.h
Line: 682
ExportAsFDFParamsRec 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

typedef _t_ExportAsFDFParams ExportAsFDFParamsRec;

File: AF_ExpT.h
Line: 682
TextAppearanceP 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

typedef TextAppearance_t TextAppearanceP;

File: AF_ExpT.h
Line: 360

Enumeration Detail
AF_Flags_t
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

enum AF_Flags_t {
 Flags_Annot = 0,
 
 Flags_Field,
 
 SetFlagsAnnot,
 
 ClrFlagsAnnot,
 
 SetFlagsField,
 
 ClrFlagsField,
 
 Flags_Ignore
}

See Also


File: AF_ExpT.h
Line: 110

Elements
Flags_Annot  

Sets the flags defined in the F key of the annotation to the values specified in the flags parameter of AFPDFieldSetFlags().

 
Flags_Field  

Sets the flags defined in the Ff key of the form field to the values specified in the flags parameter of AFPDFieldSetFlags().

 
SetFlagsAnnot  

Sets the bits in the flags to those that are 1s in the flags parameter of AFPDFieldSetFlags().

 
ClrFlagsAnnot  

Clears the bits in the flags to those that are 1s in the flags parameter of AFPDFieldSetFlags().

 
SetFlagsField  

Sets the bits in the flags to those that are 1s in the flags parameter of AFPDFieldSetFlags().

 
ClrFlagsField  

Clears the bits in the flags to those that are 1s in the flags parameter of AFPDFieldSetFlags().

 
Flags_Ignore  

Does not change any flags for the field or annot.

AF_NotificationSelector_t 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

enum AF_NotificationSelector_t {
 FieldValueWillChange = (ASInt32)0,
 
 FieldValueDidChange,
 
 AcroFormWasCreated,
 
 FieldWasAdded,
 
 FieldWillBeRemoved,
 
 FieldChangedType,
 
 FieldValidateChange,
 
 FieldWillGenerateDisplay,
 
 FDFWillImport,
 
 FDFWillImportHaveDoc,
 
 FDFWillExport,
 
 XFDFWillImport,
 
 TextFieldSelectionDidChange,
 
 FieldAttributeDidChange,
 
 TextFieldValueDidChange,
 
 DynamicDocWillRender,
 
 DynamicDocDidRender,
 
 ContextSelectionDidChange,
 
 AcroFormNumNotifications
}

File: AF_ExpT.h
Line: 470

AFHorizontalAlign 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

enum AFHorizontalAlign {
 kAFAlign_Left,
 
 kAFAlign_Center,
 
 kAFAlign_Right,
 
 kAFAlign_Justify,
 
 kAFAlign_JustifyAll
}

File: AF_ExpT.h
Line: 271

AFPDWidgetBorderStyle 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

enum AFPDWidgetBorderStyle {
 AFPDWBSolid = 0,
 
 AFPDWBDashed,
 
 AFPDWBBeveled,
 
 AFPDWBInset,
 
 AFPDWBUnderline,
 
 AFPDWBInvalid
}

See Also


File: AF_ExpT.h
Line: 202

Elements
AFPDWBSolid  

Strokes the entire perimeter of the widget with a solid line.

 
AFPDWBDashed  

Strokes the entire perimeter of the widget with a dashed line.

 
AFPDWBBeveled  

Equivalent to the AFPDWBSolid style with an additional beveled (pushed-out appearance) border applied inside the solid border.

 
AFPDWBInset  

Equivalent to the AFPDWBBeveled style with an additional beveled (pushed-in appearance) border applied inside the solid border.

 
AFPDWBUnderline  

Strokes the bottom portion of the widget with a underline styled line.

 
AFPDWBInvalid  

Do not change the border.

AFPDWidgetPosition 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

enum AFPDWidgetPosition {
 AFPDWPTextOnly = 0,
 
 AFPDWPIconOnly,
 
 AFPDWPIconOverText,
 
 AFPDWPTextOverIcon,
 
 AFPDWPIconText,
 
 AFPDWPTextIcon,
 
 AFPDWPTextInIcon,
 
 AFPDWPInvalid
}

File: AF_ExpT.h
Line: 246

AFRenderModeFlags 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

enum AFRenderModeFlags {
 Fill_text = 0,
 
 Stroke_text = 1,
 
 FnS_text = 2,
 
 Invisible_text = 3
}

File: AF_ExpT.h
Line: 264

AFVerticalAlign 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

enum AFVerticalAlign {
 kAFAlign_Top,
 
 kAFAlign_Middle,
 
 kAFAlign_Bottom
}

File: AF_ExpT.h
Line: 280


Structure Detail
_AFPDWidgetBorderRec
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

struct _AFPDWidgetBorderRec {
 AFPDWidgetBorderStyle nStyle; 
 
 ASInt32 nWidth; 
}

Form field appearance definitions for the outside border of an annotation.

See Also


File: AF_ExpT.h
Line: 228

Elements
nStyle  

The style of the border. The possible types are solid, dashed, beveled, inset, and underline.

 
nWidth  

The width of the border.

_t_ExportAsFDFParams 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

struct _t_ExportAsFDFParams {
 ASSize_t size; 
 
 AVDoc avForm; 
 
 PDDoc pdForm; 
 
 CosObj rgIncExcFlds; 
 
 ASBool bIncl; 
 
 ASBool bEmpty; 
 
 ASBool bExcludePasswd; 
 
 ASBool bCheckReqd; 
 
 ASAtom asaEncoding; 
 
 ASPathName fdfPath; 
 
 ASFileSys fdfFilesys; 
 
 char* submitBtnName; 
}

A parameter block used in the call to ExportAsFDFWithParams().


File: AF_ExpT.h
Line: 607

Elements
size  

The size of the data structure. It must be set to sizeof(ExportAsFDFParamsRec).

 
avForm  

The AVDoc for the form from which you want to export the data. You can pass NULL if the document does not have an AVDoc (that is, it is open only at the PD level).

 
pdForm  

The PDDoc for the form from which you want to export the data.

 
rgIncExcFlds  

If rgIncExcFlds is CosNewNull(), then all fields are exported, and bIncl is ignored. If it is a CosArray, then the array elements may be:

  • Names of fields (the names may be of non-terminal fields, which is a fast and easy way to cause all their children to be included in the FDF).

  • Arrays whose first element is a field name whose remaining elements are field dictionary key names whose values should be exported in the FDF. For example: [ (My listbox) /AP /Opt ]

  • If rgIncExcFlds contains a single element, which is itself an array as described above, and its first element, which corresponds to the field name, is NULL, then the FDF will include the requested field properties of all fields. For example, [ null /F /Ff ]

This variety of rgIncExcFlds array element can only be used if bIncl is true.

 
bIncl  

If true, then rgIncExcFlds is an array of the fields to export. Otherwise, rgIncExcFlds is an array of the fields to exclude from exporting.

 
bEmpty  

If true, then all fields selected per the criteria above are exported. Otherwise those that have no value are excluded.

 
bExcludePasswd  

If true, the FDF text fields that have the "password" flag set will not be included.

 
bCheckReqd  

If true, an alert pops up if any required field is empty.

 
asaEncoding  

Encoding to use in the produced FDF file for the value of the V entry when it is a string. If ASAtomNull is passed, then ExportAsFDF() will determine which encoding to use. If PDFDocEncoding is passed, then do not perform any encoding conversions and simply send V as is (which means as PDFDocEncoding or Unicode).

Other allowed values are Shift_JIS, BigFive, GBK, and UHC.

 
fdfPath  

The path where the FDF file will be saved (by the client) after it is produced (by ExportAsFDFWithParams()). You need this in order to create an FDF file with an /F key that gives the relative path to the form from the location where the FDF file will be saved. Pass NULL if you want an absolute pathname.

 
fdfFilesys  

Corresponding file system for fdfPath.

 
submitBtnName  

A NULL-terminated string containing the name of the button used to submit. If the value passed is not NULL, then the FDF file will include a field dictionary corresponding to the submit button, which will only contain one key, namely /T. This dictionary is no different than the one you get when an AcroForm has an empty text field (that is, no Value), and bEmpty is true.

AF_NtfyParams_t 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

struct AF_NtfyParams_t {
 PDDoc pdd; 
 
 CPDField_P pCPDFld; 
 
 CWidget_P pCWidget; 
 
 struct _EStrRec* esValue; 
 
 struct _EStrRec* esChange; 
 
 struct _EStrRec* esChangeEx; 
 
 ASBool fieldFull; 
 
 ASInt32 nSelStart; 
 
 ASUns32 nSubmitFlags; 
 
 ASInt32 nSelEnd; 
 
 RetCode rc; 
 
 CosDoc cd; 
 
 ASAtom asaFieldType; 
 
 void* cos2XMLEngine; 
 
 const char* cValue; 
 
 ASInt32 len; 
 
 ASInt32 nCursorPos; 
 
 AVPageView avPageView; 
 
 PDAnnot pdAnnot; 
 
 CAgg_P richChange; 
 
 CAgg_P richChangeEx; 
 
 CAgg_P richValue; 
 
 ASBool bModified; 
}

Deprecated as of Acrobat 8.0.


File: AF_ExpT.h
Line: 511

AFTextAttributesRec 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

struct AFTextAttributesRec {
 size_t size; 
 
 ASText fontName; 
 
 ASReal textSize; 
 
 AFHorizontalAlign horizontalAlignment; 
 
 AFVerticalAlign verticalAlignment; 
 
 PDColorValueRec fillColor; 
 
 ASUns32 options; 
 
 ASUnicodeChar nativeZeroDigit; 
}


File: AF_ExpT.h
Line: 287

Elements
size  

The size of the structure. Clients must initialize with the size of the structure.

 
fontName  

The default font name.

 
textSize  

The point size of the text. When it is fixedZero, it enables text autosizing.

 
horizontalAlignment  

The text justification.

 
verticalAlignment  

The vertical Alignment

 
fillColor  

The text color.

 
options  

Options.

 
nativeZeroDigit  

Native Zero digit.

TextAppearance_t 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

struct TextAppearance_t {
 ASFixed charSpacing; 
 
 ASFixed wordSpacing; 
 
 ASFixed horizontalScale; 
 
 ASFixed leading; 
 
 ASFixed textRise; 
 
 ASFixed textSize; 
 
 ASFixedMatrix textMatrix; 
 
 PDColorValueRec strokeColor; 
 
 PDColorValueRec fillColor; 
 
 ASUns16 renderMode; 
 
 ASUns16 quadding; 
 
 ASAtom baseFont; 
 
 ASAtom nameFont; 
 
 ASUns32 options; 
 
 ASUnicodeChar nativeZeroDigit; 
}

A structure containing information about the text appearance of a field.

See Also


File: AF_ExpT.h
Line: 323

Elements
charSpacing  

The spacing between characters.

 
wordSpacing  

The spacing between words.

 
horizontalScale  

The horizontal scale.

 
leading  

The leading.

 
textRise  

The text rise.

 
textSize  

The point size of the text. When it is fixedZero, it enables text autosizing.

 
textMatrix  

The font matrix.

 
strokeColor  

The pen color.

 
fillColor  

The fill color.

 
renderMode  

The mode.

 
quadding  

The text justification.

 
baseFont  

The default font name.

 
nameFont  

The current font name.

 
options  

Options.

 
nativeZeroDigit  

Native Zero digit.

Callbacks Detail
AF_NotificationFailureProc 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void (*AF_NotificationFailureProc)(ASInt32 error, void *info, void *clientData)

Deprecated as of Acrobat 8.0.


File: AF_ExpT.h
Line: 413
AF_NotificationProc 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void (*AF_NotificationProc)(void *info, void *clientData)

Deprecated as of Acrobat 8.0.


File: AF_ExpT.h
Line: 411
AFPDFieldEnumProc 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool (*AFPDFieldEnumProc)(PDField fldP, void *clientData)

Callback used by AFPDDocEnumPDFields(). It is called once for each PDField in a form.

See Also


File: AF_ExpT.h
Line: 576

Method Detail
AcroFormRegisterObserver()
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASInt32 AcroFormRegisterObserver(AF_NotificationSelector_t notificationID, AF_NotificationProc notifyProc, AF_NotificationFailureProc notifyFailure, void* clientData)

Deprecated as of Acrobat 8.0.

Parameters

notificationID
 
notifyProc
 
notifyFailure
 
clientData

Returns

File: FormsHFTProcs.h
Line: 368
AcroFormUnregisterObserver() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void AcroFormUnregisterObserver(AF_NotificationSelector_t notificationID, ASInt32 observerID)

Deprecated as of Acrobat 8.0.

Parameters

notificationID
 
observerID


File: FormsHFTProcs.h
Line: 371
AFCalculateFields() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool AFCalculateFields(PDDoc pdd, ASCab asc)

Deprecated as of Acrobat 8.0.

Parameters

pdd
 
asc

Returns

File: FormsHFTProcs.h
Line: 784
AFDrawText() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

CosObj AFDrawText(CosDoc cd, ASFixedRectP frBbox, PDRotate annotRotation, ASBool bWrap, AFPDWidgetBorder border, AFTextAttributesP textAttrs, ASConstText asText, ASFixed fxMinFontSize, ASFixed fxMaxFontSize)

Lays out the text and creates a Cos XObject with the content stream for the text and required Resources. This API supports Unicode text. If required, different fonts may be used for different characters in the text. It has support for western scripts, Arabic, Hebrew, Thai, Vietnamese, Chinese, Japanese, and Korean. Other scripts may be added in the future.

Parameters

cd — 

The CosDoc.

 
frBbox — 

The bounding box of the area for text and border data to flow into.

 
annotRotation — 

The rotation of the annotation.

 
bWrap — 

If true, the text will wrap.

 
border — 

The border appearance that defines the width.

 
textAttrs — 

The minimum font size, when using autosizing.

 
asText — 

The maximum font size, when using autosizing and line style of a border.

 
fxMinFontSize — 

A pointer to structure containing font, point size, color information, alignment, and writing direction.

 
fxMaxFontSize — 

The text string for the layout.

Returns

A stream CosObj. If the operation fails, then CosNewNull() is returned.


File: FormsHFTProcs.h
Line: 808
AFExecuteThisScript() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool AFExecuteThisScript(PDDoc pdd, const char* cScript, char** pRetValue)

Executes an AcroForm JavaScript script.

Parameters

pdd — 

The PDDoc in which the script is to be executed.

 
cScript — 

A string containing the text of the script to be executed. If it is Unicode, the string must begin with 0xFEFF and end with 2 NULL bytes. If this is not the case, it is assumed to be in the application's language encoding, as returned by AVAppGetLanguageEncoding().

 
pRetValue — 

To get a return value from the execution of the script, pass a non-NULL value for this parameter. If, upon return, *pRetVal is non-NULL, the caller should dispose of the string by calling ASFree(). If present, the value will be in host encoding.

Returns

The JavaScript value of event.rc. This function pre-initializes it to true; a script may set it to false if desired.


File: FormsHFTProcs.h
Line: 755
AFGetDefaultFieldSize() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void AFGetDefaultFieldSize(ASAtom fieldType, ASFixedPoint* asfp)

Get the default size for a specific field type. This method will get the new default value if the user changes it.

Parameters

fieldType — 

The ASAtom corresponding to the field type. The string for the type can be converted to an ASAtom using ASAtomFromString().

 
asfp — 

(Filled by the method) A pointer to a point whose coordinates correspond to width and height of the field.


File: FormsHFTProcs.h
Line: 849
AFGetScriptingContext() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool AFGetScriptingContext(void** pcx, void** pobj)

Deprecated as of Acrobat 8.0.

Parameters

pcx
 
pobj

Returns

File: FormsHFTProcs.h
Line: 374
AFGetScriptingContextEx() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool AFGetScriptingContextEx(ScriptingData data)

Parameters

data

Returns

File: FormsHFTProcs.h
Line: 733
AFImportAppearance() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool AFImportAppearance(CosDoc cd, CosObj* coIcon, AVDoc avd, char* cTitle)

Opens the dialog box that allows the user to select a PDF to use as the icon for a button.

Parameters

cd — 

The CosDoc that contains the appearance you are trying to import.

 
coIcon — 

If AFImportAppearance() is successful, coIcon is a pointer to a CosObj that will contain the Cos representation of the appearance.

 
avd — 

The AVDoc that you want as the parent for the window. You can pass NULL if you do not have an AVDoc.

 
cTitle — 

The window title of the dialog box when it appears. You can pass NULL if you want the title of the dialog box to be the same as it is when brought up through the field properties dialog.

Returns

true if appearance was imported properly, false otherwise.


File: FormsHFTProcs.h
Line: 698
AFLayoutBorder() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void AFLayoutBorder(void* vlayout, AFPDWidgetBorder border, PDColorValue pdcvBrdr, PDColorValue pdcvBg, ASBool bDown)

Draws a border into the layout context.

Parameters

vlayout — 

The layout of the annotation. Use AFLayoutNew() to create a new layout before calling this method.

 
border — 

A pointer to a structure containing information about the appearance a border.

 
pdcvBrdr — 

A PDColorValue structure representing the color of the annotations border.

 
pdcvBg — 

A PDColorValue structure representing the color of the annotations background.

 
bDown — 

A boolean value specifying whether the background should be drawn as it is drawn in forms while being pressed (clicked by the mouse). If true, it is drawn as if it is a field that is being pressed.

See Also


File: FormsHFTProcs.h
Line: 560
AFLayoutCreateStream() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

CosObj AFLayoutCreateStream(void* vlayout)

Creates a layout stream that can be used as an annotation appearance.

Parameters

vlayout — 

The layout of the annotation. Use AFLayoutNew() to create a new layout before calling this method.

Returns

A stream CosObj.

See Also


File: FormsHFTProcs.h
Line: 781
AFLayoutDelete() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void AFLayoutDelete(void* vlayout)

Frees the layout context.

Parameters

vlayout — 

The layout of the annotation to remove.

See Also


File: FormsHFTProcs.h
Line: 539
AFLayoutIconText() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void AFLayoutIconText(void* vLayout, AFPDWidgetPosition nPosition, CosObj coIcon, AFPDWidgetBorder border, TextAppearanceP ta, char* cBytes)

Deprecated as of Acrobat 8.0.

Parameters

vLayout
 
nPosition
 
coIcon
 
border
 
ta
 
cBytes


File: FormsHFTProcs.h
Line: 730
AFLayoutNew() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void* AFLayoutNew(ASFixedRectP frBbox, PDRotate annotRotation, CosDoc cd)

Creates a new layout context for annotations. Use PDAnnotGetRect() to get the annotation's bounding box, then use this method to define new layout context.

Parameters

frBbox — 

The bounding box of the area for text and border data to flow into.

 
annotRotation — 

The rotation of the annotation.

 
cd — 

The CosDoc.

Returns

A new layout.

See Also


File: FormsHFTProcs.h
Line: 770
AFLayoutText() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void AFLayoutText(void* vlayout, ASBool bMultline, ASBool bWrap, AFPDWidgetBorder border, TextAppearanceP ta, char* cBytes)

Sets the text layout for the annotation.

It raises an exception if the field is a radio box or button.

Parameters

vlayout — 

The layout of the annotation.

 
bMultline — 

If true, the text can use multiple lines in a text field. Otherwise, the text is a single line.

 
bWrap — 

If true, the text will wrap.

 
border — 

The border appearance that defines the width and line style of a border. The border of the annotation should be the same as in your call to AFLayoutBorder().

 
ta — 

A pointer to a structure containing font, point size, and color information. You should initialize the structure with the SetDefaultTextAppearanceP macro which defaults to Helvetica.

 
cBytes — 

The text string for the layout.

See Also


File: FormsHFTProcs.h
Line: 585
AFLayoutTextEx() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void AFLayoutTextEx(void* vlayout, ASBool bMultline, ASBool bWrap, AFPDWidgetBorder border, TextAppearanceP ta, char* cBytes, ASFixed fxMinFontSize, ASFixed fxMaxFontSize)

Sets the text layout for the annotation.

It raises an exception if the field is a radio box or button.

Parameters

vlayout — 

The layout of the annotation.

 
bMultline — 

If true, the text can use multiple lines in a text field. Otherwise, the text is a single line.

 
bWrap — 

If true, the text will wrap.

 
border — 

The border appearance that defines the width and line style of a border. The border of the annotation should be the same as in your call to AFLayoutBorder().

 
ta — 

A pointer to a structure containing font, point size, and color information. You should initialize the structure with the SetDefaultTextAppearanceP macro which defaults to Helvetica.

 
cBytes — 

The text string for the layout.

 
fxMinFontSize — 

The minimum font size, when using autosizing.

 
fxMaxFontSize — 

The maximum font size, when using autosizing.

See Also


File: FormsHFTProcs.h
Line: 727
AFPDDocEnumPDFields() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void AFPDDocEnumPDFields(PDDoc doc, ASBool terminals, ASBool parameterIgnored, AFPDFieldEnumProc proc, void* clientData)

Enumerates all PDField objects that exist in a PDDoc.

Parameters

doc — 

The PDDoc whose PDField objects are enumerated.

 
terminals — 

If true, only PDField objects without children are enumerated.

 
parameterIgnored — 

This parameter is no longer used (it is ignored).

 
proc — 

A user-supplied callback that is called for each PDField. The enumeration terminates if proc returns false.

 
clientData — 

A pointer to user-specified data that is passed to proc each time it is called.


File: FormsHFTProcs.h
Line: 53
AFPDDocGetPDFieldFromName() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

PDField AFPDDocGetPDFieldFromName(PDDoc doc, char* name)

Retrieves a PDField with a given name from a PDDoc. (If multiple fields have the same name, a change to any of them affects all of them.)

Parameters

doc — 

The PDDoc containing the field.

 
name — 

The name of the field to retrieve.

Returns

The PDField specified by name. It returns NULL if there is no PDField with the given name in the PDDoc.

See Also


File: FormsHFTProcs.h
Line: 65
AFPDDocLoadPDFields() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void AFPDDocLoadPDFields(PDDoc doc)

Ensures that every PDField in the given PDDoc exists.

Parameters

doc — 

The PDDoc for the form whose PDField objects are loaded.


File: FormsHFTProcs.h
Line: 39
AFPDFieldFromCosObj() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

PDField AFPDFieldFromCosObj(CosObj dict)

Retrieves the PDField object for which a Cos object is the dictionary.

Parameters

dict — 

The Cos object for which to retrieve the corresponding PDField object.

Returns

The PDField corresponding to dict. It returns NULL if the Cos object is not a PDField.

See Also


File: FormsHFTProcs.h
Line: 76
AFPDFieldGetCosObj() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

CosObj AFPDFieldGetCosObj(PDField fldP)

Retrieves the Cos object which is the field object of a PDField object.

Parameters

fldP — 

The PDField object for which to retrieve the corresponding Cos object.

Returns

A Cos object corresponding to the PDField object (fldP).

See Also


File: FormsHFTProcs.h
Line: 89
AFPDFieldGetDefaultTextAppearance() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void AFPDFieldGetDefaultTextAppearance(PDField fldP, TextAppearanceP aP)

This routine is deprecated: use AFPDFieldGetDefaultTextAppearanceEx() instead.

Gets the default text appearance of a field. Use this method to get the font, size, color, and so on (values that were set through the field properties dialog box).

Parameters

fldP — 

The PDField object for which to retrieve the text appearance.

 
aP — 

A pointer to a structure describing the text appearance. It returns font, size, quadding, text color, and so on up to and including the nameFont field in the text appearance structure. The remaining fields will not be initialized.

See Also


File: FormsHFTProcs.h
Line: 616
AFPDFieldGetDefaultTextAppearanceEx() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void AFPDFieldGetDefaultTextAppearanceEx(PDField fldP, TextAppearanceP aP, size_t size)

Gets the default text appearance of a field. Use this method to get the font, size, color, and other values that were set through the field properties dialog box.

Parameters

fldP — 

The PDField object for which to retrieve the text appearance.

 
aP — 

A pointer to a structure describing the text appearance. It returns font, size, alignment, text color, and so on.

 
size — 

The size in bytes of the structure referenced by aP. Fields in the structure up to this size will be initialized.

See Also


File: FormsHFTProcs.h
Line: 823
AFPDFieldGetFlags() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASUns32 AFPDFieldGetFlags(PDField fldP, AF_Flags_t flagType)

Retrieves the flags of a PDField for a given flag type.

Parameters

fldP — 

The PDField whose flags are obtained.

 
flagType — 

The type of flags to obtain.

Returns

The value of the flags of flagType.

See Also


File: FormsHFTProcs.h
Line: 148
AFPDFieldGetName() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

char* AFPDFieldGetName(PDField fldP)

Gets the name of a PDField object.

Parameters

fldP — 

The PDField whose name is retrieved.

Returns

A NULL-terminated string.

See Also


File: FormsHFTProcs.h
Line: 160
AFPDFieldGetValue() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

CosObj AFPDFieldGetValue(PDField fldP)

Retrieves the value from a PDField. The value is stored in the field entry with the V key.

Values can be inherited. If a PDField Cos object does not have a V key, its value is inherited from a parent's V key (the parent must have the same name as the PDField). For example, radio buttons inherit values this way.

Parameters

fldP — 

The PDField whose value is retrieved.

Returns

The value of the field as a CosObj. If the field has no value, NULL is returned.

See Also


File: FormsHFTProcs.h
Line: 136
AFPDFieldIsAnnot() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool AFPDFieldIsAnnot(PDField fldP)

Determines whether a PDField is an annotation (PDAnnot), that is, whether the field dictionary is also an annotation. If this is the case, the value of Subtype is Widget.

Parameters

fldP — 

The field in question.

Returns

true if the PDField is an Acrobat annotation, false otherwise.

See Also


File: FormsHFTProcs.h
Line: 172
AFPDFieldIsTerminal() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool AFPDFieldIsTerminal(PDField fldP)

Determines whether a field is terminal, which means that the field has no children or it has the same name as its children.

Parameters

fldP — 

The PDField to test.

Returns

true if fldP is valid and all its children (if any) have the same name as fldP. Otherwise all have unique names.

See Also


File: FormsHFTProcs.h
Line: 114
AFPDFieldIsValid() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool AFPDFieldIsValid(PDField fldP)

Determines whether a field is valid.

Parameters

fldP — 

The field to test.

Returns

true if fldP is a valid PDField, false otherwise.

See Also


File: FormsHFTProcs.h
Line: 102
AFPDFieldReset() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void AFPDFieldReset(PDField fldP)

Sets a PDField object's value to its default state. This is the value associated with the DV key for the field. If there is no DV key for the field, set the field's value to the NULL Cos object; otherwise, if the field has options, the default DV is the first element of the Opt array.

A DV entry's value can be inherited from a parent (just like V).

The PDField object's value is set only if it is terminal (check this by calling AFPDFieldIsTerminal()).

Parameters

fldP — 

The PDField to reset.

See Also


File: FormsHFTProcs.h
Line: 243
AFPDFieldSetDefaultTextAppearance() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void AFPDFieldSetDefaultTextAppearance(PDField fldP, TextAppearanceP aP)

This routine is deprecated. Use AFPDFieldSetDefaultTextAppearanceEx() instead.

Sets the default text appearance of a field. Use this method to set the font, size, color, and so on.

Parameters

fldP — 

The PDField object for which to set the text appearance.

 
aP — 

A pointer to a structure describing the text appearance to set. This routine will use the values up to and including the nameFont field in the text appearance structure.

See Also


File: FormsHFTProcs.h
Line: 632
AFPDFieldSetDefaultTextAppearanceEx() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void AFPDFieldSetDefaultTextAppearanceEx(PDField fldP, TextAppearanceP aP, size_t size)

Sets the default text appearance of a field. Use this method to set the font, size, color, and so on.

Parameters

fldP — 

The PDField object for which to set the text appearance.

 
aP — 

A pointer to a structure describing the text appearance to set.

 
size — 

The size in bytes of the structure referenced by aP. Fields in the structure up to this size will be used. If there are additional fields after this size, default values will be used.

See Also


File: FormsHFTProcs.h
Line: 838
AFPDFieldSetFlags() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void AFPDFieldSetFlags(PDField fldP, AF_Flags_t flagType, AFPDFieldFlags_t flags)

Sets the flags of type flagType for a PDField.

The flags of a field's children (if any) are also set.

Parameters

fldP — 

The PDField for which to set flags and children's flags.

 
flagType — 

The type of the flags to set. If its value is Flags_Annot and the PDField is not an annotation, no flags are changed.

 
flags — 

The value of the flags.

See Also


File: FormsHFTProcs.h
Line: 210
AFPDFieldSetOptions() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

RetCode AFPDFieldSetOptions(PDField fldP, CosObj array)

Sets the options entry for a field. The options entry has the key Opt and represents a list of options for a choice field.

If the field is not valid, remove the options entry.

Parameters

fldP — 

The PDField whose options are set.

 
array — 

The value to set in the options entry.

Returns

Good if the operation succeeded, Bad otherwise.

See Also


File: FormsHFTProcs.h
Line: 225
AFPDFieldSetValue() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool AFPDFieldSetValue(PDField fldP, CosObj val)

Sets the value for a PDField. The value is stored in the field entry with the V key. The method updates the display of the field and its namesakes; that is, fields with the same fully qualified names, if any. Changing the field dictionary's value for the V entry directly does not change the appearance of the field, which is represented by the AP key.

Parameters

fldP — 

The field whose value is set.

 
val — 

The field's new value. If it is different than the previous value, all previous instances of value keys (V) in the field's dictionary and those of its namesakes (fields with the same fully qualified name) are removed.

Returns

See Also


File: FormsHFTProcs.h
Line: 193
AFPDFieldValueChanged() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void AFPDFieldValueChanged(PDDoc pdd, PDField fldP)

Deprecated as of Acrobat 8.0.

Parameters

pdd
 
fldP


File: FormsHFTProcs.h
Line: 588
AFPDFormFromPage() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

CosObj AFPDFormFromPage(CosDoc cd, PDPage pdp)

Creates an XObject form from a PDF page. A form XObject is a content stream that can be treated as a single graphics object. Use this method for importing PDF graphics into documents.

Parameters

cd — 

The CosDoc in which the XObject will be created.

 
pdp — 

The PDPage from which to create the XObject.

Returns

A Cos object pointing to the XObject on the PDF page.


File: FormsHFTProcs.h
Line: 528
AFPDWidgetGetAreaColors() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void AFPDWidgetGetAreaColors(PDAnnot pdan, PDColorValue borderP, PDColorValue bkgndP)

Gets the border and background colors of an annotation.

Parameters

pdan — 

The annotation.

 
borderP — 

(Filled by the method) A pointer to a structure representing the border color of the annotation.

 
bkgndP — 

(Filled by the method) A pointer to a structure representing the background color of the annotation.

See Also


File: FormsHFTProcs.h
Line: 667
AFPDWidgetGetBorder() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool AFPDWidgetGetBorder(PDAnnot pdan, AFPDWidgetBorder pdwb)

Gets the border of an annotation.

Parameters

pdan — 

The annotation.

 
pdwb — 

(Filled by the method) A pointer to a structure describing the form field appearance definitions for the outside border of an annotation.

Returns

true if successful getting the border, false otherwise.

See Also


File: FormsHFTProcs.h
Line: 643
AFPDWidgetGetRotation() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

PDRotate AFPDWidgetGetRotation(PDAnnot pdan)

Gets the rotation of the annotation.

Parameters

pdan — 

The annotation widget.

Returns

Returns an ASAtom object representing the annotation's rotation with respect to the page.


File: FormsHFTProcs.h
Line: 598
AFPDWidgetSetAreaColors() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void AFPDWidgetSetAreaColors(PDAnnot pdan, PDColorValue borderP, PDColorValue bkgndP)

Sets the border and background color of the annotation.

Parameters

pdan — 

The annotation.

 
borderP — 

A pointer to a structure representing the border color of the annotation.

 
bkgndP — 

A pointer to a structure representing the background color of the annotation.

See Also


File: FormsHFTProcs.h
Line: 679
AFPDWidgetSetBorder() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void AFPDWidgetSetBorder(PDAnnot pdan, AFPDWidgetBorder pdwb)

Sets the border of an annotation.

Parameters

pdan — 

The annotation whose change border appearance will be set.

 
pdwb — 

A pointer to a structure describing the form field appearance definitions for the outside border of an annotation. Possible border types are solid, dashed, beveled, inset, and underline.

See Also


File: FormsHFTProcs.h
Line: 655
AFTTSEnd() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool AFTTSEnd()

Finalizes a speech section shutting down the speech engines used by the TTS object. AFTTSIsAvailable() should return false after that. Its use by a plug-in should not be needed at any time, since AcroForms already handles TTS termination. Initialization of TTS is also handled automatically. By calling any function below, AFTTSIsAvailable() should then return true, in case a SAPI engine is installed on the system.

Returns

File: TtsHFTProcs.h
Line: 37
AFTTSGetCharacterScale() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASUns32 AFTTSGetCharacterScale()

Not implemented in 4.05.

Returns

File: TtsHFTProcs.h
Line: 173
AFTTSGetNumberOfVoices() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASUns32 AFTTSGetNumberOfVoices()

Gets the number of different speakers available to the current TTS engine.

Returns

The number of speakers available.

See Also


File: TtsHFTProcs.h
Line: 201
AFTTSGetPitch() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASUns32 AFTTSGetPitch()

Gets the baseline pitch for the voice of a speaker.

Returns

The baseline pitch. The valid range is from 0 to 10, with 5 being the default for the speaker.

See Also

AFTTSSetPitch Gets the name of the current speaker.
AFTTSSetSpeaker

File: TtsHFTProcs.h
Line: 194
AFTTSGetPunctuations() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

char* AFTTSGetPunctuations()

Not implemented in 4.05.

Returns

File: TtsHFTProcs.h
Line: 162
AFTTSGetSpeaker() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

char* AFTTSGetSpeaker()

Gets the name of the current speaker.

Returns

The name of the current speaker.

See Also


File: TtsHFTProcs.h
Line: 160
AFTTSGetSpeechRate() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASUns32 AFTTSGetSpeechRate()

Gets the speed at which text is being spoken by the TTS engine.

Returns

The speed, in words per minute, at which text is being spoken.

See Also


File: TtsHFTProcs.h
Line: 171
AFTTSGetVoiceName() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

char* AFTTSGetVoiceName(ASInt32 index)

Gets the voice name of any of the available speakers in the installed TTS engine.

Parameters

index — 

The index of the speaker.

Returns

The name of the voice.

See Also


File: TtsHFTProcs.h
Line: 144
AFTTSGetVolume() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASUns32 AFTTSGetVolume()

Gets the volume for the speaker.

Returns

The volume. Valid values are from 0 (mute) to 10 (loudest). The default is 5.

See Also


File: TtsHFTProcs.h
Line: 185
AFTTSIsAvailable() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool AFTTSIsAvailable()

Determines whether the TTS object is available and the Text-to-Speech engine can be used.

Returns

true if the Text-to-Speech engine can be used, false otherwise.


File: TtsHFTProcs.h
Line: 154
AFTTSPause() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool AFTTSPause()

Immediately pauses TTS output on a TTS object. Playback of the remaining queued text can be resumed via AFTTSResume().

Returns

true if the speech engine is available, false otherwise.

See Also


File: TtsHFTProcs.h
Line: 117
AFTTSQSilence() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool AFTTSQSilence(ASUns32 duration)

Queues a period of silence into the text.

Parameters

duration — 

The amount of silence in milliseconds.

Returns

true if the speech engine is available, false otherwise.

See Also


File: TtsHFTProcs.h
Line: 100
AFTTSQSound() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool AFTTSQSound(const char* soundName)

Puts a sound into the queue. The sound can then be performed by AFTTSTalk().

Parameters

soundName — 

The sound name, which can be one of the following:

  • ActionCopy

  • ActionCut

  • ActionDelete

  • ActionPaste

  • DocActive

  • DocClose

  • DocOpen

  • DocPrint

  • DocSave

  • KeyEnd

  • KeyHome

  • PageTurn

This list can be augmented by adding sound files to the SoundCues folder in Acrobat's installation, in 22kHz 16-bit PCM .wav format.

Returns

true if the speech engine is available, false otherwise.

See Also

AFTTSQSilence
AFTTSQueueTextData Puts text into the queue to be performed by AFTTSTalk().
AFTTSQSilence
AFTTSQSound

File: TtsHFTProcs.h
Line: 88
AFTTSQTone() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool AFTTSQTone(ASUns32 frequency, ASUns32 duration)

Not implemented in 4.05.

Parameters

frequency
 
duration

Returns

File: TtsHFTProcs.h
Line: 90
AFTTSQueueTextData() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool AFTTSQueueTextData(const char* textdata, ASBool UseDefaultSpeaker)

Puts text into the queue to be performed by AFTTSTalk().

Parameters

textdata — 

The text that will be put into the queue.

 
UseDefaultSpeaker — 

Whether to use the default speaker.

Returns

true if the speech engine is available, false otherwise.

See Also


File: TtsHFTProcs.h
Line: 48
AFTTSReset() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool AFTTSReset()

Stops playback of the currently queued text, and flushes the queue. It resets all the properties of the TTS object to their default values.

Returns

true if the speech engine is available, false otherwise.

See Also


File: TtsHFTProcs.h
Line: 136
AFTTSResume() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool AFTTSResume()

Resumes playback of text on a paused TTS object.

Returns

true if the speech engine is available, false otherwise.

See Also


File: TtsHFTProcs.h
Line: 107
AFTTSSetCharacterScale() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool AFTTSSetCharacterScale(ASUns32 chrScale)

Not implemented in 4.05.

Parameters

chrScale

Returns

File: TtsHFTProcs.h
Line: 222
AFTTSSetNotify() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void AFTTSSetNotify(AFTTSNotifyProc proc)

Sets the function to be called when TTS finished speaking. NULL disables callbacks.

Parameters

proc


File: TtsHFTProcs.h
Line: 243
AFTTSSetPitch() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool AFTTSSetPitch(ASUns32 pitch)

Sets the baseline pitch for the voice of a speaker.

Parameters

pitch — 

The baseline pitch. The valid range is from 0 to 10, with 5 being the default for the speaker.

Returns

true if the speech engine is available, false otherwise.

See Also


File: TtsHFTProcs.h
Line: 240
AFTTSSetPunctuations() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool AFTTSSetPunctuations(const char* punctuations)

Not implemented in 4.05.

Parameters

punctuations

Returns

File: TtsHFTProcs.h
Line: 211
AFTTSSetSpeaker() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool AFTTSSetSpeaker(const char* voiceName)

Sets the current voice. Valid values are any of those enumerated via AFTTSGetVoiceName() and AFTTSGetNumberOfVoices().

Parameters

voiceName — 

The speaker name.

Returns

true if the speech engine is available, false otherwise.

See Also


File: TtsHFTProcs.h
Line: 209
AFTTSSetSpeechRate() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool AFTTSSetSpeechRate(ASUns32 speed)

Sets the speed at which text is being spoken by the TTS engine.

Parameters

speed — 

The speed in words per minute.

Returns

true if the speech engine is available, false otherwise.

See Also


File: TtsHFTProcs.h
Line: 220
AFTTSSetVolume() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool AFTTSSetVolume(ASUns32 volume)

Sets the speech volume.

Parameters

volume — 

The volume. Valid values are from 0 (mute) to 10 (loudest).

Returns

true if the speech engine is available, false otherwise.

See Also


File: TtsHFTProcs.h
Line: 230
AFTTSStop() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool AFTTSStop()

Stops playback of currently queued text, and flushes the queue. Playback of queued text cannot be resumed.

Returns

true if the speech engine is available, false otherwise.

See Also


File: TtsHFTProcs.h
Line: 125
AFTTSTalk() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool AFTTSTalk()

Sends whatever is in the queue to be spoken by the SAPI TTS engine. If the text output had been paused, it resumes playback of the queued text.

Returns

true if the speech engine is available, false otherwise.

See Also


File: TtsHFTProcs.h
Line: 57
AssembleFormAndImportFDF() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

PDDoc AssembleFormAndImportFDF(PDDoc pdCurrForm, CosDoc cdFDF, ASBool bAddToCurr)

Constructs an Acrobat form from templates and imports an FDF file.

Parameters

pdCurrForm — 

The current form being viewed, if any, at the time cdFDF is being imported. This parameter can be NULL; if it is not NULL, then cdFDF can refer to templates in the current form by omitting the F key in the TRef dictionary. Even if the F key is not NULL, it can be a relative path (as opposed to an absolute path), as long as pdCurrForm is not NULL.

 
cdFDF — 

The FDF file being imported.

 
bAddToCurr — 

If true (and pdCurrForm is not NULL), then instead of creating a new form, the templates spawn pages that are appended at the end of pdCurrForm (and the function returns pdCurrForm).

Returns

The PDDoc for the newly-created form (or pdCurrForm, if bAddToCurr is true).

See Also


File: FormsHFTProcs.h
Line: 502
ExportAsFDF() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

CosDoc ExportAsFDF(PDDoc pdForm, CosObj rgIncExcFlds, ASBool bIncl, ASBool bEmpty, ASBool bMenu, ASBool bLoadFields, ASPathName fdfPath)

Exports form data to a CosDoc, which can be written to an FDF file. See the PDF Reference for a description of this format.

To create an FDF file from the CosDoc, call CosDocSaveToFile().

Parameters

pdForm — 

The PDDoc for the form for which to export the data.

 
rgIncExcFlds — 

If this parameter's value is CosNewNull(), then all fields are exported and bIncl is ignored. If this parameter is a CosArray, then the array elements may be:

  • Names of fields (the names may be of non-terminal fields, which is a fast and easy way to cause all their children to be included in the FDF file).

  • Arrays whose first element is a field name, and the rest of whose elements are field dictionary key names whose values should be exported in the FDF file.

    For example: [ (My listbox) /AP /Opt ]

    This variety of rgIncExcFlds array element can only be used if bIncl is true (see below).

  • If rgIncExcFlds contains a single element, which is itself an array as described above, and its first element, which corresponds to the field name, is NULL, then the FDF file will include the requested field properties of all fields.

    For example: [ null /F /Ff ]

 
bIncl — 

If true, rgIncExcFlds is an array of the fields to export. Otherwise, rgIncExcFlds is an array of the fields to exclude from exporting.

 
bEmpty — 

If true, all fields selected per the above criteria are exported. If false, exclude fields that have no value.

 
bMenu — 

If true, suppresses saving text fields that have the "password" flag set, and does not force filling in required fields when creating an FDF file.

 
bLoadFields — 

IN Not used.

 
fdfPath — 

IN The path where the FDF file will be saved (by the client of ExportAsFDF()) after it is produced. You need this in order to create an FDF file with an F key that gives the relative path to the form from the location where the FDF file will be saved. Pass NULL if an absolute path name is desired.

Returns

The FDF CosDoc object containing the exported data.

See Also

Exceptions

gAFpdErrExportFdf is raised if it cannot export field data. The viewer may raise other exceptions.

File: FormsHFTProcs.h
Line: 308
ExportAsFDFEx() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

CosDoc ExportAsFDFEx(PDDoc pdForm, CosObj rgIncExcFlds, ASBool bIncl, ASBool bEmpty, ASBool bMenu, ASBool bLoadFields, ASPathName fdfPath, const char* submitBtnName)

Exports form data to a CosDoc object, which can be written to an FDF file. See the PDF Reference for a description of this format.

To create an FDF file from this CosDoc object, call CosDocSaveToFile().

Parameters

pdForm — 

A PDDoc for the form whose data is exported.

 
rgIncExcFlds — 

If this parameter's value is CosNewNull(), then all fields are exported, and bIncl is ignored. If it is a CosArray, then the array elements may be:

  • Names of fields (the names may be of non-terminal fields, which is a fast and easy way to cause all their children to be included in the FDF file).

  • Arrays whose first element is a field name, and the rest of whose elements are field dictionary key names whose values should be exported in the FDF file.

    For example: [ (My listbox) /AP /Opt ]

    This variety of rgIncExcFlds array element can only be used if bIncl is true (see below).

  • If rgIncExcFlds contains a single element, which is itself an array as described above, and its first element, which corresponds to the field name, is NULL, then the FDF file will include the requested field properties of all fields.

    For example: [ null /F /Ff ]

 
bIncl — 

If true, rgIncExcFlds is an array of the fields to export. Otherwise, rgIncExcFlds is an array of the fields to exclude from exporting.

 
bEmpty — 

If true, all fields selected per the above criteria are exported. If false, exclude fields that have no value.

 
bMenu — 

IN If true, suppresses saving text fields that have the "password" flag set, and does not force filling-in required fields when creating an FDF file.

 
bLoadFields — 

IN Not used.

 
fdfPath — 

IN The path where the FDF file will be saved (by the client of ExportAsFDF()) after it is produced. You need this in order to create an FDF file with an F key that gives the relative path to the form from the location where the FDF file will be saved. Pass NULL if an absolute path name is desired.

 
submitBtnName — 

IN A NULL-terminated string containing the name of the button used to submit. If the value passed is not NULL, then the FDF file will include a field dictionary corresponding to the submit button, which will only contain one key (T).

Note that this dictionary is no different than the one you get when an AcroForm has an empty text field (that is, no value), and parameter bEmpty is true.

Returns

The FDF CosDoc containing the exported data.

See Also

Exceptions

gAFpdErrExportFdf is raised if field data cannot be exported. The viewer may raise other exceptions.

File: FormsHFTProcs.h
Line: 449
ExportAsFDFWithParams() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

CosDoc ExportAsFDFWithParams(ExportAsFDFParams params)

Exports form data to a CosDoc, which can be written to an FDF file. See the PDF Reference for a description of this format.

Parameters

params — 

An ExportAsFDFParamsRec structure.

Returns

The FDF CosDoc containing the exported data.

See Also

Exceptions

gAFpdErrExportFdf is raised if field data cannot be exported. The viewer may raise other exceptions.

File: FormsHFTProcs.h
Line: 517
ExportAsHtml() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void ExportAsHtml(PDDoc pdForm, CosObj rgIncExcFlds, ASBool bIncl, ASBool bEmpty, ASFile Hfile)

Exports data from a form to a file in HTML format.

Parameters

pdForm — 

The PDDoc for the form whose data is exported.

 
rgIncExcFlds — 

If this parameter's value is CosNewNull(), then all fields are exported, and bIncl is ignored. If it is a CosArray, then the array elements must be indirect references to field dictionaries.

 
bIncl — 

If true, rgIncExcFlds is an array of the fields to export. Otherwise, rgIncExcFlds is an array of the fields to exclude from exporting.

 
bEmpty — 

If true, all fields selected per the above criteria are exported. If false, exclude fields that have no value.

 
Hfile — 

The file to which the HTML data is written.

See Also


File: FormsHFTProcs.h
Line: 326
ExportAsHtmlEx() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void ExportAsHtmlEx(PDDoc pdForm, CosObj rgIncExcFlds, ASBool bIncl, ASBool bEmpty, ASFile Hfile, const char* submitBtnName)

Exports data from a form to a file in HTML format.

Parameters

pdForm — 

The PDDoc for the form whose data is exported.

 
rgIncExcFlds — 

If this parameter's value is CosNewNull(), then all fields are exported, and bIncl is ignored. If it is a CosArray, then the array elements must be names of fields. The names may be of non-terminal fields, which is a fast and easy way to cause all their children to be exported.

 
bIncl — 

If true, rgIncExcFlds is an array of the fields to export. Otherwise, rgIncExcFlds is an array of the fields to exclude from exporting.

 
bEmpty — 

If true, all fields selected per the above criteria are exported. If false, exclude fields that have no value.

 
Hfile — 

The file to which the HTML data is written.

 
submitBtnName — 

A NULL-terminated string containing the name of the button used to submit. If the value passed is not NULL, then include "...&submitBtnName=&..." as part of the generated x-www-form-urlencoded output.

Note that this type of output is the same one you get when an AcroForm has an empty text field (that is, no Value), and parameter bEmpty is true.

See Also


File: FormsHFTProcs.h
Line: 479
ImportAnFDF() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool ImportAnFDF(PDDoc pdForm, CosDoc cdFDF)

Imports data from an FDF file into a PDDoc object's form. See the PDF Reference for a description of this format.

Parameters

pdForm — 

The PDDoc for the form into which to import the data.

 
cdFDF — 

The CosDoc for the FDF file containing the data.

Returns

true if the fields in the FDF file only contained values or flags (that is, V, F, Ff, ClrF, ClrFf, SetF, SetFf), false if any field contained other attributes, such as appearances (AP), actions (A), and so on.

See Also

Exceptions

gAFpdErrBadFdf is raised if the FDF file is invalid. An exception is also raised if memory cannot be allocated for FDF file data.

File: FormsHFTProcs.h
Line: 342
IsPDDocAcroForm() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool IsPDDocAcroForm(PDDoc doc)

Indicates whether a PDDoc contains an Acrobat form.

Parameters

doc — 

The PDDoc to test.

Returns

true if doc contains a form, false otherwise.

See Also


File: FormsHFTProcs.h
Line: 29
ResetForm() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void ResetForm(PDDoc pdForm, CosObj rgIncExcFlds, ASBool bIncl)

Resets the indicated fields of a PDDoc object's form to their default values.

A PDField object's value is reset only if it is terminal; you can check this by calling AFPDFieldIsTerminal().

Parameters

pdForm — 

The PDDoc for the form whose fields are reset.

 
rgIncExcFlds — 

If this parameter's value is CosNewNull(), then all fields are reset, and bIncl is ignored. If it is a CosArray, then the array elements must be names of fields. The names may be of non-terminal fields, which is a fast and easy way to cause all their children to be reset.

 
bIncl — 

If true, rgIncExcFlds is an array of the fields to reset. Otherwise, rgIncExcFlds is an array of the fields to exclude from resetting.

See Also

AFPDFieldSetDefaultTextAppearance Callback used by AFPDDocEnumPDFields(). It is called once for each PDField in a form.
AFPDDocEnumPDFields

File: FormsHFTProcs.h
Line: 365