Tech Specs
How-to C#
On Azure
Home ›› XDoc.PDF ›› C# PDF: HTML5 PDF Viewer& Editor On Azure

ASP.NET PDF Editor for Azure web service: view, edit, comment, redact Adobe PDF file using C#

How to Create C# .NET HTML5 Viewer and HTML5 PDF Editor in AzureCloudService Application

Best .NET HTML5 PDF Viewer Control for viewing PDF document on Azure project in C# programming language

A professional .NET HTML5 PDF Editor empower C# users edit adobe PDF file in multiple functionalities on AzureCloudService program

Free demo package and components are provided for quick integration in Azure to manipulate PDF document in C#.NET

Support ASP.NET MVC, IIS, ASP.NET Ajax, Azure cloud service, DNN (DotNetNuke) and SharePoint

Easy to be installed and deployed on Azure with online tutorial

HTML5 PDF document Viewer and Editor library are compatible with ASP.NET web based project

HTML5 PDF Viewer and Editor are based on .NET framework 2.0 and support any .NET Framework version from 2.0 to 4.6

Compatible with all Windows operating system in both 32-bit and 64-bit

Preparation for ASP.NET HTML5 PDF Viewer & Editor Deployment on Azure

There are two ways for using HTML5 PDF Viewer and HTML5 PDF Editor on AzureCloudService project. One is to run RasterEdge_AzureCloudService Project directly, another is to integrate HTML5 PDF Viewer and Editor to a new AzureCloudSevice application. Following steps will guide you how to create a AzureCloudSevice project and add RasterEdge HTML5 Viewer or HTML PDF Editor to it.

Please note: In order to reduce the size of SDK package, all dlls are put into RasterEdge.DocImagSDK/Bin directory. All

Integrate ASP.NET HTML5 Viewer & Editor to AzureCloudService Project

If you want to try Azure demo directly, please download from "PDF HTML5 Editor Azure Demo".

Also, you can create pdf html5 editor Azure demo as following steps:

Open Microsoft VisualStudio, select "New Project".

Click Visual C# and select "Cloud". Set corresponding .NET Framework and name project such as "MyAzureCloudSevice", and click OK.  (as shown in picture)

In pop-up box, select ASP.NET Web Role and edit its name. Here we assume it's MyWebRole.

Successfully created interface is as follows:

Modify RasterEdge HTML5Viewer Page

Right-click MyRole, select "Add Reference...", add related dlls listed below:












  RasterEdge.XDoc.PDF.HTML5Viewer.dll ( for HTML5 PDF Viewer deployment)

  RasterEdge.XDoc.PDF.HTML5Editor.dll ( for HTML5 PDF Viewer deployment)









Please set platform target in Build (as shown below). If you use x64 dlls, please choose x64 platform or AnyCpu here, otherwise the program are not able to run. Or you can select x86 if you use x86 dlls.

Open RasterEdge_AzureCloudService DemoProject, copy following content to your project:




  RasterEdge_Resource_Files Folder

  RasterEdge_Demo_Docs Folder

  RasterEdge_Cache Folder



  Namespaces in Default.aspx.cs and Global.asax.cs should be same with WebRole name.

  In Default.aspx.cs, "Inherits" value should also be corresponding to WebRole name. (shown as follows)

Web.Config Setting.

  Add following <appSettings> node to your application. (The application cannot to work without this node.)

        <add key="cacheFolder" value="RasterEdge_Cache"/>
        <add key="resourceFolder" value="RasterEdge_Resource_Files"/>

  Add node <system.web.extensions>, maxJsonLength can be changed as needed.

                <jsonSerialization maxJsonLength="50000000">

  Add <system.webServer> node.

You’d better to: 1. Set allowDoubleEscaping as “ture”, otherwise some requests cannot response successfully. 2. Add fill extension such as .woff, it’s mainly to insure .woff font can response and display correctly.

        <validation validateIntegratedModeConfiguration="false"/>
            <requestFiltering allowDoubleEscaping="true">
                <requestLimits maxAllowedContentLength="41943040"/>
            <remove fileExtension=".js"/>
            <remove fileExtension=".svg"/>
            <remove fileExtension=".woff"/>
            <mimeMap fileExtension=".woff" mimeType="application/x-font-woff"/>
            <mimeMap fileExtension=".svg" mimeType="image/svg+xml"/>
            <mimeMap fileExtension=".ttc" mimeType="application/x-font-ttc"/>
            <mimeMap fileExtension=".js" mimeType="application/x-javascript"/>
        <urlCompression doStaticCompression="true" doDynamicCompression="true"/>

Press F5, interface run as follows.