LayerAV_Layer
ObjectPDF_Consultant

Acrobat comes with a plug-in called the PDF Consultant and Accessibility Checker. This plug-in walks through PDF documents, visiting each object and determining its type and other statistics. It can make certain modifications or repairs to the PDF document. The objects that the Consultant visits can range from simple, primitive types such as CosString objects to higher-level objects such as Images. Users call the Consultant to run on a particular PDF document, choose which tests or repairs to run, then view the results and/or select repair options.

The Consultant visits the objects in a PDF document according to instructional flags you pass to it. After the Consultant has visited an object, the object may be different. The Consultant reclassifies modified objects before moving on to the next object.

As the Consultant traverses a PDF document, gathering objects of interest, it can perform the following functions:

Acrobat agents

The Consultant accomplishes its task by using Agents, which are pieces of code you design to gather the statistics and recommend to the Consultant the necessary repairs of the document. Separate Agents handle each area of analysis and repair. The Agents inform the Consultant of the particular types of objects in which they are interested by registering with the Consultant. When the Consultant has one or more Agents registered, it hands each object of the requested type in the current document to each of the Agents that requested that type. The Consultant gives objects to each Agent in turn, depending on the order in which they registered.

The Consultant must intelligently determine the type of each object it comes across (both direct and indirect) so it can pass appropriate objects to the Agents, or replace or remove ones that it has been instructed to handle itself. The Consultant communicates directly with Agents, keeping lists of which Agents are interested in which objects, and obtaining instructions from the Agent as to an object's visitation status.

Agents can perform their own repairs and modifications to the PDF document, and can return a corrected object to serve as a replacement for the object the Consultant originally passed to it. Agents can also modify the Cos graph themselves (including adding or removing Cos objects or modifiying the contents such as keys or array elements).

The Consultant keeps a list of each object (starting with the object which began the traversal) that it visits on its way to any given object. Agents must be careful not to make any modifications that would affect any of the objects in this list, which is referred to as the traversal stack. For this reason, Agents can specify a post-processing callback that the Consultant calls once it has finished traversing the entire document. See Developing Plug-ins and Applications for more detailed information on this point.

If an Agent or the Consultant itself modifies an object, the Consultant reclassifies that object, possibly changing its type.

Agents also pass to the Consultant the visitation flags that determine how object types should be visited. Limiting the traversal is important, as PDF documents are graphs, arbitrarily complex, and there are often many ways to visit a single object. If the Consultant has reclassified an object, it may also change the way that object is revisited. You must keep this in mind as you develop your Agents.

Your Agent code will primarily consist of a structure, as defined in the ConsExpt.h header file. Acrobat provides a C++ wrapper class to facilitate writing agents; you can derive an agent class from this base class. See Developing Plug-ins and Applications for an example agent from which you can generalize.

How the Consultant Works

The Consultant completes a full, non-recursive traversal of the Cos graph that comprises a PDF document, keeping track of cycles as it goes. Note that there is no guarantee that objects will be visited in any particular order, only that the Consultant will visit all objects (except isolated objects such as the DocInfo object or previously orphaned objects) at least once, provided no Agents modify the graph such that graph paths are removed or redirected.

Removing or modifying objects

If an Agent removes, replaces or modifies an object, the Consultant will pass to other Agents the modified objects (if they are encountered). For example, Dict A refers to Dict B. The first Agent replaces all references to Dict B with references to Dict C,so when later agents receive Dict A from the Consultant, they will see the references to Dict C.

Reclassifying objects

In general, the Consultant reclassifies an object after an Agent is finished performing operations on it. It is possible that, in the process of modifying the object, the Agent may actually have changed the type of the object. This could mean that Agents originally interested in the object might no longer wish to see it. So the Consultant must reclassify an object after each Agent has finished with it. Since the default behavior in revisit upon reclassification mode is to revisit objects when they are reclassified, new objects added in this mode will actually be visited again if they are reclassified as the traversal continues.

Determining the higher-level type (the PDFObjType, as the Consultant code calls it) of a given Cos object is not always easy. The Consultant not only looks at construction of objects (what keys are present in the object) but also at how the object was reached (through what particular object type and via what keys). Objects that are interpreted differently depending on how they are traversed can be properly identified. For example, if the Consultant is looking at an object containing "/Type /Annot" and "/Subtype /Widget" it is clear that the object is a widget annotation; however, when traversed via the AcroForms section, that same object is actually a form field. It is because of such possible dualities that the Consultant can operate in a "revisit upon reclassify" mode that would visit the above object twice: once as a widget annotation and again as a form field.

Consultant object type identification

One of the main features the PDF Consultant and Accessibility Checker framework gives you is the use of its identification engine. This engine can look at Cos objects in a PDF file and, based on properties of the objects and of the objects' parents, assign PDF object type identifiers to them. Though on a very basic level each Cos object has a simple Cos type and attributes, in the scheme of the document as a whole, each object serves a particular purpose. The PDF Object Type assigned to each object represents that object's role in the PDF document. Some PDF object types represent higher-level, conceptually-familiar objects like PT_PAGE (which indicates that the object is a page in the document), while others (like PT_AADICTIONARY) are a bit more obscure, particularly to those who are not familiar with the PDF structure. PDF object types are represented using the enumerated type PDFObjType, which is defined in ConsObTp.h. A good way to see all of the various PDF object types that the Consultant can identify is to look at the constants defined in that file.

Some object types (in particular many simpler objects such as strings and numbers) are not assigned a particular type. In general the Consultant can identify those objects that are of most use to you. If the Consultant cannot identify a particular object, for one reason or another, it assigns the identity of PT_UNKNOWN to the object. Just because the Consultant assigns this value to an object, does not mean the object is foreign or malformed (although it can potentially mean that); it may simply mean that the object type is not particularly significant in the realm of PDF, and thus the Consultant does not know about it.

Object type subclassing

To allow for greater Agent flexibility, the Consultant understands PDF object type subclasses and superclasses. Certain PDF object types are members of more generic classes of PDF object type. Agents can often make use of this information, so the Consultant assigns object types that are actually arrays of types.

The Consultant assigns to an object the most specific classification as well as the more generic classes of which the object is a member. Agent structures include a field called WantSubclasses that indicates whether or not the Agent wants be called for all the interesting object's subclasses as well as their directly interesting types.

For example, the PDF object type PT_ANNOTATION has a number of more specific subclasses such as PT_LINKANNOTATION, PT_LINEANNOTATION, and so on. If an Agent requests only objects of type PT_ANNOTATION, and its WantSubclasses member is false, it may not be called back for very many objects. If the WantSubclasses member is true, then the Consultant will call the Agent back for objects of all specific types of annotations as well as those classified only as PT_ANNOTATION. This also means that when an Agent retrieves the type of an object, it must specify which type it wants. The types in the array that is the classification of the object always go from the most specific (at index 0) to the least specific (the last index in the array).



Define Summary
 Define
 ConsStackGetCount
 ConsStackIndexGetArrayIndex
 ConsStackIndexGetDictKey
 ConsStackIndexGetObj
 ConsStackIndexGetTypeAt
 ConsStackIndexGetTypeCount
 ConsStackIndexIsArray
 ConsStackIndexIsDict
 ConsultantCreate
 ConsultantDestroy
 ConsultantGetNumDirectVisited
 ConsultantGetNumIndirectVisited
 ConsultantGetNumUniqueIndirectsVisited
 ConsultantGetPercentDone
 ConsultantNeverVisitObj
 ConsultantNextObj
 ConsultantNUMSELECTORS
 ConsultantRegisterAgent
 ConsultantResume
 ConsultantSetStart
 ConsultantSuspend
 ConsultantTraverseFrom
 Init_PDFConsultantHFT
 iNumPDFObjTypes
 PDFCONSULTANT_HFT_LATEST
 PDFCONSULTANT_HFT_NAME
 PDFCONSULTANT_HFT_VER_1
 PDFCONSULTANT_HFT_VER_2
 PDFCONSULTANT_HFT_VER_3
 PDFCONSULTANT_REAL_HFT_NAME
 PDFObjTypeGetSuperclass
 REQUIRES_CLASSIFY
Modes that an agent must pass to the PDF Consultant to define behavior when the RegisterAgent function is called.
Typedef Summary
 Typedef
 ConsStack
An opaque traversal stack object. The ConsStackXXX methods allow retrieval of individual members of the PDFObjType and CosObj stacks associated with a Consultant object.
 Consultant
