While following the code sample from your website to add a text annotation, I’ve noticed the
textAnnotation.State does not work as expected. When I set it to “Accepted” and save it to PDF file. When I’ve opened the file and check the text notation, it’s state just point to “None”.
Here is the code snippet:
// Open document
Document pdfDocument = new Document();
// Create annotation
TextAnnotation textAnnotation = new TextAnnotation(pdfDocument.Pages[1], new Aspose.Pdf.Rectangle(200, 700, 400, 750));
textAnnotation.Title = “Sample Annotation Title”;
textAnnotation.Subject = “Sample Subject”;
textAnnotation.State = AnnotationState.Accepted;
textAnnotation.Contents = “Sample contents for the annotation”;
textAnnotation.Open = true;
textAnnotation.Icon = TextIcon.Key;
Border border = new Border(textAnnotation);
border.Width = 5;
border.Dash = new Dash(1, 1);
textAnnotation.Border = border;
textAnnotation.Rect = new Aspose.Pdf.Rectangle(200, 700, 400, 750);
// Add annotation in the annotations collection of the page
pdfDocument.Pages[1].Annotations.Add(textAnnotation);
// Save output file
pdfDocument.Save(“output.pdf”);
pdfDocument.Dispose();
Hi Ben,
Thanks for your inquiry. I have tested your scenario using Aspose.Pdf for .NET 11.2.0 and managed to observe the reported issue. For further investigation, I have logged an issue in our issue tracking system as PDFNEWNET-40174 and also linked your request to it. We will keep you updated via this thread regarding the issue status.
We are sorry for the inconvenience caused.
current version 24.90 does not work. it is working only 23.12.0 version or earlier version. i cannot use newer version because of the issue. is there timeline for this? could you please share?
We are afraid that the ticket was not resolved. However, we have revived it with your comments and will update here once it is rectified. We are sorry for the inconvenience.