This method requires a PDTextAnnot object and an ASBool value that specifies true. Opening an annotation enables you to set its content. Open the text annotation by invoking the PDTextAnnotSetOpen method. This method requires a PDAnnot object and returns a PDTextAnnot object. (See the Acrobat and PDF Library API Reference.)Ĭast the PDAnnot object to a PDTextAnnot object by invoking the CastToPDTextAnnot method. Because a text annotation is created, specify Text as the annotation’s subtype. This method returns a PDPage object.Ĭreate a PDAnnot object by invoking the PDPageCreateAnnot method and passing the following arguments:Ī PDPage object that represents the page that will contain the new annotation.Īn ASAtom object that represents the annotation’s subtype. The first argument passed to this method is a PDDoc object that represents the PDF document and the second is an ASInt32 object that represents the page number on which the annotation is applied. To create a rectangle region, create an ASFixedRect object.ĭefine the rectangle’s borders by setting the ASFixedRect object’s left, top, right, and bottom attributes.Ĭreate a PDPage object that represents the page that will contain the new annotation by invoking the PDDocAcquirePage method. You can create a text annotation by performing the following tasks:Ĭreate a rectangle region that specifies the annotation’s location. For example, you can invoke the PDAnnotSetColor method to set the color of an annotation. You can use PDAnnot methods to get and set various annotation properties, such as color, date, title, location, and subtype. A PDTextAnnot object corresponds to a text annotation and a PDLinkAnnot object corresponds to a link annotation. The Acrobat core API contains two built-in annotation typedefs PDTextAnnot and PDLinkAnnot. The subtype for link annotations is link. The subtype for text annotations (also called notes) is text. Each subtype can have additional properties that extend the basic ones. Several annotation types exist, which are identified by their subtype. Annotations are represented by a PDAnnot typedef, which is the abstract superclass for all annotations. The Acrobat core API provides methods for working with annotations in PDF documents. An annotation associates an object such as a note, sound, or movie with a location on a page of a PDF document, or provides a way to interact with the user by means of the mouse and keyboard.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |