Hii,
Hello,
Thnx for reply By i am sorry to say by implementing this line it gives an Exception as ‘Groupdocs.Web.Annotation.AnnotationWidget’ does not contain a definition for ‘UseInnerThumbnails’.So plz check and give any solution.
Hello again,
Hii Pavel,
Please provide me any alternative solution so that i can able to crack client requirements. Actually existing thumbnail scenario is not satisfied by our client so its urgent to deliver as soon as possible.
Hello,
Thnx for quick response .But by overriding this CSS thumbnail also viewed over Document content so please provide any solution for expand and collapse option for thumbnail so taht document content can not be hide to user.
Thnx for response But Thumbnail collapse and expand option available in documentation when i am trying to use it thumbnail button will be hide .Let me explain my scenario.
I am using two projects in one solution .One project contains groupdocs viewer and another is my demo project. I want to use preview groupdocs annotation viewer on click of button and that button present in kendo grid of demo project.I want to show particular file for annotation on that button click then all annotation features are available excluding thumbnail button (it will be disabled due to some issue).So here is my code
Demo project :
On button click event code
var annotationURL = annotationUrl + “Home/Index?fileId=” + dataItem.FileId + “&userName=” + StrUserName;
$("#loading").show(); // For showing load
$("#div_docView").html(’’);
openPreview($("#wd_docView").data(“kendoWindow”));// Preview
$(’#myIframe’).on(‘load’, function () {
$(’#loading’).hide();
});
Controller code which is present in Groupdocs project:
public ActionResult Index(int fileId, string userName)
{
try
{
DocumentCache cache = new DocumentCache(Server.MapPath("~/GroupDocs.Annotation.for.NET.lic"), Server.MapPath("~/localfiles/"));
cache.RemoveOldEntries(new TimeSpan(0, 5, 0), @“c:\GDViewerTmp\cache_clean_log.txt”);
if (!String.IsNullOrEmpty(userName))
{
SessionFacade.CurrentUserName = userName;
FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(userName, true, 1439200);
string encryptedTicket = FormsAuthentication.Encrypt(ticket);
HttpCookie cookie = new HttpCookie(FormsAuthentication.FormsCookieName, encryptedTicket);
cookie.Expires = ticket.Expiration;
Response.Cookies.Add(cookie);
}
else
{
SessionFacade.CurrentUserName = “”;
var cookie = new HttpCookie(FormsAuthentication.FormsCookieName) { Expires = DateTime.UtcNow.AddDays(-1) };
Response.Cookies.Add(cookie);
Session.Abandon();
}
System.Web.Security.Membership.ValidateUser(userName, null);
Session[“DocumentId”] = null;
Session[“UserName”] = null;
Session[“FileName”] = null;
byte[] fileBytes = document.GetFileFromDB(fileId);
int documentId = document.GetDocumentId(fileId);
string fileName = document.GetFileName(fileId);
Session[“DocumentId”] = documentId;
Session[“UserName”] = userName;
Session[“FileName”] = fileName;
Session[“FileId”] = fileId;
if (fileBytes != null)
{
System.IO.MemoryStream ms = new System.IO.MemoryStream(fileBytes);
ms.Position = 0;//note this line!!!
this.ByteStream = new System.IO.MemoryStream(fileBytes);
ViewBag._Stream = ms;
ViewBag.File = documentId + "" + fileName;
}
return View();
}
catch (Exception ex)
{
}
return View();
}
Please go throw my code and suggest me where is i am doing fault.
Best regards
Evgen Efimov
http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+