Guide for C#
Core Document Formats
Additional Features

C# Imaging - Add Your Own Command in C#.NET

How to Add Command to Customize .NET Image Web Viewer

Visual C#
Home > .NET Imaging SDK > C# > Add Command to HTML5 Doc Image Viewer

"This online guide content is Out Dated!
    Please get the latest XDoc.HTML5 Viewer C# Developer Guide here.

Add Web Viewer Command in C#.NET Overview
RasterEdge .NET Web Document Viewer for C# is an outstanding and high-speed viewing application, which is especially designed to view and process images and documents directly through your web browser! This web document viewer is designed to be easy to use, and it can provide amazing performance to greatly enhance productivity and streamline workflows for your C#.NET image and document viewing & processing.
Related .net document control helps: excel viewer: ASP.NET Excel Viewer in C# Control (MVC & WebForms): view Office Excel document in web browser. powerpoint viewer: ASP.NET PowerPoint Document Viewer Control (MVC & WebForms): view ppt, pptx files online in C# using ASP.NET dicom document viewer: ASP.NET Dicom Document Viewer Control: view, annotate dicom imaging files online in ASP.NET document viewer: EdgeDoc:ASP.NET Document Viewer C# Control: Open, view, annotate, redact, convert documents online in C#, VB.NET, AS... mvc document viewer: ASP.NET MVC Document Viewer: view, annotate, redact files on ASP.NET MVC web projects text file viewer: ASP.NET Text file viewer in MVC, WebForms: Open, view, annotate, convert txt files in C# ASP.NET multipage tiff viewer: ASP.NET Tiff Viewer: view, annotate multipage Tiff images in ASP.NET MVC, WebForms using C# Control
In this article, we will show you how to easily add and customize commands for your C# web document viewer after you have created one in your C#.NET Web application. Follow the sections below, and you will find step-by-step guidance for customizing your ASP.NET web doc viewer by controlling your constructor, JavaScript APIs as well as other aspects, such as controlling toolbar, file operation and annotation effect, etc.
  • Simple to control web image viewer displaying area height and width, as well as image thumbnail height and width
  • Able to adjust the displaying image size and style by selecting different modes with C#.NET web viewer constructor
  • Easy to control web doc viewer commands by customizing JavaScript APIs for various functions
  • C#.NET programmers can feel free to add or delete a single button or multiple ones as you wish
  • Plenty of options for Visual C# developer to customize loaded web document files or images, etc
  • Able to customize a large number of supporting annotation commands within the web viewer
  • Supporting most of the daily used image & file formats (PDF, Word, TIFF, PNG, JPG, GIF, BMP)
Web Viewer Customization with Constructor
To begin with, C#.NET users can freely customize commands for RasterEdge Web Document Viewer by controlling its constructor. The Web Document Viewer constructor offers a number of configuration parameters which users can modify so as to change the default behavior of web doc viewer in C#.NET application. For example, using web viewer control constructor you can change the following parameters (more to be found in the trial package):
  • DocHeight: This parameter can be used to control the height of the file viewing area on the web document image viewer.
  • DocWidth: This parameter can be used to control the width of the file viewing area of web doc viewer.
  • ThumbHeight: C# programmer can adjust it to control the height of the displaying thumbnail for loaded web image or document.
  • ThumbWidth: It can be used to control the width of the displaying thumbnail of the web doc viewer control.
Web Viewer Command Control with JavaScript APIs
Inside RasterEdge .NET Image SDK, the Web Document Viewer Control comes along with a js file to include all the supported class objects for different types of image and document processing purposes. Visual C#.NET developers can easily take control over the web doc viewer functions by binding the following JavaScript APIs to desired buttons on the doc viewer. We have demonstrated a few supported APIs in the list below.
  • UpPage: This is an API designed for scrolling to the previous page.
  • DownPage: This is an API designed for scrolling to the next page.
  • AddPage: C# developers can bind this API to a button for adding / inserting a new page.
  • DeletePage: C# developers can bind this API to another button for deleting an existing page from web document.
Web Viewer Command Control on Other Aspects
Besides customizing Web Viewer Control constructor and JavaScript APIs to customize your C#.NET Web Document Viewer, there are also some other options for you, such as adjusting toolbar, controlling file operations and annotation options.
C#.NET users can decide on the operating buttons for your toolbar. For example, you can easily add any button as you like according your C# imaging scenario.
You can also take full control over your file by setting different web documents and images loading, saving and printing functions for your C#.NET web document viewer.
C#.NET users can modify the default annotation style for you web document viewer. And all you need to do is simply adjusting corresponding annotation properties in the Default.aspx file.
If you are interested in starting to integrate and create a web document image viewer, please see this C#.NET tutorial. And here are the online image annotations samples. If you are a VB programmer and want to add command to set web viewer, please refer to VB.NET Imaging - How to Add Web Viewer Command page.

Recommend this to Google+ is professional provider of ASP.NET MVC Document Viewer, ASP.NET PDF Viewer, MVC PDF Viewer document, content and imaging solutions, available for ASP.NET AJAX, Silverlight, Windows Forms as well as WPF. We are dedicated to provide powerful & profession imaging controls, PDF document, image to pdf files and components for capturing, viewing, processing, converting, compressing and stroing images, documents and more.

©2000-2017 Raster