3 Replies Latest reply: Feb 25, 2010 8:20 PM by arvindg007 RSS

    How to change font size & color of text inside note and callout annotation using code ?

    arvindg007 Community Member

      Hi,

       

      I want to set different font size & color for the text inside note and callout annotations. And for this, I am setting properties using the DS attribute while creating annotations (see below code).

       

      //"font: Helvetica,sans-serif 12.0pt;font-stretch:Normal; text-align:left; color:#rrggbb";

      sprintf(buf,

      "%s %2.1f%s%s%s%s;" , "font: Helvetica,sans-serif", float(g_fontSize),"pt; font-stretch:Normal; text-align:left; color:#", str[0], str[1], str[2]);

      CosDictPutKeyString (cosAnnot,

      "DS",CosNewString (cosDoc, false, buf, strlen(buf)));

      PDAnnotNotifyDidChange(pdAnnot, ASAtomFromString(

      "DS"), 0);

       

       

      But this doesn't work when I just wrire text after creating annotation.

       

      And suprisingly it works fine when I click first outside of the annotaion and then double click to write text inside annoatation.

       

      Is this bug of Adobe ? if not then please let me know the fix.

       

      Regards,

      Arvind