Create a textbox with a text in it, right aligned. Select it and duplicate this annotation within javascript, the resulting annotation will be left aligned. This snippet will reproduce the annotation, and the new annotations will be left aligned:
Code: Select all
var a = this.selectedAnnots[0].getProps();
a.contents="This should have same alignment as the selected annotation."
delete a.richContents; // workaround for empty richContents bug
this.addAnnot(a);