Hello,
I’m trying to add a simple text box to a PDF document, using this code:
_pdfDocument = new Aspose.Pdf.Document(sourceFilePath);
Aspose.Pdf.Page page = _pdfDocument.Pages[1];
Aspose.Pdf.Rectangle rect = new Aspose.Pdf.Rectangle(10,10,100,50);
DefaultAppearance appearance = new DefaultAppearance();
FreeTextAnnotation annotation = new FreeTextAnnotation(page, rect, appearance);
annotation.Contents = "This is the text";
page.Annotations.Add(annotation);
_pdfDocument.Save(destFilePath);
But the result PDF shows the TextBox frame but without the text. When double-clicking inside I can see the text, then if I add any character or make any change to that text, it will show correctly.
What am I missing?