The opaque type to allow programs to retain handles to create PDF Consultant and Accessibility Checker objects.
 ConsultantAgent
 ConsultantAgentAction
 PDFObjID
 PDFObjType
A type corresponding to the enum defined in ConsObTp.h . This type is used to refer to specific object types in PDF. It is specifically used by Agents to make object requests of the framework, and is used by the framework to report the types of objects found.
 RegAgentFlag
Enumeration Summary
 Enumeration
  tagConsultantAgentAction
Bit flags that instruct the Consultant about how to handle a found object. A logical OR of these values should be returned by the ObjFound callback.
  tagPDFObjType
  tagRegAgentFlag
Constants that specify an operation mode for the Consultant. This value determines whether and how often the Consultant should revisit objects that have been previously encountered.
Variable Summary
 Variable
 gConsultantHFT
Structure Summary
 Structure
 tagConsultantAgent
 tagPDFObjID
During traversal, the Consultant checks the Agent's list of object types of interest to see if the Agent is interested in the current object, and it calls the callback function pointers when objects of interest are found and when traversal is complete.
Callback Summary
 Callback
 ConsAgentObjFoundCallback
Returns a set of flags instructing the Consultant as to how to handle the current object. The Consultant calls this method when it recognizes the current object as a type which an Agent has declared to be interesting.
 ConsAgentPercentDoneCallback
The Consultant calls this method with progress updates. It can display a progress bar.
 ConsAgentPostProcessCallback
The Consultant calls this method when it is ready to finish a cycle. You should perform any document modifications assigned to your Agent at this point.
Method Summary
 Method
 
ASUns32 ConsStackGetCount(ConsStack hConsultant)
Returns the number of objects currently on Consultant's traversal stack. The stack includes the objects that the Consultant has visited on its path to the current object, meaning all parents of the current object but not the object itself.
 
ASUns32 ConsStackIndexGetArrayIndex(ConsStack hConsultant, ASUns32 iIndex)
Gets the array index of the object at the given index into the stack (that is, the index that led from the given object to the next object in the traversal). It is only valid to call this function on an index if ConsStackIndexIsArray() returns true for that index.
 
ASAtom ConsStackIndexGetDictKey(ConsStack hConsultant, ASUns32 iIndex)
Gets the key string atom of the object at the given index into the stack (that is, the key that led from the given object to the next object in the traversal). It is only valid to call this function on an index if ConsStackIndexIsDict() returns true for that index.
 
CosObj ConsStackIndexGetObj(ConsStack hConsultant, ASUns32 iIndex)
Gets the the Cos object at the given index into the stack.
 
PDFObjType ConsStackIndexGetTypeAt(ConsStack hConsultant, ASUns32 iIndex, ASUns32 iTypeIndex)
Gets a type from the type array at each index in the stack. Since there are potentially multiple types for each object, you can access the type classifications one at a time.
 
ASUns32 ConsStackIndexGetTypeCount(ConsStack hConsultant, ASUns32 iIndex)
Gets the size of the type hierarchy at the given index into the stack.
 
ASBool ConsStackIndexIsArray(ConsStack hConsultant, ASUns32 iIndex)
Tests whether the given index into the stack is a CosArray.
 
ASBool ConsStackIndexIsDict(ConsStack hConsultant, ASUns32 iIndex)
Tests whether the object at the given index into the stack is a CosDict object.
 
Consultant ConsultantCreate(ConsAgentPercentDoneCallback pPercentDoneCallBack)
Allocates and intializes a new Consultant object. Use the returned object to call the other Consultant API functions. When you are finished with this object, you must destroy it using the ConsultantDestroy() function.
 
void ConsultantDestroy(Consultant hConsultantToDestroy)
Detaches all Agents and destroys the given Consultant object, invalidating its handle. You must never call this on a Consultant that is currently running.
 
Returns the number of direct objects that the Consultant has processed so far. This count may include some objects twice, depending on revisitation of objects. This count is reset on calls to ConsultantTraverseFrom() and ConsultantSetStart().
 
Returns the number of indirect objects that the Consultant has processed so far. This count may include some objects twice, depending on revisitation of objects. This count is reset on calls to ConsultantTraverseFrom() and ConsultantSetStart().
 
Returns the number of unique indirect objects that the Consultant has processed so far. This count is reset on calls to ConsultantTraverseFrom() and ConsultantSetStart(). Visited objects are not counted more than once, if an object is revisited, the count is not incremented.
 
Returns an estimate (from 0 to 100) of what percentage of the current document has been processed by the Consultant. You can call this function at any time.
 
void ConsultantNeverVisitObj(Consultant hConsultant, CosObj hObj)
Instructs the Consultant to never walk through the supplied object. This function can (should) be called before traversing, so that you can ignore subtrees (such as the StructTree). This function does not un-suspend a Consultant, so you can call it repeatedly. It marks the object as Visited and NeverRevisit. This is a pre-traverse call, since marking an object as AC_NEVERREVISIT only occurs AFTER the object has been visited in post-order modes.
 
ASBool ConsultantNextObj(Consultant hConsultant)
Instructs the Consultant to process the next object in the current traversal. It assumes that the Consultant has been suspended and reset with calls to ConsultantSuspend() and ConsultantSetStart(). This function does not un-suspend a Consultant, so you can call it repeatedly. It returns after all registered Agents have processed the object.
 
void ConsultantRegisterAgent(Consultant hConsultant, const ConsultantAgent* pAgent, RegAgentFlag kFlag)
Registers the given agent with the given consultant, so that the agent is called when the consultant encounters objects of interest.
 
void ConsultantResume(Consultant hConsultant)
Resumes a previously suspended Consultant at the point in the traversal where it stopped. This function does not return from traversing and notifying Agents until the traversal is complete or ConsultantSuspend() is called. The function does nothing if the Consultant object is already running or has not been started.
 
void ConsultantSetStart(Consultant hConsultant, CosObj hObjStart, PDFObjType kInitType)
Resets the suspended Consultant and starts a new traversal from the given starting object.
 
void ConsultantSuspend(Consultant hConsultant)
Suspends the Consultant, even if it is currently executing a call to ConsultantCreate() or ConsultantResume(). This function causes currently executing calls to ConsultantTraverseFrom() to return. It is allowed to call this function from within the ScrubPercentDoneCallback() passed to the Consultant on ConsultantCreate(). Calls to ConsultantTraverseFrom() that are currently in progress will return when ConsultantSuspend() is called.
 
void ConsultantTraverseFrom(Consultant hConsultant, CosObj hObj, PDFObjType kObjType)
Starts the given Consultant object traversing at the given Cos object. It traverses and processes all objects beneath obj, classifying the types of objects based on the fact that obj is of the given ObjType.
 
Gets the superclass, if any, of the given PDFObjType.
Defines Detail
ConsStackGetCount 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define ConsStackGetCount ( *( ( ConsStackGetCount_SELPROTO )( gConsultantHFT[ ConsStackGetCount_SEL ] ) ) )

File: ConsHFT.h
Line: 84
ConsStackIndexGetArrayIndex 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define ConsStackIndexGetArrayIndex ( *( ( ConsStackIndexGetArrayIndex_SELPROTO )( gConsultantHFT[ ConsStackIndexGetArrayIndex_SEL ] ) ) )

File: ConsHFT.h
Line: 91
ConsStackIndexGetDictKey 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define ConsStackIndexGetDictKey ( *( ( ConsStackIndexGetDictKey_SELPROTO )( gConsultantHFT[ ConsStackIndexGetDictKey_SEL ] ) ) )

File: ConsHFT.h
Line: 90
ConsStackIndexGetObj 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define ConsStackIndexGetObj ( *( ( ConsStackIndexGetObj_SELPROTO )( gConsultantHFT[ ConsStackIndexGetObj_SEL ] ) ) )

File: ConsHFT.h
Line: 87
ConsStackIndexGetTypeAt 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define ConsStackIndexGetTypeAt ( *( ( ConsStackIndexGetTypeAt_SELPROTO )( gConsultantHFT[ ConsStackIndexGetTypeAt_SEL ] ) ) )

File: ConsHFT.h
Line: 86
ConsStackIndexGetTypeCount 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define ConsStackIndexGetTypeCount ( *( ( ConsStackIndexGetTypeCount_SELPROTO )( gConsultantHFT[ ConsStackIndexGetTypeCount_SEL ] ) ) )

