EdgePDF
Features
Tech Specs
How-to C#
Pricing

Best ASP.NET PDF Viewer, Reader User Control
How to generate, embed, open, display, view, save PDF file in asp.net mvc, aspx using C# component web api.


Complete how to example source code in C# to read, load, embed, view, annotate, convert, export pdf file in ASP.NET MVC, aspx on Visual Studio .NET using C# component control







  • Best HTML5 PDF Viewer Control for viewing PDF document on Visual Studio .NET in C# programming language
  • A multifunctional HTML5 PDF Editor enable C# users to generate, edit adobe PDF page and file in Visual Studio .NET program
  • Free demo package and components are provided for quick integration in Visual Studio .NET to manipulate PDF document in C#
  • Support ASP.NET MVC, IIS, ASP.NET Ajax, Azure cloud service, DNN (DotNetNuke) and SharePoint
  • Easy to be installed and deployed on Visual Studio. NET with online tutorial
  • Quick to embed pdf viewer control in web browser without Acrobat installed
  • Easy to customize, extend pdf viewer, such as generating pdf files with save disabled
  • ASP.NET PDF document Reader and Editor library are compatible with ASP.NET web based project
  • HTML5 PDF Viewer and Editor are based on .NET framework 3.0 and support any .NET Framework version from 3.0 to 4.6
  • Compatible with all Windows operating system in both 32-bit and 64-bit



Integrate with New ASP.NET Empty Web Site using ASP.NET PDF Viewer User Control in C#



  1. Create an ASP.NET Empty Web Site, "EdgePDFWebSite"


  2. Add RasterEdge dll reference (add all dll names starting with RasterEdge.)
    Please go to download package "/Bin", choose right .net version. Add all dlls with starting name "RasterEdge." to your project reference.

    Note: Visual Studio embed web server is for x86 only. Please use x86 dlls from Bin folder.


  3. Copy contents from Demo Project to your web site project.




  4. Modify the Web.config
    <configuration>
      <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-->
      </appSettings>   
    
    <system.web>
          <compilation debug="true" targetFramework="4.0" />
          <httpRuntime requestValidationMode="2.0" executionTimeout="1200" maxRequestLength="40960" useFullyQualifiedRedirectUrl="false"/>
        </system.web>
      <system.webServer>
        <validation validateIntegratedModeConfiguration="false"/>
        <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"/>
      </system.webServer>
    </configuration>
    


  5. Change project target platform to "x86"


  6. It's done. Now run the website.



Integrate with Existing ASP.NET Web Site using the best ASP.NET PDF reader, viewer component



To add EdgePDF as a new ASP.NET web application to your existing website, please follow the steps below.

Here is the example user scenario. You have one web site, running under http://localhost:40002. Now you need add EdgePDF as an application to the path http://localhost:40002/Redaction/.



  1. In download package, go to EdgePDF ASP.NET PDF Editor demo project folder "/DemoProjects/EdgePDF Demo Project/".

    Copy all contents to your web site content path {your website content root path}/Redaction/


  2. Copy corresponding DLL (x86 or x64) in the download package to the "Bin" folder of the demo project.


  3. Change EdgePDF js, css files path.

    In file "index.html", update JS, CSS file path
    <script src="/Redaction/RasterEdge_Resource_Files/javascript/jquery.js" type="text/javascript"></script>
        <script src="/Redaction/RasterEdge_Resource_Files/javascript/RasterEdge_WebApp_Customize.js" type="text/javascript"></script>
        <script src="/Redaction/RasterEdge_Resource_Files/javascript/RasterEdge_WebApp.js" type="text/javascript"></script>
        <script src="/Redaction/RasterEdge_Resource_Files/javascript/RasterEdge.js" type="text/javascript"></script>
        <link rel="stylesheet" href="/Redaction/RasterEdge_Resource_Files/css/process.css" type="text/css"/>
        <link rel="stylesheet" href="/Redaction/RasterEdge_Resource_Files/css/customize.css" type="text/css"/>
        <link rel="stylesheet" href="/Redaction/RasterEdge_Resource_Files/css/jquery-ui.css" type="text/css"/>
    


    Change Javascript var _rootpath value in file index.html
    <script type="text/javascript">
            var _rootpath = "/Redaction";
    
            _WDPApp = new WDPOnlineApplication({
                _serverUrl: "/RasterEdge_Resource_Files/UserCommandProcessHandler.ashx"
            });
        </script>
    


  4. After adding dlls, configure the Web.config :
    • If your IIS server .NET framework is 4.0 or higher, please use the Web.config.
    • If your IIS server .NET framework is 3.5 or earlier version, please copy the content in the Web(for .net3.5 or earlier version).config to Web.config.


  5. After above steps, you can deploy your demo web application to IIS server.
    1. Open Internet Information Services Manager
    2. Go to the existing website
    3. Right click the folder "Redaction". Choose menu "Convert to Application"
    4. Click button "OK"
    5. Click "Application Pools", click "Set Application Pool Defaults…" in the right panel, and set the value "Enable 32-Bit Applications" in accordance with the selected DLL (x86 set true, x64 set false) in the pop-up window.
    6. Grant user "IIS_IUSRS" full control permission to folder "{Demo project}/RasterEdge_Cache", where EdgePDF will generate cache files.


  6. Run the web application


Enable view, embed, generate PDF file functions in ASP.NET MVC using PDF Viewer User Control in C#



Please use the detailed instruction to integrate EdgePDF ASP.NET MVC PDF Viewer User Control in ASP.NET MVC.