Tech Specs
How-to C#
How-to VB.NET
Guide for C#
Core Document Formats
Mobile Viewer
Additional Features

C# PDF - Create C# PDF Mobile Viewer

C# PDF Document Viewer Control SDK for Mobile Application

Visual C#
Home > .NET Imaging SDK > C# > Create C# PDF Mobile Viewer

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

C#.NET mobile PDF document viewer and reader control library from RasterEdge DocImage SDK for .NET is a 100% managed .NET component that offers developers the ability to view, visualize and manipulate PDF document files in mobile applications.
This C#.NET mobile PDF viewer control SDK, without any plugins or footprint, successfully integrates latest HTML 5 technology with advanced PDF document viewing & processing techniques. Thus, using this C# mobile PDF document viewer, developers can easily convert their mobile devices into modern PDF document readers & viewers.
RasterEdge C# mobile PDF document viewer library toolkit owns high compatibility with most mobile browser like iOS and Android, works perfectly with most smart phones, PDF and handheld devices. Apart from common PDF document displaying capacity, this C# mobile PDF document viewer control also allows developers to annotate, process and print target PDF document files.
This tutorial page for C#.NET mobile PDF document viewer control SDK covers following three aspects.
  • C# .NET mobile PDF document viewer control toolkit features
  • How to create PDF mobile document viewer using C#.NET code
  • C#.NET mobile PDF document viewer control FAQs
C# Mobile PDF Viewer Features
  • Mature .NET solution to create mobile PDF document viewer using C#.NET
  • Developed from ASP.NET PDF imaging SDK and compatible with most mobile browsers
  • Convert mobile device to a modern PDF document viewer using C# code
  • Easily utilize C# mobile PDF document viewer on Android, IOS & Windows platforms
  • Advanced mobile PDF document viewer with instant thumbnail preview supported
  • Professional C#.NET mobile PDF viewer with annotating & highlighting functions
  • Process PDF document pages with mature C# page-manipulating APIs
  • View and read PDF document with mobile-compatible features, like touch interfaces
How to Create C# PDF Mobile Viewer
In this section, we will offer detailed guidance on how to create a mobile PDF document viewer using C#.NET. Before you follow the tutorial below, please make sure that you have downloaded RasterEdge DocImage SDK for .NET package, activated C#.NET mobile PDF document viewer control evaluation license key and installed .NET Framework 2.0 or above versions.
  1. Start a Website project in Visual Studio 2005 and name it as "WebFormPDFMobileViewerDemo";
  2. Add all following dlls to your project reference by right-click "Add Reference...";
    • RasterEdge.Imaging.Annotation.dll
    • RasterEdge.Imaging.Basic.dll
    • RasterEdge.Imaging.Drawing.dll
    • RasterEdge.Imaging.Processing.dll
    • RasterEdge.Imaging.WebViewer.dll
    • RasterEdge.Imaging.TWAIN.dll
  3. Copy package folder "RasterEdge_Imaging_Files" to your created Website Application;
  4. Add reference "RasterEdge.css" and "RasterEdge.js" to Visual Studio "Default.aspx" head tag:
    <link href="RasterEdge_Imaging_Files/RasterEdge.css" rel="stylesheet" type="text/css"/>
    <script src="RasterEdge_Imaging_Files/RasterEdge.js" type="text/javascript"></script>
  5. Copy package folder "Demo_Docs" to your created website folder;
  6. Add a new Web.Config: right click "Add New Item...", click "Web Configuration File" and name it as "Web.config";
  7. Copy package file "Web.config" content to this created Web.config;
  8. Replace the content of created website Default.aspx with corresponding content of the downloaded package Default.aspx;
  9. Add "REWebViewer" to Visual Studio "Toolbox" under "General" tab: right-click in "General"tab, select "Choose Items...", select "Browse" in the popup window, locate and select "RasterEdge.Imaging.WebViewer.dll";
  10. Drag "REWebViewer" into Defaul.aspx:
    <div id="_tblImgs" style="width:100%" > <cc1:REWebViewer ID="REWebViewer1" runat="server" />
  11. In Default.aspx.cs, please set "fileUrl" and add "ImageUrl", "DocWidth", "DocHeight", "ThumbWidth", "ThumbHeight" to the above REWebViewer1. See as below:
    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.REWebViewer1.ImageUrl = FileUrl;
    this.REWebViewer1.DocWidth = DocWidth;
    this.REWebViewer1.DocHeight = DocHieght;
    this.REWebViewer1.ThumbWidth = ThumbWidth;
    this.REWebViewer1.ThumbHeight = ThumbHieght;
    this.REWebViewer1.Rnd = SessionId;
  12. In Default.aspx, add a reference to the path in javascript like 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});
C# Mobile PDF Viewer Control FAQs
Q: I am looking for a C#.NET mobile PDF document viewer control which can not only allow me to read PDF document file in mobile application but also permit me to redact and edit target PDF document file. Does your C# mobile PDF viewer SDK own that functionality?
A: Yes, the C# .NET mobile PDF document viewer SDK from RasterEdge DocImage SDK for .NET owns both PDF document reading and editing features.
If you are interested in other C# PDF document viewer control, such as, ASP.NET web PDF document viewer SDK and C# PDF document viewer control for Windows Forms application, please follow above links respectively.
More Tutorials on .NET PDF Document SDK

Recommend this to Google+

RasterEdge.com 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 Edge.com