File: ConsHFT.h
Line: 85
ConsStackIndexIsArray 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define ConsStackIndexIsArray ( *( ( ConsStackIndexIsArray_SELPROTO )( gConsultantHFT[ ConsStackIndexIsArray_SEL ] ) ) )

File: ConsHFT.h
Line: 89
ConsStackIndexIsDict 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define ConsStackIndexIsDict ( *( ( ConsStackIndexIsDict_SELPROTO )( gConsultantHFT[ ConsStackIndexIsDict_SEL ] ) ) )

File: ConsHFT.h
Line: 88
ConsultantCreate 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define ConsultantCreate ( *( ( ConsultantCreate_SELPROTO )( gConsultantHFT[ ConsultantCreate_SEL ] ) ) )

File: ConsHFT.h
Line: 72
ConsultantDestroy 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define ConsultantDestroy ( *( ( ConsultantDestroy_SELPROTO )( gConsultantHFT[ ConsultantDestroy_SEL ] ) ) )

File: ConsHFT.h
Line: 73
ConsultantGetNumDirectVisited 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define ConsultantGetNumDirectVisited ( *( ( ConsultantGetNumDirectVisited_SELPROTO )( gConsultantHFT[ ConsultantGetNumDirectVisited_SEL ] ) ) )

File: ConsHFT.h
Line: 81
ConsultantGetNumIndirectVisited 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define ConsultantGetNumIndirectVisited ( *( ( ConsultantGetNumIndirectVisited_SELPROTO )( gConsultantHFT[ ConsultantGetNumIndirectVisited_SEL ] ) ) )

File: ConsHFT.h
Line: 82
ConsultantGetNumUniqueIndirectsVisited 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define ConsultantGetNumUniqueIndirectsVisited ( *( ( ConsultantGetNumUniqueIndirectsVisited_SELPROTO )( gConsultantHFT[ ConsultantGetNumUniqueIndirectsVisited_SEL ] ) ) )

File: ConsHFT.h
Line: 83
ConsultantGetPercentDone 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define ConsultantGetPercentDone ( *( ( ConsultantGetPercentDone_SELPROTO )( gConsultantHFT[ ConsultantGetPercentDone_SEL ] ) ) )

File: ConsHFT.h
Line: 80
ConsultantNeverVisitObj 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define ConsultantNeverVisitObj ( *( ( ConsultantNeverVisitObj_SELPROTO )( gConsultantHFT[ ConsultantNeverVisitObj_SEL ] ) ) )

File: ConsHFT.h
Line: 94
ConsultantNextObj 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define ConsultantNextObj ( *( ( ConsultantNextObj_SELPROTO )( gConsultantHFT[ ConsultantNextObj_SEL ] ) ) )

File: ConsHFT.h
Line: 79
ConsultantNUMSELECTORS 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define ConsultantNUMSELECTORS ( ConsultantNUMSELECTORSPlusOne - 1 )

File: ConsHFT.h
Line: 64
ConsultantRegisterAgent 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define ConsultantRegisterAgent ( *( ( ConsultantRegisterAgent_SELPROTO )( gConsultantHFT[ ConsultantRegisterAgent_SEL ] ) ) )

File: ConsHFT.h
Line: 77
ConsultantResume 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define ConsultantResume ( *( ( ConsultantResume_SELPROTO )( gConsultantHFT[ ConsultantResume_SEL ] ) ) )

File: ConsHFT.h
Line: 76
ConsultantSetStart 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define ConsultantSetStart ( *( ( ConsultantSetStart_SELPROTO )( gConsultantHFT[ ConsultantSetStart_SEL ] ) ) )

File: ConsHFT.h
Line: 78
ConsultantSuspend 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define ConsultantSuspend ( *( ( ConsultantSuspend_SELPROTO )( gConsultantHFT[ ConsultantSuspend_SEL ] ) ) )

File: ConsHFT.h
Line: 75
ConsultantTraverseFrom 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define ConsultantTraverseFrom ( *( ( ConsultantTraverseFrom_SELPROTO )( gConsultantHFT[ ConsultantTraverseFrom_SEL ] ) ) )

File: ConsHFT.h
Line: 74
Init_PDFConsultantHFT 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define Init_PDFConsultantHFT ASExtensionMgrGetHFT( ASAtomFromString( PDFCONSULTANT_HFT_NAME ), PDFCONSULTANT_HFT_LATEST )

File: ConsHFT.h
Line: 49
iNumPDFObjTypes 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define iNumPDFObjTypes 515

File: ConsObTp.h
Line: 538
PDFCONSULTANT_HFT_LATEST 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define PDFCONSULTANT_HFT_LATEST PDFCONSULTANT_HFT_VER_3

File: ConsHFT.h
Line: 47
PDFCONSULTANT_HFT_NAME 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define PDFCONSULTANT_HFT_NAME "PDFConsultant"

File: ConsHFT.h
Line: 42
PDFCONSULTANT_HFT_VER_1 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define PDFCONSULTANT_HFT_VER_1 0x00010000

File: ConsHFT.h
Line: 44
PDFCONSULTANT_HFT_VER_2 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define PDFCONSULTANT_HFT_VER_2 0x00020000

File: ConsHFT.h
Line: 45
PDFCONSULTANT_HFT_VER_3 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define PDFCONSULTANT_HFT_VER_3 0x00030000

File: ConsHFT.h
Line: 46
PDFCONSULTANT_REAL_HFT_NAME 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define PDFCONSULTANT_REAL_HFT_NAME ("$"PDFCONSULTANT_HFT_NAME)

File: ConsHFT.h
Line: 43
PDFObjTypeGetSuperclass 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define PDFObjTypeGetSuperclass ( *( ( PDFObjTypeGetSuperclass_SELPROTO )( gConsultantHFT[ PDFObjTypeGetSuperclass_SEL ] ) ) )

File: ConsHFT.h
Line: 92
REQUIRES_CLASSIFY 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

#define REQUIRES_CLASSIFY 128

Description

Modes that an agent must pass to the PDF Consultant to define behavior when the RegisterAgent function is called.

It is important to note that the Consultant framework can only be in one mode at a time. If multiple agents register with different modes, the last mode to be assigned is the one that is eventually used. As always, group similar agents together to avoid conflicts such as this.


File: ConsExpT.h
Line: 310

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

Syntax

typedef struct tagConsStack* ConsStack;

An opaque traversal stack object. The ConsStackXXX methods allow retrieval of individual members of the PDFObjType and CosObj stacks associated with a Consultant object.

See Also


File: ConsExpT.h
Line: 51
Consultant 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

typedef struct tagConsultant* Consultant;

The opaque type to allow programs to retain handles to create PDF Consultant and Accessibility Checker objects.

See Also

numerous

File: ConsExpT.h
Line: 59
ConsultantAgent 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

typedef tagConsultantAgent ConsultantAgent;

File: ConsExpT.h
Line: 193
ConsultantAgentAction 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

typedef ASUns32 ConsultantAgentAction;

File: ConsExpT.h
Line: 106
PDFObjID 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

typedef tagPDFObjID PDFObjID;

File: ConsExpT.h
Line: 172
PDFObjType 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

typedef ASUns32 PDFObjType;

A type corresponding to the enum defined in ConsObTp.h . This type is used to refer to specific object types in PDF. It is specifically used by Agents to make object requests of the framework, and is used by the framework to report the types of objects found.

See Also


File: ConsExpT.h
Line: 35
RegAgentFlag 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

typedef ASUns32 RegAgentFlag;

File: ConsExpT.h
Line: 354

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

Syntax

enum tagConsultantAgentAction {
 AC_NOCHANGE = 0,
 
 AC_REPLACE = 1,
 
 AC_REMOVE = 2,
 
 AC_REVISIT = 4,
 
 AC_NEVERREVISIT = 8,
 
 AC_CHANGEALL = 16
}

See Also


File: ConsExpT.h
Line: 68

Elements
AC_NOCHANGE  

The Consultant makes no changes to the current object. Use this if the Agent is only gathering information or if the Agent is in charge of making all the modifications itself.

 
AC_REPLACE  

Instructs the Consultant to replace this occurence of the current object in the document with the one retured via the pObjToReturn parameter to the ObjFound callback. You can optionally combine this with AC_REVISIT or AC_CHANGEALL.

 
AC_REMOVE  

Instructs the Consultant to remove this occurence of the current object in the document. You can optionally combine this with OD_REVISIT or OD_CHANGEALL.

 
AC_REVISIT  

Instructs the Consultant to visit this object again if it is encountered again. You can combine this with any flag except OD_NEVERREVISIT or OD_CHANGEALL.

 
AC_NEVERREVISIT  

