Hi,
I am using PDFTron to generate some FreeText annotations in one of our programs.
I use the following code:
pdftron.PDF.Annots.FreeText txt = pdftron.PDF.Annots.FreeText.Create( m_PdfDocument.GetSDFDoc(), pos );
txt.SetAppearance( CreateMyAppearance( m_PdfDocument, annotation, pos));
txt.SetContents( annotationText );
txt.SetBorderStyle( new Annot.BorderStyle( Annot.BorderStyle.Style.e_solid, 0 ) );
this.GetDefaultAnnotation( "FreeText" ).SetColor( new ColorPt( 0, 0, 1 ) );
pag.AnnotPushBack( txt );
The problem is when I resize the annotation using the "Edit" toolmode, it changes color to red and the "Appearance stream" appears to be lost.
This line appears to do nothing:
this.GetDefaultAnnotation( "FreeText" ).SetColor( new ColorPt( 0, 0, 1 ) );
How can i retain the original "Appearance" ?
Kind regards,
Tom Staelens
Sensotec Belgium