Free Support Forum - groupdocs.com

Avoid Overlapping Thumbnail in PDF


#1

Hii,


If i am setting .ShowThumbnails(true) & .OpenThumbnails(true) then Thumbnail will display over PDF.Please suggest me how can i show thumbnail without overlapping with PDF Content.
i mean to say if it is overlapping then thumbnail should be docable .So User cannot face any problem at time of Viewing.

#2

Hello,


Thank you for the question. Please use " .UseInnerThumbnails(true)" of the widget. If you will set this property to true the thumbnails panel will be just like in the Acrobat Reader (docked on the left side of the Viewer)

Thank you.

#3

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.


#4

Hello again,


Sorry for the misunderstanding (I thought that you use Viewer). Currently this option doesn’t available in the Annotation library but we will add this feature to our roadmap.

When this feature will be released you will be notified here.

Thank you.

#5

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.



#6

Hello,


The only one alternative that you can try to use is to override the CSS of the thumbnails. PLease try to use such code example on the web page with the Annotation:

.thumbnailsContainer {
display:inline-block !important;
position: relative !important;
background-color: #d3d5d8 !important;
margin-left: 30px !important;
border-left: 1px solid #777d84 !important;
border-right: 0 !important;
width: auto !important;
min-width: 203px !important;
}

.doc_viewer{
display: inline-block;
position: inherit;
}
.thumbs_btn {
display: none!important;
}

Thank you.

#7

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.


#8
Hello Suchismita Mohanty,

Then try to use this modification of the earlier provided CSS:
.thumbnailsContainer {
display:inline-block !important;
position: relative !important;
background-color: #d3d5d8 !important;
border-left: 1px solid #777d84 !important;
border-right: 0 !important;
width: auto !important;
min-width: 203px !important;
}
.doc_viewer{
display: inline-block;
position: inherit;
margin-left: 203px;
}
.thumbs_btn {
display: none!important;
}
Along with this JavaScript code.
It is better to place this JS code after GroupDocs.Annotation plugin block.


#9

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;
//SessionFacade.CurrentUserName = 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.


#10
Hello Suchismita,

Thank you for the code example.

Sorry, but from your post (you have set .NET and then Java platform) is not very clear which platform you use (by looking at the code we can assume that you use .NET platform). Since that we have checked this on both platforms and we can't reproduce the issue. To be able reproduce and help you to fix it we will need an example of the project. Please share your both projects and we will check and fix them for you.

Best regards
Evgen Efimov

http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+