Instructs the Consultant that under no circumstances should the object be revisited, regardless of whether it is reclassified when encountered again. It is only applicable in the mode in which the Consultant pays attention to object classification when determining whether an obect has already been visited.

 
AC_CHANGEALL  

You must use this in conjunction with either OD_REPLACE or OD_REMOVE. It instructs the Consultant to silently perform the desired operation on all instances of the current object, without calling the ObjFound callback again for this object.

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

Syntax

enum tagPDFObjType {
 PT_AADICTIONARY = 0,
 
 PT_ACROFORMSPAGESTREE,
 
 PT_ACROFORMSTEMPLATESTREE,
 
 PT_ACTION,
 
 PT_ACTIONSARRAY,
 
 PT_AFPAGESCHILDREN,
 
 PT_AFPAGESINTNODE,
 
 PT_AFPAGESLEAFNODE,
 
 PT_AFPAGESNAMEDCHILDREN,
 
 PT_AFTEMPLATESCHILDREN,
 
 PT_AFTEMPLATESINTNODE,
 
 PT_AFTEMPLATESLEAFNODE,
 
 PT_AFTEMPLATESNAMEDCHILDREN,
 
 PT_ANNOTATION,
 
 PT_ANNOTSARRAY,
 
 PT_APPEARANCEDICT,
 
 PT_BEAD,
 
 PT_BLENDMODELIST,
 
 PT_BOXCOLORINFO,
 
 PT_CALGRAYATTRIBUTES,
 
 PT_CALGRAYCOLORSPACE,
 
 PT_CALRGBATTRIBUTES,
 
 PT_CALRGBCOLORSPACE,
 
 PT_CATALOG,
 
 PT_CHARPROCS,
 
 PT_CHOICEFIELD,
 
 PT_COLORANTSDICT,
 
 PT_COLORSPACEATTRIBUTES,
 
 PT_COLORSPACELIST,
 
 PT_CONTENTSARRAY,
 
 PT_DESTINATION,
 
 PT_DEVICENCOLORSPACE,
 
 PT_DOWNAPPEARANCEDICT,
 
 PT_EMBEDOBJCHILDREN,
 
 PT_EMBEDOBJINTNODE,
 
 PT_EMBEDOBJLEAFNODE,
 
 PT_EMBEDOBJNAMEDCHILDREN,
 
 PT_EMBEDOBJTREE,
 
 PT_EXPONENTIALFUNCTION,
 
 PT_EXTGSTATE,
 
 PT_EXTGSTATELIST,
 
 PT_FIELD,
 
 PT_FIELDCHILDREN,
 
 PT_FONT,
 
 PT_FONTDESCRIPTOR,
 
 PT_FONTDIFFERENCES,
 
 PT_FONTENCODING,
 
 PT_FONTRESOURCELIST,
 
 PT_FORM,
 
 PT_FORMCALCORDER,
 
 PT_FORMSDICT,
 
 PT_FUNCTION,
 
 PT_FUNCTIONARRAY,
 
 PT_GOTOACTION,
 
 PT_ICCBASEDATTRIBUTES,
 
 PT_ICCBASEDCOLORSPACE,
 
 PT_IMAGE,
 
 PT_INDEXEDCOLORSPACE,
 
 PT_JAVASCRIPTACTION,
 
 PT_LABATTRIBUTES,
 
 PT_LABCOLORSPACE,
 
 PT_LINKANNOTATION,
 
 PT_MARKEDCONTENTREF,
 
 PT_MMTYPE1FONT,
 
 PT_NAMEDAPPEARCHILDREN,
 
 PT_NAMEDAPPEARINTNODE,
 
 PT_NAMEDAPPEARLEAFNODE,
 
 PT_NAMEDAPPEARNAMEDCHILDREN,
 
 PT_NAMEDAPPEARTREE,
 
 PT_NAMEDDESTDICT,
 
 PT_NAMEDDESTLIST,
 
 PT_NAMEDDESTSCHILDREN,
 
 PT_NAMEDDESTSINTNODE,
 
 PT_NAMEDDESTSLEAFNODE,
 
 PT_NAMEDDESTSNAMEDCHILDREN,
 
 PT_NAMEDDESTSTREE,
 
 PT_NAMEDJAVASCRIPTTREE,
 
 PT_NAMEDJSCHILDREN,
 
 PT_NAMEDJSINTNODE,
 
 PT_NAMEDJSLEAFNODE,
 
 PT_NAMEDJSNAMEDCHILDREN,
 
 PT_NAMESCHILDREN,
 
 PT_NAMESDICT,
 
 PT_NAMESINTNODE,
 
 PT_NAMESLEAFNODE,
 
 PT_NAMESNAMEDCHILDREN,
 
 PT_NAMESTREE,
 
 PT_NORMALAPPEARANCEDICT,
 
 PT_OBJECTREF,
 
 PT_OUTLINEENTRY,
 
 PT_OUTLINETREE,
 
 PT_PAGE,
 
 PT_PAGESARRAY,
 
 PT_PAGESEPARATIONS,
 
 PT_PAGESNODE,
 
 PT_PATTERNCOLORSPACE,
 
 PT_POSTSCRIPT,
 
 PT_PRINTERMARKANNOTATION,
 
 PT_PRINTERMARKAPPEARANCE,
 
 PT_RECTANGLE,
 
 PT_RESOURCEDICT,
 
 PT_ROLLOVERAPPEARANCEDICT,
 
 PT_ROOTFIELDSLIST,
 
 PT_SAMPLEDFUNCTION,
 
 PT_SEPARATIONCOLORSPACE,
 
 PT_SEPARATIONINFO,
 
 PT_SOFTMASKDICT,
 
 PT_STITCHINGFUNCTION,
 
 PT_STITCHINGINPUTFUNCTIONS,
 
 PT_STPARENTCHILDREN,
 
 PT_STPARENTINTNODE,
 
 PT_STPARENTLEAFNODE,
 
 PT_STPARENTNUMBEREDCHILDREN,
 
 PT_STRUCTELEMATTRARRAY,
 
 PT_STRUCTELEMENT,
 
 PT_STRUCTELEMLIST,
 
 PT_STRUCTIDCHILDREN,
 
 PT_STRUCTIDINTNODE,
 
 PT_STRUCTIDLEAFNODE,
 
 PT_STRUCTIDNAMEDCHILDREN,
 
 PT_STRUCTIDTREE,
 
 PT_STRUCTPARENTTREE,
 
 PT_STRUCTTREEROOT,
 
 PT_THREAD,
 
 PT_THREADSLIST,
 
 PT_TRANSPARENCYGROUP,
 
 PT_TRUETYPEFONT,
 
 PT_TYPE1FONT,
 
 PT_TYPE3FONT,
 
 PT_WEBCAPCOMMAND,
 
 PT_WEBCAPCOMMANDLIST,
 
 PT_WEBCAPCOMMANDSETTINGS,
 
 PT_WEBCAPCONTENTSET,
 
 PT_WEBCAPIDSCHILDREN,
 
 PT_WEBCAPIDSINTNODE,
 
 PT_WEBCAPIDSLEAFNODE,
 
 PT_WEBCAPIDSNAMEDCHILDREN,
 
 PT_WEBCAPIDSTREE,
 
 PT_WEBCAPIMAGESET,
 
 PT_WEBCAPIMAGESETARRAY,
 
 PT_WEBCAPINFO,
 
 PT_WEBCAPPAGESET,
 
 PT_WEBCAPPAGESETARRAY,
 
 PT_WEBCAPSOURCEINFO,
 
 PT_WEBCAPURLALIASDICT,
 
 PT_WEBCAPURLCHAIN,
 
 PT_WEBCAPURLSCHILDREN,
 
 PT_WEBCAPURLSINTNODE,
 
 PT_WEBCAPURLSLEAFNODE,
 
 PT_WEBCAPURLSNAMEDCHILDREN,
 
 PT_WEBCAPURLSTREE,
 
 PT_WIDGETANNOTATION,
 
 PT_XOBJECTLIST,
 
 PT_ABRANGE,
 
 PT_ACTUALTEXT,
 
 PT_ALTERNATETEXT,
 
 PT_ANNOTATIONBORDER,
 
 PT_ANNOTATIONBORDERSTYLE,
 
 PT_ANNOTATIONCOLOR,
 
 PT_ANNOTATIONLOC,
 
 PT_APPEARANCE,
 
