ANNOTATE, CANNOTATE

Top  Previous  Next

Syntax

 

1. annotate col|{numexpr}, row|{numexpr}, cols|{numexpr}, rows|{numexpr},"msg | url"|{expr}, [text|link|stamp] [,name name|{expr}] [,title title|{expr}] [,width width] [,color colorname] [,rgb rrggbb] [,opacity opacity] [,style style]

 

2. annotate "text|!=text|~regexp|!~regexp[@left,top,right.bottom]", col|{numexpr}, row|{numexpr}, cols|{numexpr}, rows|{numexpr},"msg | url"|{expr}, [text|link|stamp] [,name "name"|{expr}] [,title title|{expr}] [,width width] [,color colorname] [,rgb rrggbb] [,opacity opacity] [,style style]

 

Description

 

This PDF-only command adds an annotation element at the specified position and size.  Three types are supported:  text, link, and stamp.  The default is text.

 

If cannotate is used, then cols and rows are interpreted to be the opposite corner of the region, and columns and rows are calculated by UnForm.

 

If syntax 2 is used, then the region is defined relative to any occurrence of the text, or of text that matches the regular expression regexpr.  In these cases, there may be no affected regions, or several.  column and row are 0-based in these formats.  The search for text or regexpr can be limited to a region on the page by adding a suffix in the format '@left,top,right,bottom'.  To use a literal "@" character in text or regexpr, it is necessary to specify "\@".

 

If the syntax "!=text" or "!~regexpr" is used, then the search is for positions NOT equal to the text or NOT matching the regular expression.  When using the NOT syntax, only one search is performed per line in the search region.

 

Text annotations display as an icon, which if clicked will open a text window displaying the message with the optional title in the title bar.  The border can be controlled by the style, color, and width options.  The icon can be set with the case-sensitive name option: Comment, Help, Insert, Key, NewParagraph, Note, or Paragraph.  The default icon is Note.  To ensure the case is maintained, the name should be enclosed in quotes.

 

Link annotations perform an action when clicked.  The action is defined in the message.  It can be a URL, such as http://abc.com or mailto:sales@abc.com, or it can be a Javascript action, entered as javascript:script code.  Note the javascript command can be used to add functions at a document level which can be used in annotation actions.

 

Stamp annotations place a stamp rather than an icon on the form.  When clicked, the message is displayed as in a text annotation.  The stamp image shown is identified by the case-sensitive name value, which can be one of these:

Approved
Experimental
NotApproved
AsIs
Expired
NotForPublicRelease
Confidential
Final
Sold
Departmental
ForComment
TopSecret
Draft
ForPublicRelease

 

 

Style and Width values apply to the annotation border.  The style can be S (solid), D (dashed), B (beveled), I (inset), or U (underline).  Width is expressed in pixels at the current dpi.

 

 

Examples

 

annotate 70.5,64,10,2.25,"http://acme.com/docs/terms.htm",link,style U, title "Click to view our Terms and Conditions"

 

annotate "TOTAL:",0,1,15,1.5,"Please contact our credit department at 555-123-4567 for more information", title "Credit Terms?",name "Help"

 

Drivers: pdf