I having an issue integrating the annotations tool into my web forms .net project. I want to open files from stream but when i try to open .txt files viewer opens a popup and it say “The document couldn’t be loaded…”. But when i try to open same txt file with using filepath rather stream, it works.
First code doesnt work, second is works and i added my txt file as attachment
or in annotation this also works returnnewWidgetFactory()
.Annotation()
.ElementId(“test”)
.Stream(newFileStream(@“C:\ViewerDemoDocs\testText.txt”, FileMode.Open, FileAccess.Read, FileShare.Read), Groupdocs.Common.FileType.Txt)
.Width(1000)
.Height(750).ToHtmlString();
But this dont work, it opens a popup and it say “The document couldn’t be loaded…”. returnnewWidgetFactory()
.Annotation()
.ElementId(“test”)
.Stream(newFileStream(@“C:\ViewerDemoDocs\testText.txt”, FileMode.Open, FileAccess.Read, FileShare.Read),“testText.txt”)
.Width(1000)
.Height(750).ToHtmlString();
Thank you for notifying us about this - yes, it is the same bug. GroupDocs.Annotation internally uses a GroupDocs.Viewer, so the bug in the GroupDocs.Viewer is also present in the GroupDocs.Annotation.
This bug occurs only with the TXT and some other file formats; it works okay with PDF and DOC/DOCX, for example. Our developers started to work on it.
We will notify you in this forum thread when the bug will be fixed. Sorry for the inconvenience.