 PT_ARTBOXSTYLE,
 
 PT_BEADSARRAY,
 
 PT_BG2FUNCTION,
 
 PT_BGFUNCTION,
 
 PT_BLACKPOINT,
 
 PT_BLEEDBOXSTYLE,
 
 PT_BLENDMODE,
 
 PT_BOUNDINGBOX,
 
 PT_BOXSTYLE,
 
 PT_BUTTONFIELD,
 
 PT_CHARPROC_STREAM,
 
 PT_CHOICEFIELDOPTIONS,
 
 PT_CHOICEFIELDVALUE,
 
 PT_CIDTYPE0FONT,
 
 PT_CIDTYPE2FONT,
 
 PT_CIRCLEANNOTATION,
 
 PT_OBSOLETE3,
 
 PT_COLORANTNAMES,
 
 PT_COLORSPACE,
 
 PT_COLORSPACETYPE,
 
 PT_CONTENTSSTREAM,
 
 PT_CROPBOX,
 
 PT_CROPBOXSTYLE,
 
 PT_DASHPATTERN,
 
 PT_DATE,
 
 PT_DEFAULTFUNCTION,
 
 PT_DEFAULTHALFTONE,
 
 PT_DEFRESOURCEDICT,
 
 PT_DEVICECMYKCOLORSPACE,
 
 PT_DEVICEGRAYCOLORSPACE,
 
 PT_DEVICERGBCOLORSPACE,
 
 PT_OBSOLETE4,
 
 PT_DOWNAPPEARANCE,
 
 PT_EMBEDDEDFONTSTREAM,
 
 PT_EMBEDDEDOBJDICT,
 
 PT_OBSOLETE5,
 
 PT_OBSOLETE6,
 
 PT_EXPONENTIAL0RESULT,
 
 PT_EXPONENTIAL1RESULT,
 
 PT_FILEATTACHANNOTATION,
 
 PT_FONTBBOX,
 
 PT_FONTMATRIX,
 
 PT_FONTTABLEENTRY,
 
 PT_FONTWIDTHS,
 
 PT_OBSOLETE7,
 
 PT_FORMIMPORTACTION,
 
 PT_OBSOLETE0,
 
 PT_FORMRESETACTION,
 
 PT_FORMSUBMITACTION,
 
 PT_FREETEXTANNOTATION,
 
 PT_FUNCTIONDOMAIN,
 
 PT_FUNCTIONNAME,
 
 PT_FUNCTIONRANGE,
 
 PT_GOTORACTION,
 
 PT_GROUPATTRIBUTES,
 
 PT_GSTATEFONT,
 
 PT_HALFTONE,
 
 PT_HALFTONEPHASE,
 
 PT_HIDEACTION,
 
 PT_HIGHLIGHTANNOTATION,
 
 PT_ICCRANGE,
 
 PT_IDENTITYFUNCTION,
 
 PT_INDEXEDLOOKUP,
 
 PT_INKANNOTATION,
 
 PT_JAVASCRIPT,
 
 PT_OBSOLETE8,
 
 PT_LANGUAGESPEC,
 
 PT_LASTMODIFIED,
 
 PT_LAUNCHACTION,
 
 PT_LEVEL1POSTSCRIPT,
 
 PT_LINEANNOTATION,
 
 PT_MARKEDPDFINFODICT,
 
 PT_MEDIABOX,
 
 PT_METADATASTREAM,
 
 PT_MOVIEACTION,
 
 PT_MOVIEANNOTATION,
 
 PT_NAMEDACTION,
 
 PT_NAMEDOBJECT,
 
 PT_NAMEDOBJECTNAME,
 
 PT_NOPACTION,
 
 PT_NORMALAPPEARANCE,
 
 PT_OBSOLETE9,
 
 PT_OBSOLETE1,
 
 PT_OBSOLETE2,
 
 PT_PAGELABELTREE,
 
 PT_PIECEINFO,
 
 PT_POPUPANNOTATION,
 
 PT_POSTSCRIPTFUNCTION,
 
 PT_PREVIOUSACTION,
 
 PT_PROCSET,
 
 PT_RECTPOINT,
 
 PT_REFERENCEDPDF,
 
 PT_RGBGAMMA,
 
 PT_RGBGAMMAMATRIX,
 
 PT_ROLLOVERAPPEARANCE,
 
 PT_SAMPLEDFUNCTIONDECODE,
 
 PT_SAMPLEDFUNCTIONENCODE,
 
 PT_SAMPLEDFUNCTIONSIZE,
 
 PT_SETSTATEACTION,
 
 PT_SIGNATUREDICT,
 
 PT_SIGNATUREFIELD,
 
 PT_SOFTMASKIMAGE,
 
 PT_SOFTMASKNAME,
 
 PT_SOUNDACTION,
 
 PT_SOUNDANNOTATION,
 
 PT_SQUAREANNOTATION,
 
 PT_STAMPANNOTATION,
 
 PT_STITCHINGFUNCTIONBOUNDS,
 
 PT_STITCHINGFUNCTIONENCODE,
 
 PT_STRIKEOUTANNOTATION,
 
 PT_STRUCTCLASSMAP,
 
 PT_STRUCTELEMATTR,
 
 PT_STRUCTROLEMAP,
 
 PT_TEXTANNOTATION,
 
 PT_TEXTFIELD,
 
 PT_THREADACTION,
 
 PT_THREADINFO,
 
 PT_THUMBNAIL,
 
 PT_TINTTRANSFORM,
 
 PT_TR2FUNCTION,
 
 PT_TRANSITION,
 
 PT_TRAPNETANNOTATION,
 
 PT_TRFUNCTION,
 
 PT_TRIMBOXSTYLE,
 
 PT_TRUETYPEFONTSTREAM,
 
 PT_TYPE0FONT,
 
 PT_TYPE1FONTSTREAM,
 
 PT_TYPE1UNICODEMAP,
 
 PT_UCR2FUNCTION,
 
 PT_UCRFUNCTION,
 
 PT_UNDERLINEANNOTATION,
 
 PT_OBSOLETE10,
 
 PT_URIACTION,
 
 PT_URIDICT,
 
 PT_URL,
 
 PT_OBSOLETE11,
 
 PT_VIEWERPREFERENCES,
 
 PT_WEBCAPCONTENTNAME,
 
 PT_WEBCAPENGINESETTINGS,
 
 PT_WEBCAPGLOBALSETTINGS,
 
 PT_WEBCAPID,
 
 PT_WEBCAPIMAGEREFCOUNTS,
 
 PT_WHITEPOINT,
 
 PT_XUID,
 
 PT_BUILTINTYPES,
 
 PT_COSNULL,
 
 PT_COSINTEGER,
 
 PT_COSFIXED,
 
 PT_COSBOOLEAN,
 
 PT_COSNAME,
 
 PT_COSSTRING,
 
 PT_COSDICT,
 
 PT_COSARRAY,
 
 PT_COSSTREAM,
 
 PT_NULL,
 
 PT_UNKNOWN,
 
 PT_ALL,
 
 PT_PATTERNLIST,
 
 PT_PATTERN,
 
 PT_SHADINGPATTERN,
 
 PT_TILINGPATTERN,
 
 PT_TILINGPATTERNBBOX,
 
 PT_PATTERNMATRIX,
 
 PT_SHADING,
 
 PT_TYPE1SHADING,
 
 PT_TYPE2SHADING,
 
 PT_TYPE3SHADING,
 
 PT_TYPE4SHADING,
 
 PT_TYPE5SHADING,
 
 PT_TYPE6SHADING,
 
 PT_TYPE7SHADING,
 
 PT_SHADINGBBOX,
 
 PT_SHADINGBACKGROUND,
 
 PT_SHADINGDOMAIN,
 
 PT_SHADINGMATRIX,
 
 PT_SHADINGCOORDS,
 
 PT_SHADINGDECODEARRAY,
 
 PT_TRUETYPEUNICODEMAP,
 
 PT_TYPE3UNICODEMAP,
 
 PT_CIDSYSTEMINFO,
 
 PT_CIDGLYPHWIDTHS,
 
 PT_CIDDEFAULTVERTICALMETRICS,
 
 PT_CIDVERTICALWIDTHS,
 
 PT_TYPE0UNICODEMAP,
 
 PT_INKANNOTINKLIST,
 
 PT_INKANNOTINKLISTITEM,
 
 PT_APPEARCHARACTERISTICS,
 
 PT_APPEARCHARBOARDERCOLOR,
 
