Developing a GroupDocs.Viewer plugin for Kentico CMS
This article describes a process of creation, integration and using a plugin for Kentico CMS, which includes GroupDocs.Viewer functionality into Kentico.
Introduction
GroupDocs.Viewer is a web-oriented middleware designed to allow end-users to view different types of documents, such as PDF, DOC/DOCX, XLS/XLSX and so on right from their web-browsers, without need of installing any other software or browser plugins (such as Adobe Flash, Silverlight or Java applets). GroupDocs.Viewer, which is located and runs on hhghg gthe server-side, just transforms an input document to a set of images, HTML markup, CSS, JS and SVG, and then sends all these data to the client-side.
Kentico is a pretty mature and advanced CMS, and is deeply focused on the document management. So it will be very interesting and useful to integrate the ability of viewing different documents into Kentico.
Right now GroupDocs.Viewer exists in different forms: it is available as a .NET class library (DLL), Java library (JAR) and as a Cloud API (SaaS). Because Kentico is an ASP.NET project in its core, we will use GroupDocs.Viewer for .NET library.
Must say that GroupDocs.Viewer plugin for Kentico already exists (http://groupdocs.com/marketplace/plugins/viewer/kentico) and is available along with its source code. But when you take a look on it, you will see that it uses GroupDocs.Viewer as SaaS — it simply creates an iframe on the web-page and redirects all input documents to the Cloud API. This requires you to have a GroupDocs account and use a third party web resource (GroupDocs Cloud API) in your site. But what if you want that all work must be done on your own server, without any external requests? What if all of your documents are confidential/classified and you definitely don’t want to send them via Internet? What if you have a GroupDocs.Viewer as a library file on your server and do not want use a remote API? Because your website is located on the intranet (or something like that) and has no access to the Internet? Or you do not want rely on the internet connection? This article describes su [1]ch situation.
Because Kentico CMS basically is an ASP.NET WebForms project, we will use a GroupDocs.Viewer for .NET library. The big part of all features of the Kentico is located in the web parts. In terms of Kentico, web part is a component of the page with its own functionality. This conception is very similar to the ASP.NET web user controls (ASCX).
In the basic redistributable package of Kentico there is a “Document library” ( http://devnet.kentico.com/docs/devguide/index.html?document_library_overview.htm) web part, which manages documents. It allows to upload documents, download, and update, view the list of all available documents, set a permissions for them, rename them and so on. When you click on the document name, it downloads to your PC and your web-browser stores it on your local machine with or without asking to set a location for storing. I want to create a new plugin in a form of new web part, which will have all the functionality of the “Document library”, but with one main distinction: when you click on the document, it must be viewed right into the browser using GroupDocs.Viewer, but not downloading as a file.