Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Text Callout not working

Community Beginner ,
Feb 13, 2017 Feb 13, 2017

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 });
TOPICS
Acrobat SDK and JavaScript
2.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Feb 13, 2017 Feb 13, 2017

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.

callout.png

Translate
Community Expert ,
Feb 13, 2017 Feb 13, 2017

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>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 13, 2017 Feb 13, 2017

When I refered the docs its mentioned to include `intent: "FreeTextCallout"` along with `type: "FreeText"`. Please correct me if I have mistaken?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 13, 2017 Feb 13, 2017

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.

callout.png

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 13, 2017 Feb 13, 2017

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 04, 2024 Mar 04, 2024
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines