Copy link to clipboard
Copied
I'm trying to insert Text callout, however its not showing up. It only showing the annotation box without arrow pointer. Please refer the code mentioned below:
var link = "http://www.example.com/";
var spans = new Array();
spans[0] = new Object();
spans[0].text = "Links to: ";
spans[0].textSize = 12;
spans[0].textColor = color.red;
spans[1] = new Object();
spans[1].text = link;
spans[1].textSize = 12;
spans[1].textColor = color.black;
var annot = this.addAnnot({ page: 0, type: "FreeText", intent: "FreeTextCallout", rect: [10, 10, 10, 10], richContents: spans });
Adding to Karl's answer. You need to specify the coordinates for the arrow in the "callout" property, an array of 6 numbers. See the graphic below.
Copy link to clipboard
Copied
Why would there be an arrow in a free-text annotation?
On Mon, Feb 13, 2017 at 4:32 PM, rahuld25915234 <forums_noreply@adobe.com>
Copy link to clipboard
Copied
When I refered the docs its mentioned to include `intent: "FreeTextCallout"` along with `type: "FreeText"`. Please correct me if I have mistaken?
Copy link to clipboard
Copied
Adding to Karl's answer. You need to specify the coordinates for the arrow in the "callout" property, an array of 6 numbers. See the graphic below.
Copy link to clipboard
Copied
You also need to provide the information for the 'callout' property to the annotation object:
Acrobat DC SDK Documentation - Annotation.callout
In general, it's always a good idea to reverse engineer something that you cannot get to work: Create a document with just a manually added callout annotation, and then "dig around" in it to find how it is created. You can then try to implement that same behavior in software.
Copy link to clipboard
Copied
I am confused. Why am I doing all this work. I am paying for a product - that product should be able to perform a basic function
Find more inspiration, events, and resources on the new Adobe Community
Explore Now