I am attempting to create a FreeTextAnnotation
with the code below. I opened the PDF to edit it manually and it appeared to be black, but when I clicked around the lower left part of the document I found the Annotation box which was completely blank until I re-sized it, at which point the text appeared.
Sub Main()
Dim pdfDocument As New Aspose.Pdf.Document()
Dim page As Aspose.Pdf.Page = pdfDocument.Pages.Add()
Dim llLeft As Integer = 100
Dim llBottom As Integer = 100
Dim llRight As Integer = 200
Dim llTop As Integer = 200
Dim lsText As String = "This is the line of text that I put here."
Dim lsFont As String = "Arial"
Dim fontSize As Integer = 10
Dim borderWidth As Integer = 1
Dim pdfFreeText As New Aspose.Pdf.InteractiveFeatures.Annotations.FreeTextAnnotation(
page,
New Aspose.Pdf.Rectangle(llLeft, llBottom, llRight, llTop),
Nothing
)
pdfFreeText.Contents = lsText
Dim border As New Aspose.Pdf.InteractiveFeatures.Annotations.Border(pdfFreeText)
border.Width = borderWidth
page.Annotations.Add(pdfFreeText)
pdfDocument.Save("output.pdf")
End Sub