Freetextannotation

Trying the freetextannotation example and it goes through the process but does not place the text in the file. Just downloaded the software last night.

Hi William,

Thanks for using our products.

Can you please share the source PDF file and the code snippet which you have used, so that we can test the scenario at our end.

During my testing with code snippet specified over Set Formatting of FreeTextAnnotation link, the FreeTextAnnotation is properly being added to PDF file.

We apologize for this inconvenience.

It is the sample project. but here is thee code and the input and output files from the data directory.

Public

Class Program


Public Shared Sub Main(ByVal args() As String)

' The path to the documents directory.

Dim dataDir As String = Path.GetFullPath("../../../Data/")

'open document

Dim pdfDocument As New Document(dataDir & "input.pdf")

' instantiate DefaultAppearance object

Dim default_appearance As Aspose.Pdf.InteractiveFeatures.DefaultAppearance = New DefaultAppearance("Arial", 28, System.Drawing.Color.Red)

'create annotation

Dim freetext As New FreeTextAnnotation(pdfDocument.Pages(1), New Aspose.Pdf.Rectangle(200, 400, 400, 600), default_appearance)

' specify the contents of annotation

freetext.Contents =

"Free Text"

' add anootation to annotations collection of page

pdfDocument.Pages(1).Annotations.Add(freetext)

' save the updated document

pdfDocument.Save(dataDir &

"output.pdf")

End Sub

End Class

v

Hi there,


Thank for your sharing the deatils. It seems you are facing issue due to evaluation version. As Aspose.Pdf evaluation version has two limitations, evaluation watermark and at most four elements of any collection can be viewed/accessed. Please make a request for 30 days temporary license to evaluate our product without any limitation. Hopefully your issue will be resolved.

Please feel free to contact us for any further assistance.

Best Regards,

Thank you. That did work. One other question. It puts a red box around the text in that example. Is it possible to just have the text and not the rectangle?

Hi William,


Thanks for your inquiry. After initial investigation, we have logged the requirement as PDFNEWNET-35637 in our issue tracking system for further investigation and resolution. We will keep you updated about the issue progress via this forum thread.

Sorry for the inconvenience faced.

Best Regards,

Hi William,


Thanks for your patience. You can set border color by using
FreetextAnnotation.Characteristics.Border property. Please check following code snippet for the purpose.

‘create annotation
Dim freetext As New FreeTextAnnotation(pdfDocument.Pages(1), New Aspose.Pdf.Rectangle(200, 400, 400, 600), default_appearance)

’ specify the contents of annotation
freetext.Contents = “Free Text”

’ set border color
freetext.Characteristics.Border = System.Drawing.Color.Transparent


Please feel free to contact us for any further assistance.

Best Regards,

The issues you have found earlier (filed as PDFNEWNET-35637) have been fixed in Aspose.Pdf for .NET 9.2.0.

The blog post for this release is created over this link


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan