Layer | PD_Layer |
Object | PDTextAnnot |
A PDTextAnnot corresponds to a PDF text annotation. For details, see Text Annotations in Section 8.4.5, Annotation Types, in the PDF Reference. You can use any PDAnnot method on a PDTextAnnot.
Plug-ins can use PDTextAnnot methods to:
The Acrobat SDK provides three useful macros to cast among PDAnnot and its text annotation and link annotation subclasses. These are (see PDExpT.h):
Define | ||
---|---|---|
CastToPDTextAnnot
Casts a link annotation or a generic annotation to a text annotation.
|
Typedef | ||
---|---|---|
PDTextAnnot
A PDF text annotation on a page in a PDF file. You can use any PDAnnot method on a PDTextAnnot.
|
Method | ||
---|---|---|
Gets the text of a text annotation.
|
||
Gets the text of a text annotation as an ASText object.
|
||
ASBool PDTextAnnotIsOpen(PDTextAnnot aTextAnnot)
Tests whether a text annotation is open.
|
||
Sets the text of a text annotation. This method also sets the modification date of the annotation to the current date and time.
|
||
Sets the text of a text annotation.
|
||
Opens or closes a text annotation.
|
CastToPDTextAnnot |
Product availability: All |
Platform availability: All |
#define CastToPDTextAnnot *(PDTextAnnot *)&(a)
Casts a link annotation or a generic annotation to a text annotation.
See Also
File: PDExpT.h |
Line: 436 |
PDTextAnnot |
Product availability: All |
Platform availability: All |
typedef OPAQUE_64_BITS PDTextAnnot;
A PDF text annotation on a page in a PDF file. You can use any PDAnnot method on a PDTextAnnot.
Applications can:
Get and set attributes including the rectangle, textual contents, and whether the annotation is open.
Create new text annotations, and delete or move existing ones using PDAnnot methods.
Manipulate the behavior of text annotations by modifying the Text Annotation Handler.
To obtain a PDF text annotation, use any of the PDAnnot calls, followed by CastToPDTextAnnot(). The annotation passed to CastToPDTextAnnot() must be a text annotation; it will not convert other annotation types into text annotations.
See Also
File: PDExpT.h |
Line: 340 |
PDTextAnnotGetContents | () |
Product availability: All |
Platform availability: All |
ASInt32 PDTextAnnotGetContents(PDTextAnnot aTextAnnot, char* buffer, ASInt32 bufSize)
Gets the text of a text annotation.
Parameters
aTextAnnot — | The text annotation whose text is obtained. |
|
buffer — | (Filled by the method) A buffer into which the text is placed. If the text is encoded using |
|
bufSize — | The maximum number of characters that |
The number of characters written into |
See Also
Since
File: PDProcs.h |
Line: 585 |
PDTextAnnotGetContentsASText | () |
Product availability: All |
Platform availability: All |
void PDTextAnnotGetContentsASText(PDTextAnnot aTextAnnot, ASText contents)
Gets the text of a text annotation as an ASText object.
Parameters
aTextAnnot — | The text annotation whose text is obtained. |
|
contents — | (Filled by the method) The text object containing the contents. The client must pass a valid ASText object title. The routine does not allocate it. |
See Also
Since
File: PDProcs.h |
Line: 11346 |
PDTextAnnotIsOpen | () |
Product availability: All |
Platform availability: All |
ASBool PDTextAnnotIsOpen(PDTextAnnot aTextAnnot)
Tests whether a text annotation is open.
Parameters
aTextAnnot — | The text annotation whose open/closed state is obtained. |
|
See Also
Since
File: PDProcs.h |
Line: 628 |
PDTextAnnotSetContents | () |
Product availability: Acrobat, PDFL |
Platform availability: Macintosh, Windows, UNIX |
void PDTextAnnotSetContents(PDTextAnnot aTextAnnot, const char* str, ASInt32 nBytes)
Sets the text of a text annotation. This method also sets the modification date of the annotation to the current date and time.
Parameters
aTextAnnot — | The text annotation whose text is set. |
|
str — | A string containing the new text. The string must be encoded using |
|
nBytes — | The number of characters in |
See Also
Notifications
Since
File: PDProcs.h |
Line: 607 |
PDTextAnnotSetContentsASText | () |
Product availability: All |
Platform availability: All |
void PDTextAnnotSetContentsASText(PDTextAnnot aTextAnnot, const ASText contents)
Sets the text of a text annotation.
Parameters
aTextAnnot — | The text annotation whose text is set. |
|
contents — | The text object containing the new text. |
See Also
Notifications
Since
File: PDProcs.h |
Line: 11361 |
PDTextAnnotSetOpen | () |
Product availability: Acrobat, PDFL |
Platform availability: Macintosh, Windows, UNIX |
void PDTextAnnotSetOpen(PDTextAnnot aTextAnnot, ASBool isOpen)
Opens or closes a text annotation.
Parameters
aTextAnnot — | ||
isOpen — |
|
See Also
Notifications
Since
File: PDProcs.h |
Line: 650 |