EdgePDF
Features
Tech Specs
How-to C#
Pricing

ASP.NET MVC web PDF editor control: view, edit, redact Adobe PDF documents online using C#


How to Integrate C# .NET HTML5 PDF Viewer or HTML5 PDF Editor to ASP.NET MVC







  • Best HTML5 PDF Viewer Control for viewing PDF document on ASP.NET MVC project
  • A powerful HTML5 PDF Editor allows C# users to edit adobe PDF page and file with various functionalities in ASP.NET MVC program
  • Free demo package and components are provided for quick integration in ASP.NET MVC to manipulate PDF document
  • Support ASP.NET MVC, IIS, ASP.NET Ajax, Azure cloud service, DNN (DotNetNuke) and SharePoint
  • Easy to be installed and deployed on ASP.NET MVC 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 ASP.NET MVC



There are two ways for using EdgePDF ASP.NET PDF Viewer and ASP.NET PDF Editor on ASP.NET MVC projects. One is to run RasterEdge_MVC3 Project directly, another is to integrate EdgePDF demo project with a new ASP.NET MVC application. Following steps will guide you how to create a new ASP.NET MVC5 web project and add RasterEdge EdgePDF to it.



Integrate EdgePDF to ASP.NET MVC5 Application



You can create EdgePDF pdf asp.net editor MVC demo as following steps:

  • Open Microsoft VisualStudio, create a new ASP.NET MVC 5 Project "EdgePDFMVC5Demo"



  • Add RasterEdge dll reference (add all dll names starting with RasterEdge)


    Please go to download package "/Bin", choose .net 4.0, x86 dlls. Add all dlls with starting name "RasterEdge." to your project reference.

    Note: Visual Studio embed web server (IIS Express) is for x86 only. Please choose x86 dlls from Bin folder.

  • In this demo, we will use the default controller "HomeController", and default view "Index.cshtml"



  • Copy the contents in file "/Developer Guide/EdgePDF/MVC5 project files/Index.cshtml" to your new created Index.cshtml file.



  • Add the folder "/DemoProjects/EdgePDF Demo Project/RasterEdge_Resource_Files" (all contents) to project.



  • Set the project Web.config

    Add the following contents to tag <appSettings>:
        <!-- the cache folder -->
        <add key="reCacheFolder" value="RasterEdge_Cache"/>
    	<add key="reCustomStampFolder" value="RasterEdge_Resource_Files/images/stamp"/>
        <!-- set the server folder if you want to open the file on server-->
        <add key="reDefaultFolder" value="RasterEdge_Demo_Docs"/>
        <!-- set the default file when open the web first time,if set "" ,this function is disabled. (reDefaultFolder needed) -->
        <add key="reDefaultFilePath" value=""/>
        <!-- image quality in PDF document -->
        <add key="rePageImageZoom" value="2"/>
        <add key="reImageZoom" value="2"/>
        <!-- image annotation in PDF document -->
        <add key="reAnnotationImageZoom" value="2"/>
        <!-- write log -->
        <add key="reOutputLogData" value="true"/>
        <!-- if true, SDK will automatically convert many shape and path inside PDF page into image-->
        <!-- default is false -->
        <!--  DEBUG ,INFO ,WARNING,ERROR -->
        <add key="reLogLevel" value="DEBUG"/>
        <add key="reWDPFileCacheMaxLimit" value="0"/>
       <add key="reIntelliDrawShapesToImage" value="true"/>
        <!-- if reIntelliDrawShapesToImage is true, -->
        <!-- valid values are: 	"all", "firefox", "chrome", "ie", "edge", "salari", "others"	if "all" included, ignore the rest;	default is "all"    -->
        <add key="reIntelliDrawShapesToImageSupportBrowsers" value="all"/>
        <!-- set the type of the show page.
    	Valid values: svg, png,html
            Default: svg
    -->
        <add key="reDocRenderEngine" value="svg"/>
        <add key="reRestfulFolder" value="c:/RasterEdge_Restful"/>
        <add key="reI18NFolder" value="/RasterEdge_Resource_Files/i18n/"/>
    <add key="reServerURL" value=""/><!-- set the domain for remote client-->
    
        <!-- If true, SDK will automatically call ... after file has been uploaded. Deafult: false. -->
        <add key="autoProcessWholeDocument" value="false"/>
        <!-- If true, SDK will automatically call ... after file has been uploaded. Default: false. -->
        <add key="autoIndexTextSearchWholeDocument" value="false"/>
    


    Add the following contents to tag <system.webServer>
        <security>
          <requestFiltering allowDoubleEscaping="true">
            <requestLimits maxAllowedContentLength="41943040"/>
          </requestFiltering>
        </security>
        <staticContent>
    	<remove fileExtension=".js"/>
           <remove fileExtension=".svg"/>
          <remove fileExtension=".woff"/>
          <remove fileExtension=".ttc"/>
          <remove fileExtension=".xfdf"/>
          <remove fileExtension=".fdf"/>
          <mimeMap fileExtension=".xfdf" mimeType="application/octet-stream"/>
          <mimeMap fileExtension=".fdf" mimeType="application/octet-stream"/>
          <mimeMap fileExtension=".woff" mimeType="application/octet-stream"/>
          <mimeMap fileExtension=".svg" mimeType="image/svg+xml"/>
          <mimeMap fileExtension=".ttc" mimeType="application/x-font-ttc"/>
          <mimeMap fileExtension=".js" mimeType="application/x-javascript"/>
        </staticContent>
    <urlCompression doStaticCompression="true" doDynamicCompression="true"/>
    


    Add the following contents to tag <system.web>
    <httpRuntime requestValidationMode="2.0" executionTimeout="1200" maxRequestLength="40960" useFullyQualifiedRedirectUrl="false"/>
    


    Note: If web.config has already defined tag "<httpRuntime>", you need merge the above content with existed tag contents.

  • Set the cache folder auto-clear rules. Copy or add the "/Developer Guide/EdgePDF/MVC5 project files/Global.asax.cs" file to your MVC project.



  • Change MVC project target platform to "x86"



  • It is done. Now run the project. Web browser navigate to "http://localhost:7729/". The port number will be different.