 PT_APPEARCHARBACKGRNDCOLOR,
 
 PT_PAGELABELSCHILDREN,
 
 PT_PAGELABELSNAMEDCHILDREN,
 
 PT_PAGELABELSINTNODE,
 
 PT_PAGELABELSLEAFNODE,
 
 PT_PAGELABELDICT,
 
 PT_OPIVERSIONDICT,
 
 PT_OPI_1_3_DICT,
 
 PT_OPI_2_0_DICT,
 
 PT_MARKEDCONTENTLIST,
 
 PT_WEBCAPSOURCEINFOLIST,
 
 PT_SOFTMASKBACKGRNDCOLOR,
 
 PT_SHADINGLIST,
 
 PT_MARKEDCONTENTDICT,
 
 PT_ALTERNATEIMAGESARRAY,
 
 PT_ALTERNATEIMAGEDICT,
 
 PT_ALTERNATEIMAGE,
 
 PT_FONTTOUNICODEMAP,
 
 PT_FILESPEC,
 
 PT_FILESPECID,
 
 PT_FILESPECEMBEDDEDFILEDICT,
 
 PT_EMBEDDEFILESTRMPARAMSDICT,
 
 PT_EMBEDDEDFILESTRMRESFORK,
 
 PT_EMBEDDEFILESTRMMACPARAMS,
 
 PT_EMBEDDEFILESTREAM,
 
 PT_JOBTICKET,
 
 PT_JTACCOUNTINGOBJ,
 
 PT_JTADDRESSOBJLIST,
 
 PT_JTANALYSISOBJECT,
 
 PT_JTANALYSISOBJLIST,
 
 PT_JTAUDITOBJECT,
 
 PT_JTAUDITOBJECTLIST,
 
 PT_JTCOLORANTALIASOBJ,
 
 PT_JTCOLORANTALIASOBJLIST,
 
 PT_JTCOLORANTCONTROLOBJ,
 
 PT_JTCOLORSPACESUBOBJ,
 
 PT_JTCOLORSPACESUBOBJLIST,
 
 PT_JTCONTENTLIST,
 
 PT_JTCONTENTOBJECT,
 
 PT_JTDELIVERYOBJ,
 
 PT_JTDELIVERYOBJLIST,
 
 PT_JTDOCOBJECT,
 
 PT_JTDOCOBJLIST,
 
 PT_JTFILEOBJECT,
 
 PT_JTFILEOBJECTFILESDICT,
 
 PT_JTFILESLIST,
 
 PT_JTFINISHINGOBJ,
 
 PT_JTFINISHINGOBJLIST,
 
 PT_JTINSERTPAGESOBJ,
 
 PT_JTINSERTSHEETOBJ,
 
 PT_JTINVENTORYOBJ,
 
 PT_JTLAYOUTOBJ,
 
 PT_JTMEDIAOBJ,
 
 PT_JTMEDIASOURCEOBJ,
 
 PT_JTPAGERANGELIST,
 
 PT_JTPAGERANGEOBJ,
 
 PT_JTPLACEDOBJECT,
 
 PT_JTPLACEDOBJLIST,
 
 PT_JTPLANEORDEROBJ,
 
 PT_JTPLANEORDEROBJLIST,
 
 PT_JTPREFLIGHTCONSTRAINTLIST,
 
 PT_JTPREFLIGHTDETAILOBJ,
 
 PT_JTPREFLIGHTDETAILOBJLIST,
 
 PT_JTPREFLIGHTINSTANCE,
 
 PT_JTPREFLIGHTINSTANCELIST,
 
 PT_JTPREFLIGHTOBJECT,
 
 PT_JTPREFLIGHTRESULTSOBJ,
 
 PT_JTPRINTLAYOUTOBJ,
 
 PT_JTPROFILEOBJECT,
 
 PT_JTPROFILEOBJLIST,
 
 PT_JTRENDERINGOBJ,
 
 PT_JTRESOURCEALIASLIST,
 
 PT_JTRESOURCEALIASOBJ,
 
 PT_JTSHEETOBJ,
 
 PT_JTSHEETOBJLIST,
 
 PT_JTSIGNATUREOBJ,
 
 PT_JTSIGNATUREOBJLIST,
 
 PT_JTSLIPSHEETOBJ,
 
 PT_JTSOURCECLIPPATH,
 
 PT_JTSURFACEOBJECT,
 
 PT_JTTILINGOBJ,
 
 PT_JTTILINGOBJLIST,
 
 PT_JTTRAPPINGOBJ,
 
 PT_JTTRAPPINGPARAMOBJ,
 
 PT_JTTRAPREGIONOBJ,
 
 PT_JTTRAPREGIONSLIST,
 
 PT_JTRESOURCELIST,
 
 PT_JTADDRESSOBJECT,
 
 PT_JTDETAILSOBJECT,
 
 PT_JTCOLORANTALIASES,
 
 PT_JTCOLORANTORDER,
 
 PT_JTCOLORANTPARAMS,
 
 PT_JTCOLORANTDETAILSOBJ,
 
 PT_JTDEVICECOLORANTOBJ,
 
 PT_JTTARGETCOLORANTNAMES,
 
 PT_BLEEDBOX,
 
 PT_JTFONTPOLICYOBJ,
 
 PT_JTMEDIAUSAGEOBJ,
 
 PT_JTSCHEDULINGOBJ,
 
 PT_JTFILEDECODEPARAMSLIST,
 
 PT_JTFILEOBJECTFILTERS,
 
 PT_JTFINISHINGDETAILSOBJ,
 
 PT_JTSURFACECONTENTSBOX,
 
 PT_JTMEDIAOBJDIMENSIONS,
 
 PT_JTPAGERANGEWHICH,
 
 PT_JTCLIPBOX,
 
 PT_JTCOORDTRANSFORMMATRIX,
 
 PT_JTCOLORANTPLANESARRAY,
 
 PT_JTPREFLIGHTCONSTRAINTOBJ,
 
 PT_JTPREFLIGHTDETAILOBJPAGES,
 
 PT_JTPREFLIGHTINSTANCEPAGES,
 
 PT_JTPREFLIGHTINSTANCEDETAIL,
 
 PT_RENDERINGRESOLUTION,
 
 PT_JTDEVICERENDERINGINFO,
 
 PT_JTPOSTRENDERINGINFO,
 
 PT_JTPRERENDERINGINFO,
 
 PT_JTSHEETALIGNMENT,
 
 PT_JTSLIPSHEETALIGNMENT,
 
 PT_JTSOURCECLIPPATHPOINT,
 
 PT_JTMARKEDREFSARRAY,
 
 PT_JTTRAPPINGORDER,
 
 PT_JTCOLORANTZONEDETAILSOBJ,
 
 PT_JTTRAPZONE,
 
 PT_JTTRAPZONELIST,
 
 PT_JTTRAPPINGPARAMOBJLIST,
 
 PT_JTTRAPPINGDETAILSOBJ,
 
 PT_JTCOORDTRANSFORMDICT,
 
 PT_AFTEMPLATE,
 
 PT_SOUNDSTREAM,
 
 PT_SCREENANNOT,
 
 PT_RENDITIONACTION,
 
 PT_RENDITION,
 
 PT_MEDIARENDITION,
 
 PT_SELECTORRENDITION,
 
 PT_RENDITIONSLIST,
 
 PT_ALTERNATEPRESCHILDREN,
 
 PT_ALTERNATEPRESINTNODE,
 
 PT_ALTERNATEPRESLEAFNODE,
 
 PT_ALTERNATEPRESNAMEDCHILDREN,
 
 PT_SLIDESHOW,
 
 PT_ALTERNATEPRESTREE,
 
 PT_OCGSARRAY,
 
 PT_OCPROPERTIES,
 
 PT_OCCONFIGSARRAY,
 
 PT_OCGUSAGE,
 
 PT_OCG,
 
 PT_OCCONFIGDICT,
 
 PT_OCASARRAY,
 
 PT_OCUSAGEAPPLICATION,
 
 PT_OCMD,
 
 PT_SETOCGSTATEACTION,
 
 PT_MEDIACRITERIA,
 
 PT_MEDIACLIP,
 
 PT_MEDIACLIPDATA,
 
 PT_MEDIAPERMSDICT,
 
 PT_MEDIAPLAYERS,
 
 PT_MEDIAPLAYPARAMS,
 
 PT_MEDIASCREENPARAMS,
 
 PT_MEDIACLIPSECTION,
 
 PT_MEDIAPLAYINFOARRAY,
 
