XtremeDocumentStudio .NET
Next-generation multi-format document-processing component suite for .NET developers
Compatibility
Visual Studio 2010/2012/2013/2015

A multi-format document viewer control to display PDF, DOCX, DOC and image files in ASP.NET WebForms applications

Learn to embed XtremeDocumentStudio .NET's AJAX-enabled document viewer control in your ASP.NET Web Forms application.

XtremeDocumentStudio .NET is the next-generation multi-format document-processing framework from Gnostice for .NET developers. It provides a single unified API to process multiple formats - PDF, DOCX, DOC, BMP, JPEG, PNG, WMF, EMF, and single-page and multi-page TIFF - without requiring external software such as Microsoft Word, Open XML SDK, Word Automation Services, Adobe PDF library or GhostScript.

XtremeDocumentStudio .NET has controls for WinForms, WPF, WebForms, MVC and WPF. In this article, we will see how to use the Web Forms document viewer control in web application.

  1. Open Visual Studio and create an empty Web Forms application.
  2. In Solution Explorer, add references to the following DLLs:
    • Gnostice.Core.dll
    • Gnostice.Documents.dll
    • Gnostice.XtremeFontEngine.4.0.dll
    • Gnostice.XtremeImageEngine.dll
    • Ionic.Zlib.dll
    • Newtonsoft.Json.dll (Refer version 8.0.0.0 or Update Nuget Packge to latest)
    • Gnostice.Documents.Controls.Web.dll
  3. Select these files, right-click on them and select Properties. Set "Copy Local" to True.
  4. Open the project's Web.Config file and add the following lines above its closing "system.web" tag:
    <httpHandlers>
      <add verb="GET,POST" 
       path="DocumentViewer.axd" 
       type="Gnostice.Documents.Controls.Web.DocumentViewer, 
             Gnostice.Documents.Controls.Web"/>
    </httpHandlers>
    
  5. In the Web.Config file, add the following lines above the closing "system.webServer" tag:
    <handlers>
      <add name="XDocumentImage" 
       verb="GET,POST" 
       path="DocumentViewer.axd" 
       type="Gnostice.Documents.Controls.Web.DocumentViewer, 
             Gnostice.Documents.Controls.Web"/>
    </handlers>
    
  6. Add a new Web Form to the project.
  7. Switch to design view and add jQuery plugin to the HEAD section.
  8. Drop the following component on the form:
    • ScriptManager
  9. In Solution Explorer, add a file to the "App_Data" folder.
  10. Switch to code view and add the following lines in the page load event. Change the name of the document to the file you had added to the "App_Data" folder.
    Gnostice.Documents.Framework.ActivateLicense("your-license-key");
    DocumentViewer DocumentViewer1 = new DocumentViewer();
    DocumentViewer1.LoadDocument(
       Server.MapPath("~/App_Data") + "\\" + "sample.docx");
    
    If you are using the trial version, you can use the key from XtremeDocumentStudio downloads page. If you are using a registered version, please use the license key from the delivery note you received after purchasing the product.
  11. Build your project.
  12. In Solution Explorer, select the web form and view it in your favourite browser.

---o0O0o---

Our .NET Developer Tools
XtremeDocumentStudio .NET

Multi-format document-processing component suite for .NET developers.

PDFOne .NET

A .NET PDF component suite to create, edit, view, print, reorganize, encrypt, annotate, and bookmark PDF documents in .NET applications.

Our Delphi/C++Builder developer tools
XtremeDocumentStudio Delphi

Multi-format document-processing component suite for Delphi/C++Builder developers, covering both VCL and FireMonkey platforms.

eDocEngine VCL

A Delphi/C++Builder component suite for creating documents in over 20 formats and also export reports from popular Delphi reporting tools.

PDFtoolkit VCL

A Delphi/C++Builder component suite to edit, enhance, view, print, merge, split, encrypt, annotate, and bookmark PDF documents.

Our Java developer tools
XtremeDocumentStudio (for Java)

Multi-format document-processing component suite for Java developers.

PDFOne (for Java)

A Java PDF component suite to create, edit, view, print, reorganize, encrypt, annotate, bookmark PDF documents in Java applications.

Our Platform-Agnostic Cloud and On-Premises APIs
StarDocs

Cloud-hosted and On-Premises REST-based document-processing and document-viewing APIs

Privacy | Legal | Feedback | Newsletter | Blog | Resellers © 2002-2017 Gnostice Information Technologies Private Limited. All rights reserved.