ASP.NET PDF Viewer & Writer Control
How to deploy on IIS to enable read, view, write PDF file in asp.net mvc, c#, vb.net, azure
How to read, view, write PDF file in asp.net c#, vb.net using asp.net pdf viewer web control.
In this tutorial, you learn how to build an ASP.NET PDF viewer web application in IIS without any programming. With the tutorial, you
will easily build an web verison of Acrobat Pro.
- View PDF document and other file formats (Word, Excel, PowerPoint, Tiff, Dicom, images) online
- Navigate PDF document content by thumbnail, bookmark, text searching, page jump
- Annotate, comment, drawing on PDF pages
- PDF text editing: add, update, remove
- PDF image editing: add, rotate, move, remove
- Redact PDF text, image content, or pages
- Merge and split PDF document, pages online
- Save, print PDF document to Word, Tiff, html, image files in web browser
How to build a web pdf viewer and editor in IIS without programming
- Best .NET HTML5 PDF Viewer Control for PDF document viewing on IIS in C#.NET project
- Support ASP.NET MVC, IIS, ASP.NET Ajax, Azure cloud service, DNN (DotNetNuke) and SharePoint
- An advanced .NET HTML5 PDF Editor provides C# users multiple functionalities to edit adobe PDF page and file in IIS program
- Free demo package and components are provided for quick integration in IIS site to manipulate PDF document in C#.NET
- Easy to be installed and deployed on IIS site using online tutorial
- 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 ans support any .NET Framework version from 2.0 to 4.6
- Compatible with all Windows operating system in both 32-bit and 64-bit
ASP.NET HTML5 PDF Viewer & Editor Deployment on IIS
To use C#.NET RasterEdge XDoc.HTML5 PDF Viewer or XDoc.HTML5 PDF Editor on IIS, C# users should make some preparations for file viewing and manipulating on HTML5 PDF viewer and editor.
This page will navigate users how to deploy HTML5 PDF Document Viewer and HTML5 PDF Document Editor on IIS.
In order to reduce the size of SDK package, dlls are not put into XDoc.PDF.HTML5 Viewer Demo/Bin, all dlls can be found under RasterEdge.DocImagSDK/Bin directory.
Running EdgePDF Demo Project in IIS
After you download the latest version of RasterEdge.DocImageSDK, then how to implement the same effect with the online demo? Here, you can do it according to the following steps.
- In download package, go to EdgePDF ASP.NET PDF Editor demo project folder "/DemoProjects/EdgePDF Demo Project/"
Copy all contents in the above folder to the location, where you need run the demo project in IIS. For example: C:\\Sites\EdgePDF\.
- Copy corresponding DLL (x86 or x64) in the download package to the "Bin" folder of the demo project.
- After adding relative 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.
- After above steps, you can deploy your demo web application to IIS server.
- Open Internet Information Services Manager;
- Right-click "Sites" and select "Add Web Site";
- According to your situation, set the "Site name", and set the "Physical path" to the place where you store EdgePDF demo project. Last, set the "Port" that monitors the application.
- Click ok to complete deploy your project;
- Grant user "IIS_IUSRS" full control permission to folder "{Demo project}/RasterEdge_Cache", where EdgePDF will generate cache files.
- Run the web application
FAQ
1. Could not load file or assembly 'RasterEdge.Imaging.Annotation'
If your used RasterEdge DLLs version does not match your .net platform, you will view this Exception "Could not load file or assembly 'RasterEdge.Imaging.Annotation' or one of its dependencies. "
To fix it, you need choose right RasterEdge DLLs. We have provided DLLs for .NET 4.0 (x64, x86), .NET 3.5 (x64, x86). And our SDK does not support anyCPU platform.
2. Could not load file or assembly 'RasterEdge.Imaging.Font.DLL'
Three RasterEdge DLLs are using C++ to develop, and the rest of them are using C#.
The three DLLs are:
- RasterEdge.Imaging.Font.dll
- RasterEdge.XImage.OCR.Tesseract.dll
- RasterEdge.XImage.Raster.Core.dll
If your system has not installed C++ library, it will throw the following Exception "Could not load file or assembly 'RasterEdge.Imaging.Font.DLL' or one of its dependencies".
If you are using RasterEdge .net 2.0 dll, you must install Visual C++ 2005 Redistributable Package.
If you are using RasterEdge .net 4.0 dll, you must install Visual C++ 2010 Redistributable Package.
Please download the Microsoft VC++ redistribution package:
Microsoft Visual C++ 2010 Redistributable Package (x86)
https://www.microsoft.com/en-us/download/details.aspx?id=5555
Microsoft Visual C++ 2010 Redistributable Package (x64)
https://www.microsoft.com/en-us/download/details.aspx?id=14632
3. JavaScript: "fail to connect the server"
There are two reasons which may cause this error in Javascript.
1. Path Setting Incorrect
2. Server Side Error
Path Setting Incorrect
In file "index.html", it defines server side file UserCommandProcessHandler.ashx location.
We will use these two values to get the server side file UserCommandProcessHandler.ashx location. "http://your-host:port/{_rootpath}{_serverUrl}"
To verify that you have setup remote file "UserCommandProcessHandler.ashx location" correctly, please open your web browser, and navigate to "http://your-host:port/{_rootpath}{_serverUrl}".
For example:
"http:// localhost:9091//RasterEdge_Resource_Files/UserCommandProcessHandler.ashx"
If you have setup the values correct, you can see the following content in the web browser.
If you get a "404 error", your path setting is wrong.
If you get other server side error massage, please follow the next section.
Server Side Error
You get other error content in the web browser. There are some errors when IIS loading RasterEdge DLLs.
Please send the following information to support@rasteredge.com:
1. Details error information
2. SDK log data, located at “/RasterEdge_Cache/_log_files/”