 PT_MEDIAPLAYINFO,
 
 PT_FONTENCODINGSDICT,
 
 PT_STRUCTELEMATTRBBOX,
 
 PT_3DANNOTATION,
 
 PT_3DSTREAM,
 
 PT_3DREF,
 
 PT_BOGUS_NO_SUCH_TYPE = 0x7FFFFFFF
}

File: ConsObTp.h
Line: 16

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

Syntax

enum tagRegAgentFlag {
 REG_ONLYREVISITUNKNOWN = 0,
 
 REG_REVISITNONE,
 
 REG_REVISITRECLASS_ALL = REQUIRES_CLASSIFY,
 
 REG_REVISITRECLASS_ALWAYSUNKNOWN,
 
 REG_REVISIT_ONDEMAND = 0x00000100
}

File: ConsExpT.h
Line: 320

Elements
REG_ONLYREVISITUNKNOWN  

Revisit unknown objects only. Once the object is of a known type, that object is no longer visited. Visit all objects of known types only once (unless an agent returns OD_REVISIT for the object).

 
REG_REVISITNONE  

Do not revisit objects of any type, whether or not they are later encountered with a new classification at some point. Only revisit an object if an agent returns OD_REVISIT for the object.

 
REG_REVISITRECLASS_ALL  

Revisit an object whenever it is encountered again with a new classification (regardless of whether the new classification is as an unknown type).

 
REG_REVISITRECLASS_ALWAYSUNKNOWN  

Revisit an object whenever it is encountered again with a new classification, but always revisit objects classified as unknown (even if the object has previously been encountered and classified as unknown).

 
Variables Detail
gConsultantHFT 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

HFT gConsultantHFT;

File: ConsHFT.h
Line: 40

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

Syntax

struct tagConsultantAgent {
 ASSize_t Size; 
 
 PDFObjType pFindObjects; 
 
 ASUns32 NumFindObjects; 
 
 ConsAgentPostProcessCallback PostProcess; 
 
 ConsAgentObjFoundCallback ObjFound; 
 
 ASBool WantSubclasses; 
 
 CosObj pFindObjectIDs; 
 
 ASUns32 NumFindObjectIDs; 
 
 ConsAgentObjFoundCallback ObjIDFound; 
}


File: ConsExpT.h
Line: 175

Elements
Size  

The size of the data structure. Set it to sizeof(Agent).

 
pFindObjects  

An array of object types of interest.

 
NumFindObjects  

The number of object types in the pFindObjects array.

 
PostProcess  

A callback procedure for post-processing.

 
ObjFound  

A callback procedure for when an object is found.

 
WantSubclasses  

Indicates if the Agent also wants to be called back for subclasses of types in pFindObjects.

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

Syntax

struct tagPDFObjID {
 CosID objID; 
 
 CosGeneration objGen; 
}

During traversal, the Consultant checks the Agent's list of object types of interest to see if the Agent is interested in the current object, and it calls the callback function pointers when objects of interest are found and when traversal is complete.

All Agents should be C++ classes derived from the ConsultantAgentObj class (found in agentobj.h) which can be converted (via a C++ cast operator) to a pointer to this structure type. Wherever the Consultant HFT calls for a (struct Agent*), you can pass the class with no conversion.

See Also


File: ConsExpT.h
Line: 169

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

Syntax

ConsultantAgentAction (*ConsAgentObjFoundCallback)(struct tagConsultantAgent *, CosObj, const PDFObjType *, ASUns32, ConsStack, CosObj *)

Returns a set of flags instructing the Consultant as to how to handle the current object. The Consultant calls this method when it recognizes the current object as a type which an Agent has declared to be interesting.


File: ConsExpT.h
Line: 141
ConsAgentPercentDoneCallback 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void (*ConsAgentPercentDoneCallback)(ASReal fPercentDone)

The Consultant calls this method with progress updates. It can display a progress bar.


File: ConsExpT.h
Line: 149
ConsAgentPostProcessCallback 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void (*ConsAgentPostProcessCallback)(struct tagConsultantAgent *)

The Consultant calls this method when it is ready to finish a cycle. You should perform any document modifications assigned to your Agent at this point.


File: ConsExpT.h
Line: 114

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

Syntax

ASUns32 ConsStackGetCount(ConsStack hConsultant)

Returns the number of objects currently on Consultant's traversal stack. The stack includes the objects that the Consultant has visited on its path to the current object, meaning all parents of the current object but not the object itself.

An Acrobat exception is raised on error.

Parameters

hConsultant — 

The Consultant's traversal stack.

Returns

The number of objects on the Consultant.'s traversal stack.


File: ConsHFTProcs.h
Line: 238
ConsStackIndexGetArrayIndex() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASUns32 ConsStackIndexGetArrayIndex(ConsStack hConsultant, ASUns32 iIndex)

Gets the array index of the object at the given index into the stack (that is, the index that led from the given object to the next object in the traversal). It is only valid to call this function on an index if ConsStackIndexIsArray() returns true for that index.

Parameters

hConsultant — 

The Consultant's traversal stack.

 
iIndex — 

The index in the stack where the object in question is located.

Returns

The array index that led from the object at the given index in the stack to the next object in the Consultant's traversal path.


File: ConsHFTProcs.h
Line: 329
ConsStackIndexGetDictKey() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASAtom ConsStackIndexGetDictKey(ConsStack hConsultant, ASUns32 iIndex)

Gets the key string atom of the object at the given index into the stack (that is, the key that led from the given object to the next object in the traversal). It is only valid to call this function on an index if ConsStackIndexIsDict() returns true for that index.

An Acrobat exception is raised on error.

Parameters

hConsultant — 

The Consultant's traversal stack.

 
iIndex — 

The index in the stack where the object in question is located.

Returns

The key that led from the object at the given index in the stack to the next object in the Consultant's traversal path.


File: ConsHFTProcs.h
Line: 314
ConsStackIndexGetObj() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

CosObj ConsStackIndexGetObj(ConsStack hConsultant, ASUns32 iIndex)

Gets the the Cos object at the given index into the stack.

Parameters

hConsultant — 

The Consultant's traversal stack.

 
iIndex — 

The point at which to find the object.

Returns

The object at the specified point in the Consultant's traversal stack.


File: ConsHFTProcs.h
Line: 248
ConsStackIndexGetTypeAt() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

PDFObjType ConsStackIndexGetTypeAt(ConsStack hConsultant, ASUns32 iIndex, ASUns32 iTypeIndex)

Gets a type from the type array at each index in the stack. Since there are potentially multiple types for each object, you can access the type classifications one at a time.

Parameters

hConsultant — 

The Consultant's traversal stack.

 
iIndex — 

The position in the stack of the object in question.

 
iTypeIndex — 

The type classification of the object. 0 is the most specific type classification. The higher the number, the more general the type classification.

Returns

One type of an object at a particular location in the traversal stack.


File: ConsHFTProcs.h
Line: 275
ConsStackIndexGetTypeCount() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASUns32 ConsStackIndexGetTypeCount(ConsStack hConsultant, ASUns32 iIndex)

Gets the size of the type hierarchy at the given index into the stack.

Parameters

hConsultant — 

The Consultant's traversal stack.

 
iIndex — 

The object in question.

Returns

The size of the type hierarchy. It tests whether the given index into the stack is a CosArray.

true if the object found at the index point is an array, false otherwise.


File: ConsHFTProcs.h
Line: 260
ConsStackIndexIsArray() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool ConsStackIndexIsArray(ConsStack hConsultant, ASUns32 iIndex)

Tests whether the given index into the stack is a CosArray.

Parameters

hConsultant — 

The Consultant's traversal stack.

 
iIndex — 

The index in the stack where the object in question is located.

Returns

true if the object found at the index point is an array, false otherwise.


File: ConsHFTProcs.h
Line: 297
ConsStackIndexIsDict() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool ConsStackIndexIsDict(ConsStack hConsultant, ASUns32 iIndex)

Tests whether the object at the given index into the stack is a CosDict object.

Parameters

hConsultant — 

The Consultant's traversal stack.

 
iIndex — 

The index in the stack where the object in question is located.

Returns

true if the object found at the index point is a dictionary, false otherwise.


File: ConsHFTProcs.h
Line: 286
ConsultantCreate() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

Consultant ConsultantCreate(ConsAgentPercentDoneCallback pPercentDoneCallBack)

Allocates and intializes a new Consultant object. Use the returned object to call the other Consultant API functions. When you are finished with this object, you must destroy it using the ConsultantDestroy() function.

