How to set Attributes for FreeText Annotation using CreateFreeText

Using CreateFreeText, how can I control the font attributes, color and border? Experimenting with CreateFreeText, it creates a free text annotation with a font size of zero (so the text doesn’t even show), a red border, and blue text (which I can only see after manually editing the PDF after creation and increasing the font size). Thanks.

Hi Joseph,


I have tested the scenario using following code snippet and as per my observations, the resultant PDF shows the annotation text. I am afraid you might not be able to specify the text formatting attributes when using CreateFreeText(…) method. This support will be provided in FreeTextAnnotation class. Please check my comments over 423441 for further details.

[C#]

PdfContentEditor editor = new
PdfContentEditor();<o:p></o:p>

editor.BindPdf("d:/pdftest/Testdocument_NotEmbedded (1).pdf");

editor.CreateFreeText(new System.Drawing.Rectangle(40, 300, 100, 100), "Welcome to Aspose", 1);

editor.Save("d:/pdftest/CreateFreeTextAnnotation_example_out.pdf");


We are sorry for this inconvenience.