LONG AddActionArea ( FLOAT left, FLOAT top, FLOAT right, FLOAT bottom, LONG actionNumber ) |
This method inserts an action annotation area into the current page in an area bounded by the specified coordinates. Each mouse click in the annotation area executes the action with index actionNumber (created by any of the Action groupmethods).
The return value is an annotation/control identifier in the document's annotations collection and can be used in AddControlToAction and CurrentAnnotation.
{ PDF object is supposed to be created } action := PDF.CreateJavascriptAction('app.alert("Hello!")'); PDF.AddActionArea(30, 30, 130, 130, action); PDF.DrawRectangle(30, 30, 100, 100, 0); PDF.Stroke; PDF.SaveToFile('test.pdf', true);
// PDF object is supposed to be created long action = PDF->CreateJavascriptAction("app.alert('Hello!')"); PDF->AddActionArea(30, 30, 130, 130, action); PDF->DrawRectangle(30, 30, 100, 100, 0); PDF->Stroke(); PDF->SaveToFile("test.pdf", true);
// PDF object is supposed to be created long action = PDF.CreateJavascriptAction("app.alert('Hello!')"); PDF.AddActionArea(30, 30, 130, 130, action); PDF.DrawRectangle(30, 30, 100, 100, 0); PDF.Stroke(); PDF.SaveToFile("test.pdf", true);
' PDF object is supposed to be created action = PDF.CreateJavascriptAction("app.alert('Hello!')") PDF.AddActionArea 30, 30, 130, 130, action PDF.DrawRectangle 30, 30, 100, 100, 0 PDF.Stroke PDF.SaveToFile "test.pdf", true