How to Create Web TIFF Viewer in C#.NET

It Is Easy to Create Web TIFF Viewer in C#.NET by Referring to This User Manual
Our ASP.NET Tiff Viewer Control allows users to view and customize Tiff images in web applications based on their requirements. Here is a tutorial that will show you how to display Tiff image in web pages. To install this C#.NET Web Tiff Viewer Control into your computer, a compatible operating system should be installed, like Windows 2000, Windows XP, Windows 7 and so on.
Using the free evaluation of this Web Tiff Viewer Library, you can enlarge or reduce your Tiff image size and zoom to fit image area on web pages. You can also conduct other Tiff image functionalities. Both compressed and uncompressed Tiff documents are supported. A Tiff document that has more than one page is also supported.
How to Create Web TIFF Viewer in C# Class
In this section, it has explained how to create Web Tiff Viewer with C# programming in detail. Read it carefully and you will find it easy to finish Web Tiff Viewer creation with our professional Tiff Image Control. Please use our C#.NET Web Tiff Viewer product and refer to the following steps to create Web Tiff Viewer with C# sample code.
  • Open your Visual Studio and newly create a Web project with C# language.
  • Add these references (YiiGo.Imaging.Annotation.dll, YiiGo.Imaging.Basic.dll, YiiGo.Imaging.Drawing.dll, YiiGo.Imaging.TIFF.dll, YiiGo.Imaging.Processing.dll, YiiGo.Imaging.WebViewer.dll and YiiGo.Imaging.TWAIN.dll) from the downloaded and unzipped trial package of C#.NET Tiff Image SDK.
  • Copy our package folder "YiiGo_Imaging_Files" to your newly created project folder.
  • Add reference "YiiGo.css" and "YiiGo.js" to the head tag of your VS "Default.aspx".
  • Find "Demo_Docs" package folder in the unzipped trial package and copy it to your project folder.
  • Change the created Web.config with content in the "Web.config" in the unzipped trial package.
  • Add "YGWebViewer" to your Visual Studio "Toolbox".
  • Drag "YGWebViewer" to the Defaul.aspx.
  • Set related items in the Default.aspx.cs like this:
public string FileUrl;
public string SessionId;
public float ThumbHieght = 100;
public float ThumbWidth = 80;
public float DocHieght = 640;
public float DocWidth = 819;
protected void Page_Load(object sender, EventArgs e)
this.FileUrl = Server.MapPath("./Demo_Docs/").Replace("\\", "/") +
this.SessionId = Session.SessionID;
this.YGWebViewer1.ImageUrl = FileUrl;
this.YGWebViewer1.DocWidth = DocWidth;
this.YGWebViewer1.DocHeight = DocHieght;
this.YGWebViewer1.ThumbWidth = ThumbWidth;
this.YGWebViewer1.ThumbHeight = ThumbHieght;
this.YGWebViewer1.Rnd = SessionId;
  • In the Default.aspx, add a reference to the path in JavaScript as below:
     <script type="text/javascript">
_fileUrl = "<%=FileUrl%>";
_docWidth = "<%=DocWidth%>";
_docHeight = "<%=DocHieght%>";
_thumbWidth = "<%=ThumbWidth%>";
_thumbHeight = "<%=ThumbHieght%>";
_rnd = "<%=SessionId%>";
TextAnnoStyle = new AnnoStyle({FillColor: "White", ShowedText: "double click to
, TextColor: "Black", TextFont: "Arial", TextSize: 12, TextStyle :"Italic"});
FreehandAnnoStyle = new AnnoStyle({OutLineColor: "Red", OutLineWidth: 3.0});
HighlightAnnoStyle = new AnnoStyle({FillColor: "Yellow"});
RectangleAnnoStyle = new AnnoStyle({OutLineColor: "Black", OutLineWidth: 3.0});
FilledRectangleAnnoStyle = new AnnoStyle({OutLineColor: "Black", OutLineWidth:
3.0, FillColor: "Black"});
EllipseAnnoStyle = new AnnoStyle({FillColor: "Pink"});
RubberStampAnnoStyle = new AnnoStyle({OutLineColor: "Bule", OutLineWidth: 3.0,
FillColor: "Red", ShowedText: "Stamp annotation can show text here", TextColor: "DarkBule",
TextFont: "Arial", TextSize: 12, TextStyle: "Italic"});
PolygonLinesAnnoStyle = new AnnoStyle({OutLineColor: "Red", OutLineWidth: 3.0});
PolygonAnnoStyle = new AnnoStyle({OutLineColor: "OrangeRed", OutLineWidth: 3.0,
FillColor: "OrangeRed"});
LineAnnoStyle = new AnnoStyle({OutLineColor: "Red", OutLineWidth: 3.0});
Why Choose Our C# Web TIFF Viewer
Our C#.NET Web Tiff Viewer API is an advanced and reliable component completely built in Visual C#.NET. It can be used to quickly create online Tiff image viewer for web-based projects. This C#.NET Web Tiff Viewer Control has many advantages compared with other Web Tiff Viewers. The following list has showed its main advantages.
  • It is compatible with many commonly used web browsers (Microsoft IE, Firefox and Chrome) to view any Tiff image on the internet.
  • It is automatically activated when a Tiff image is loaded on your web browser.
  • It is the ideal plug-in for viewing, customizing and printing Tiff image on websites.
  • It enables developers to rotate Tiff image in 90, 180 and 270 degrees.
  • Users can save their Tiff images to the clipboard or a local disk.
  • It is totally written in C# code and compatible with .NET Framework 2.0 and later versions.
  • It is able to redact Tiff file through annotation burning solution.
  • It is a standalone component and does not require any external tool or plug-in.
  • Free evaluation version of C#.NET Web Tiff Viewer API can be downloaded online.
  • Royalty-free and permanent Web Tiff Viewer License is provided to C#.NET developers.
Our website also offers Windows Tiff Viewer for C#.NET applications. It is easier to create Tiff Windows Viewer in C#.NET compared with creating Web Tiff Viewer online. A detailed tutorial is also offered online, with which developers can easily and quickly creating C#.NET Windows Tiff Viewer according to their needs. In addition to Web and Windows Tiff Viewers, other viewers are also available, such as C#.NET Web PDF Viewer SDK, Windows PDF Viewer Control for C#.NET, Web Word Viewer, etc.
Other Plugins
Image Viewer CoreBarcode PluginPDF Read & WriteTesseract OCR PluginForm Processing PluginJBIG2 CodecJPEG2000 CodecISIS ScannerTwain ScannerDICOM ReaderCAD Scanner