Index
- Installation
- Getting Started
- Memory Usage
- Readers and Writers
- The Document Class
- Metadata
- Pages
- Canvas
- Page Layout and Mode
- Viewer Preferences
- Document Outline
- Page Labels
- Actions
- Destinations
- Annotations
- Embedded File Streams
- Colors and Color Spaces
- Page Formats and Boundaries
- Standard and Public Key Encryption
- Fonts and Encodings
- Corrupted Documents
- Reader Enabled Documents
- Refactor Old SetaPDF Code
- API Reference
Markup Annotation Class
Table of Contents
Introduction
Many annotation types are defined as markup annotations because they are used primarily to mark up PDF documents. You may know these annotation types as entries in the comments pane in your PDF reader. To manage these annotation types the SetaPDF-Core component offers the SetaPDF_Core_Document_Page_Annotation_Markup
class.
Following annotations are markup annotations:
- Text
- Free text annotations (no Popup)
- Line
- Square
- Circle
- Polygon
- PolyLine
- Highlight
- Underline
- Squiggly
- StrikeOut
- Stamp
- Caret
- Ink
- FileAttachment
- Sound (no Popup)
- Redact
All annotations which are not explicit linked (high level implementation available) are still available through an instance of the SetaPDF_Core_Document_Page_Annotation_Markup
class.
Methods
The class implements getter and setter methods to access markup specific annotation data:
addReply()
Adds a reply to this annotation.
createPopup()
Create a popup annotation object for this annotation.
getCreationDate()
Get the creation date.
getInReplyTo()
Get the in reply to annotation (if available).
getPopup()
Get the associated popup object if available.
getReplies()
Get all annotations which refer this annotation as an reply.
getSubject()
Get the subject.
getTextLabel()
Get the text label.
hasReplies()
Check whether this annotation has a reply or not.
isReplyTo()
Checks if this annotation is a reply to another annotation.
setCreationDate()
Set the creation date.
setInReplyTo()
Set the in reply to annotation object.
setPopup()
Set the pop-up annotation object.
setSubject()
Get the subject.
setTextLabel()
Set the text label.
Example
As you may have noticed, by the available method names, it is possible to create a kind of comment structure for these annotation types. Following a demo, that dumps the comments outline from this document: