I am having an issue when I create a new Pdf.Page and add a FreeTextAnnotation to that new page. It is visible in Firefox and IE but not in Chrome, using its proprietary PDF viewer that runs by default in that browser. The LinkAnnotation that I create is clickable but the text of the FreeTextAnnotation is not visible in the Chrome Pdf viewer.
I am doing this in an asp.net application using the Aspose.Pdf dll. Is this a known issue with the Chrome PDF viewer or is there something I need in my code to make this work.
Here is the code:
//Create new document.
Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document();
Aspose.Pdf.Page linkPage = (Aspose.Pdf.Page)pdfDocument.Pages.Add();
// create Link annotation object
Aspose.Pdf.InteractiveFeatures.Annotations.LinkAnnotation link = new Aspose.Pdf.InteractiveFeatures.Annotations.LinkAnnotation(linkPage, new Aspose.Pdf.Rectangle(100, 300, 500, 750));
// create border object for LinkAnnotation
Aspose.Pdf.InteractiveFeatures.Annotations.Border border = new Aspose.Pdf.InteractiveFeatures.Annotations.Border(link);
// set the border width
border.Width = 0;
// set the border for LinkAnnotation
link.Border = border;
//Set the link url.
link.Action = new Aspose.Pdf.InteractiveFeatures.GoToURIAction("http://aspose.com");
// add link annotation to annotations collection of first page of PDF file
linkPage.Annotations.Add(link);
//create Free Text annotation
Aspose.Pdf.InteractiveFeatures.Annotations.FreeTextAnnotation textAnnotation = new Aspose.Pdf.InteractiveFeatures.Annotations.FreeTextAnnotation(linkPage, new Aspose.Pdf.Rectangle(100, 300, 500, 750), "Link");
//Create text for link.
string strTextFrag = "Please click here to goto website.";
// String to be added as Free text
textAnnotation.Contents = strTextFrag;
// set the border for Free Text Annotation
textAnnotation.Border = border;
// add FreeText annotation to annotations collection of first page of Document
linkPage.Annotations.Add(textAnnotation);
return pdfDocument;
Thanks for any help you can provide!