1

my problem is that when I try to set transparent as strokeColor for FreeText annotation when adding one the resulting annotations has black border.

I try to code it like this:

this.addAnnot({ type: "FreeText", contents: "TEST", strokeColor: color.transparent, page: 0 });

Ane the result is:

Sample of the result

Is there any way to set transparent as border color for the annotation?

eLGi
  • 80
  • 2
  • 10

1 Answers1

3

Add the undocumented property "intent" and set it to "FreeTextTypewriter". That property changes the way the on-page appearance gets generated.

this.addAnnot({ type: "FreeText", contents: "TEST", page: 0 ,strokeColor: color.transparent, intent:"FreeTextTypewriter"});
joelgeraci
  • 4,606
  • 1
  • 12
  • 19