LayerPD_Layer
ObjectPDBead

A bead is a single rectangle in an article thread. An article thread represents a sequence of physically discontiguous but logically related items in a document (for example, a news story that starts on one page of a newsletter and runs onto one or more nonconsecutive pages). See Section 8.3.2, Articles, in the PDF Reference for more information on article threads and beads.

A bead remains valid as long as a thread is current and active. When traversing the beads in a thread using PDBeadAcquirePage() or PDBeadGetPrev(), you can use PDBeadEqual() to determine the wraparound point (the end of the list).



Typedef Summary
 Typedef
 PDBead
A single rectangle in an article thread. (Article threads are known simply as articles in the Acrobat viewer's user interface). A bead remains valid as long as a thread is current and active.
Method Summary
 Method
 
PDPage PDBeadAcquirePage(PDBead bead, PDDoc pdDoc)
Acquires the page on which a bead is located.
 
Destroys a bead.
 
ASBool PDBeadEqual(PDBead bead, PDBead bead2)
Tests two beads for equality. This method is useful to detect the end of a thread since the last bead in a thread points to the first.
 
Gets the PDBead corresponding to a Cos object, after checking the bead's validity. This method does not copy the object, but is instead the logical equivalent of a type cast.
 
CosObj PDBeadGetCosObj(PDBead bead)
Gets the Cos object corresponding to a bead. This method does not copy the object, but is instead the logical equivalent of a type cast.
 
ASInt32 PDBeadGetIndex(PDBead bead)
Gets the index of a bead in its thread.
 
PDBead PDBeadGetNext(PDBead bead)
Gets the next bead in a thread.
 
PDBead PDBeadGetPrev(PDBead bead)
Gets the previous bead in a thread.
 
Gets a bead's bounding rectangle.
 
PDThread PDBeadGetThread(PDBead bead)
Gets the thread containing the specified bead.
 
void PDBeadInsert(PDBead bead, PDBead newNext)
Inserts a bead after the specified bead.
 
ASBool PDBeadIsValid(PDBead bead)
Tests a bead's validity. This is intended only to ensure that the bead has not been deleted, not to ensure that all necessary information is present and valid.
 
PDBead PDBeadNew(PDPage page, const ASFixedRectP destRect)
Creates a new bead on the specified page. The newly created bead is not linked to a thread or another bead. Use PDThreadSetFirstBead() to make the bead the first bead in a thread. Use PDBeadInsert() to link it to another bead.
 
void PDBeadSetPage(PDBead bead, PDPage newPage)
Sets the page for a bead.
 
void PDBeadSetRect(PDBead bead, const ASFixedRectP newDestRect)
Sets a bead's bounding rectangle.

Typedefs Detail
PDBead 
Product availability: All
Platform availability: All

Syntax

typedef OPAQUE_64_BITS PDBead;

A single rectangle in an article thread. (Article threads are known simply as articles in the Acrobat viewer's user interface). A bead remains valid as long as a thread is current and active.

See Also


File: PDExpT.h
Line: 3153



Method Detail
PDBeadAcquirePage()
Product availability: All
Platform availability: All

Syntax

PDPage PDBeadAcquirePage(PDBead bead, PDDoc pdDoc)

Acquires the page on which a bead is located.

Parameters

bead — 

IN/OUT The bead whose page is acquired.

 
pdDoc — 

IN/OUT The document in which bead is located.

Returns

The page on which the bead resides. The acquired page must be freed using PDPageRelease() when it is no longer needed.

See Also

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 4189
PDBeadDestroy() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDBeadDestroy(PDBead bead)

Destroys a bead.

Parameters

bead — 

IN/OUT The bead to destroy.

See Also

Exceptions

pdErrBadBead

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 4134
PDBeadEqual() 
Product availability: All
Platform availability: All

Syntax

ASBool PDBeadEqual(PDBead bead, PDBead bead2)

Tests two beads for equality. This method is useful to detect the end of a thread since the last bead in a thread points to the first.

Parameters

bead — 

The first bead to compare.

 
bead2 — 

The second bead to compare.

Returns

true if the two beads are identical, false otherwise. Two beads are equal only if their Cos objects are equal (see CosObjEqual()).

See Also

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 4274
PDBeadFromCosObj() 
Product availability: All
Platform availability: All

Syntax

PDBead PDBeadFromCosObj(CosObj obj)

Gets the PDBead corresponding to a Cos object, after checking the bead's validity. This method does not copy the object, but is instead the logical equivalent of a type cast.

Parameters

obj — 

The dictionary Cos object whose bead is obtained.

Returns

The PDBead object for the bead.

See Also

Exceptions

pdErrBadBead is raised if the bead is not valid, as determined by PDBeadIsValid().

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 4301
PDBeadGetCosObj() 
Product availability: All
Platform availability: All

Syntax

CosObj PDBeadGetCosObj(PDBead bead)

Gets the Cos object corresponding to a bead. This method does not copy the object, but is instead the logical equivalent of a type cast.

Parameters

bead — 

IN/OUT The bead whose Cos object is obtained.

Returns

The dictionary Cos object for the bead. The contents of the dictionary can be enumerated using CosObjEnum(). It returns a NULL Cos object if PDBeadIsValid(bead) returns false.

See Also

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 4288
PDBeadGetIndex() 
Product availability: All
Platform availability: All

Syntax

ASInt32 PDBeadGetIndex(PDBead bead)

Gets the index of a bead in its thread.

Parameters

bead — 

IN/OUT The bead whose index is obtained.

Returns

The index of the bead in its thread. The first bead in a thread has an index of zero.

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 4260
PDBeadGetNext() 
Product availability: All
Platform availability: All

Syntax

PDBead PDBeadGetNext(PDBead bead)

Gets the next bead in a thread.

Parameters

bead — 

IN/OUT The bead for which the next bead is obtained.

Returns

The next bead, or a NULL Cos object (cast to a PDBead using PDBeadFromCosObj()). On the last bead, PDBeadGetNext() returns the first bead.

See Also

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 4149
PDBeadGetPrev() 
Product availability: All
Platform availability: All

Syntax

PDBead PDBeadGetPrev(PDBead bead)

Gets the previous bead in a thread.

Parameters

bead — 

IN/OUT The bead for which the previous bead is obtained.

Returns

The previous bead, or a NULL Cos object (cast to a PDBead using PDBeadFromCosObj()) if this is the first bead in the thread.

See Also

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 4164
PDBeadGetRect() 
Product availability: All
Platform availability: All

Syntax

void PDBeadGetRect(PDBead bead, ASFixedRectP rectP)

Gets a bead's bounding rectangle.

Parameters

bead — 

IN/OUT The bead whose bounding rectangle is obtained.

 
rectP — 

IN/OUT (Filled by the method) A pointer to a ASFixedRect specifying the bead's bounding rectangle, specified in user space coordinates.

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 4212
PDBeadGetThread() 
Product availability: All
Platform availability: All

Syntax

PDThread PDBeadGetThread(PDBead bead)

Gets the thread containing the specified bead.

Parameters

bead — 

IN/OUT The bead whose thread is obtained.

Returns

The bead's thread, or a NULL Cos object if the bead does not belong to a thread.

See Also

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 4250
PDBeadInsert() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDBeadInsert(PDBead bead, PDBead newNext)

Inserts a bead after the specified bead.

Parameters

bead — 

IN/OUT The bead after which newNext will be inserted.

 
newNext — 

IN/OUT The bead to insert.

See Also

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 4176
PDBeadIsValid() 
Product availability: All
Platform availability: All

Syntax

ASBool PDBeadIsValid(PDBead bead)

Tests a bead's validity. This is intended only to ensure that the bead has not been deleted, not to ensure that all necessary information is present and valid.

Parameters

bead — 

The bead whose validity is tested.

Returns

true if the bead is valid, false otherwise.

See Also

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 4236
PDBeadNew() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

PDBead PDBeadNew(PDPage page, const ASFixedRectP destRect)

Creates a new bead on the specified page. The newly created bead is not linked to a thread or another bead. Use PDThreadSetFirstBead() to make the bead the first bead in a thread. Use PDBeadInsert() to link it to another bead.

Parameters

page — 

The page on which the bead is created.

 
destRect — 

A pointer to a ASFixedRect specifying the bead's bounding rectangle, specified in user space coordinates.

Returns

The newly created bead.

See Also

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 4123
PDBeadSetPage() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDBeadSetPage(PDBead bead, PDPage newPage)

Sets the page for a bead.

Parameters

bead — 

IN/OUT The bead whose page is set.

 
newPage — 

IN/OUT The page on which bead is located.

See Also

Exceptions

pdErrBadBead

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 4200
PDBeadSetRect() 
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX

Syntax

void PDBeadSetRect(PDBead bead, const ASFixedRectP newDestRect)

Sets a bead's bounding rectangle.

Parameters

bead — 

IN/OUT The bead whose bounding rectangle is set.

 
newDestRect — 

IN/OUT A pointer to a ASFixedRect specifying the bead's bounding rectangle, specified in user space coordinates.

See Also

Since

PI_PDMODEL_VERSION >= 0x00020000

File: PDProcs.h
Line: 4225