An Acrobat exception is raised on failure.

Parameters

pPercentDoneCallBack — 

A function pointer to be called back with progress updates. It may be NULL.

Returns

The Consultant object that was created.

See Also


File: ConsHFTProcs.h
Line: 36
ConsultantDestroy() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void ConsultantDestroy(Consultant hConsultantToDestroy)

Detaches all Agents and destroys the given Consultant object, invalidating its handle. You must never call this on a Consultant that is currently running.

An Acrobat exception is raised on failure.

Parameters

hConsultantToDestroy — 

A valid Consultant object handle as returned by ConsultantCreate(). The handle is invalid after the call returns.


File: ConsHFTProcs.h
Line: 54
ConsultantGetNumDirectVisited() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASUns32 ConsultantGetNumDirectVisited(Consultant hConsultant)

Returns the number of direct objects that the Consultant has processed so far. This count may include some objects twice, depending on revisitation of objects. This count is reset on calls to ConsultantTraverseFrom() and ConsultantSetStart().

Parameters

hConsultant — 

A valid Consultant object handle as returned by ConsultantCreate().

Returns

The number of direct objects the Consultant has visited so far.


File: ConsHFTProcs.h
Line: 169
ConsultantGetNumIndirectVisited() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASUns32 ConsultantGetNumIndirectVisited(Consultant hConsultant)

Returns the number of indirect objects that the Consultant has processed so far. This count may include some objects twice, depending on revisitation of objects. This count is reset on calls to ConsultantTraverseFrom() and ConsultantSetStart().

Parameters

hConsultant — 

A valid Consultant object handle as returned by ConsultantCreate().

Returns

The number of indirect objects the Consultant has visited so far.


File: ConsHFTProcs.h
Line: 181
ConsultantGetNumUniqueIndirectsVisited() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASUns32 ConsultantGetNumUniqueIndirectsVisited(Consultant hConsultant)

Returns the number of unique indirect objects that the Consultant has processed so far. This count is reset on calls to ConsultantTraverseFrom() and ConsultantSetStart(). Visited objects are not counted more than once, if an object is revisited, the count is not incremented.

Parameters

hConsultant — 

A valid Consultant object handle as returned by ConsultantCreate().

Returns

The number of unique indirect objects the Consultant has visited so far.


File: ConsHFTProcs.h
Line: 350
ConsultantGetPercentDone() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASReal ConsultantGetPercentDone(Consultant hConsultant)

Returns an estimate (from 0 to 100) of what percentage of the current document has been processed by the Consultant. You can call this function at any time.

Parameters

hConsultant — 

A valid Consultant object handle as returned by ConsultantCreate().

Returns

A number from 0 to 100.


File: ConsHFTProcs.h
Line: 157
ConsultantNeverVisitObj() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void ConsultantNeverVisitObj(Consultant hConsultant, CosObj hObj)

Instructs the Consultant to never walk through the supplied object. This function can (should) be called before traversing, so that you can ignore subtrees (such as the StructTree). This function does not un-suspend a Consultant, so you can call it repeatedly. It marks the object as Visited and NeverRevisit. This is a pre-traverse call, since marking an object as AC_NEVERREVISIT only occurs AFTER the object has been visited in post-order modes.

Parameters

hConsultant — 

A valid Consultant object handle as returned by ConsultantCreate().

 
hObj


File: ConsHFTProcs.h
Line: 365
ConsultantNextObj() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

ASBool ConsultantNextObj(Consultant hConsultant)

Instructs the Consultant to process the next object in the current traversal. It assumes that the Consultant has been suspended and reset with calls to ConsultantSuspend() and ConsultantSetStart(). This function does not un-suspend a Consultant, so you can call it repeatedly. It returns after all registered Agents have processed the object.

An Acrobat exception is raised if you call it on a running Consultant.

Parameters

hConsultant — 

A valid Consultant object handle as returned by ConsultantCreate().

Returns

true if the process is done or there has been a problem, false otherwise.


File: ConsHFTProcs.h
Line: 147
ConsultantRegisterAgent() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void ConsultantRegisterAgent(Consultant hConsultant, const ConsultantAgent* pAgent, RegAgentFlag kFlag)

Registers the given agent with the given consultant, so that the agent is called when the consultant encounters objects of interest.

An Acrobat exception is raised if the Consultant has been started and is not in a suspended state.

Parameters

hConsultant — 

A valid Consultant object handle as returned by ConsultantCreate(). It is the Consultant with which the Agent will be registered.

 
pAgent — 

The Agent to register, of a type derived from the ConsultantAgentObj base class.

 
kFlag — 

A flag indicating the mode in which the Consultant should operate.


File: ConsHFTProcs.h
Line: 101
ConsultantResume() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void ConsultantResume(Consultant hConsultant)

Resumes a previously suspended Consultant at the point in the traversal where it stopped. This function does not return from traversing and notifying Agents until the traversal is complete or ConsultantSuspend() is called. The function does nothing if the Consultant object is already running or has not been started.

Parameters

hConsultant — 

A valid Consultant object handle as returned by ConsultantCreate().


File: ConsHFTProcs.h
Line: 224
ConsultantSetStart() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void ConsultantSetStart(Consultant hConsultant, CosObj hObjStart, PDFObjType kInitType)

Resets the suspended Consultant and starts a new traversal from the given starting object.

If you do not know the type of the object, the Consultant will attempt to determine it. This function does not return until the entire path beneath the starting object has been traversed. The Consultant passes to the registered Agents all objects it encounters that have been registered as interesting.

An Acrobat exception is raised if the Consultant has been started and is not in a suspended state.

Parameters

hConsultant — 

A valid Consultant object handle as returned by ConsultantCreate(). It is the Consultant with which the Agent will be registered.

 
hObjStart — 

The object at which to restart traversal. Usually, for traversing an entire document, this is the Catalog.

 
kInitType — 

The object type of the specified start object. It may be PT_NULL, in which case the Consultant attempts to determine the type of the object itself. You should specify a value other than PT_NULL whenever possible In most cases, for traversing the entire document, the starting object is the Catalog so the type is PT_CATALOG.


File: ConsHFTProcs.h
Line: 129
ConsultantSuspend() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void ConsultantSuspend(Consultant hConsultant)

Suspends the Consultant, even if it is currently executing a call to ConsultantCreate() or ConsultantResume(). This function causes currently executing calls to ConsultantTraverseFrom() to return. It is allowed to call this function from within the ScrubPercentDoneCallback() passed to the Consultant on ConsultantCreate(). Calls to ConsultantTraverseFrom() that are currently in progress will return when ConsultantSuspend() is called.

To resume, call ConsultantResume().

This function does nothing if you call it on a Consultant object that is already suspended, or if it was never started.

Parameters

hConsultant — 

A valid Consultant object handle as returned by ConsultantCreate().


File: ConsHFTProcs.h
Line: 212
ConsultantTraverseFrom() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

void ConsultantTraverseFrom(Consultant hConsultant, CosObj hObj, PDFObjType kObjType)

Starts the given Consultant object traversing at the given Cos object. It traverses and processes all objects beneath obj, classifying the types of objects based on the fact that obj is of the given ObjType.

It is never allowed to destroy a Consultant object that is currently executing a call to ConsultantTraverseFrom(). To properly destroy a running Consultant, you must first call ConsultantSuspend(). ConsultantTraverseFrom() raises an exception under any other conditions, and may also raise an exception as the result of a registered Agent's raising an exception during the operation.

An Acrobat exception is raised if the Consultant has been started and is not in a suspended state.

Parameters

hConsultant — 

A valid Consultant object handle as returned by ConsultantCreate(). It is the Consultant with which the Agent will be registered.

 
hObj — 

The object at which to start traversal.

 
kObjType — 

The object type of the specified start object. It may be PT_NULL, in which case the Consultant attempts to determine the type of the object itself. You should specify a value other than PT_NULL whenever possible.


File: ConsHFTProcs.h
Line: 83
PDFObjTypeGetSuperclass() 
Product availability: Acrobat, Reader
Platform availability: Macintosh, Windows, UNIX

Syntax

PDFObjType PDFObjTypeGetSuperclass(PDFObjType kType)

Gets the superclass, if any, of the given PDFObjType.

Parameters

kType — 

The type that might have a superclass.

Returns

The superclass of the given type, or DT_NULL if no superclass exists.


File: ConsHFTProcs.h
Line: 337