ASP.NET setup for RAD PDF is very easy
Web Control Installation
Copy RadPdf.dll into the bin directory of your web application. Assuming RAD PDF was installed in the default location and a system disk of C, this DLL should be in the directory:
Copy C:\Program Files\RAD PDF\WebControl
RAD PDF can also be installed into your Visual Studio toolbox by right clicking the toolbox and selecting "Choose Items..." and selecting the RadPdf.dll
Web Control web.config Requirements
In order to use the RAD PDF Web Control, additions will need to be made to your web application's web.config file.
HTTP Handler
For IIS 6 (or IIS 7 with Managed Pipeline Mode set to "Classic"), the httpHandlers element of the system.web element must contain:
CopyXML<add path="RadPdf.axd" verb="GET,POST"
type="RadPdf.Web.HttpHandler.PdfHttpHandler" />
For IIS 7 (and later) with Managed Pipeline Mode set to "Integrated", the handlers element of the system.webServer element must contain:
CopyXML<add path="RadPdf.axd" verb="GET,POST"
name="RadPdfHandler"
type="RadPdf.Web.HttpHandler.PdfHttpHandler" />
This will add RAD PDF as the http handler for all requests to the URL RadPdf.axd.
App Settings
Required App Settings
The appSettings element of the configuration element must contain the following keys:
-
RadPdfLicenseKey – This key must contain the value provided by CTdeveloping containing your server license key.
CopyXML<add key="RadPdfLicenseKey" value="YOUR LICENSE KEY" />
-
RadPdfConnectionString – This key must contain the value which is a valid connection string to SQL Server. This connection string must contain the name of the database which RAD PDF should use (default RadPdf).
CopyXML<add key="RadPdfConnectionString" value="Server=.\SQLExpress;Database=RadPdf;Trusted_Connection=Yes;" />
Optional App Settings
The appSettings element of the configuration element may contain the following keys:
-
RadPdfHttpCompression – This optional key can enable or disable HTTP Compression (GZip / Deflate) for requests handled by the PdfHttpHandler. By default (or if not specified), HTTP Compression is enabled. To disable, a value of "0" should be used.
CopyXML<add key="RadPdfHttpCompression" value="1" />
-
RadPdfSearchTermMin – This optional key can specify the minimum number of letters which a search term must contain in order to be used to search a PDF document. By default (or if not specified), no minimum is enforced (as if a value of "0" is specified).
CopyXML<add key="RadPdfSearchTermMin" value="3" />
-
RadPdfServiceLocation – This optional key can contain the location and port of the RAD PDF System Service. By default (or if not specified), the value "localhost:18104" is used.
CopyXML<add key="RadPdfServiceLocation" value="localhost:18104" />
Web Control Sample web.config
The following is a sample web.config file for use in IIS 5, 6, 7, and 7.5:
CopyXML<?xml version="1.0"?>
<configuration>
<appSettings>
<add key="RadPdfConnectionString"
value="Server=.\SQLExpress;Database=RadPdf;Trusted_Connection=Yes;" />
<add key="RadPdfLicenseKey" value="YOUR LICENSE KEY" />
</appSettings>
<system.web>
<httpHandlers>
<add path="RadPdf.axd" verb="GET,POST"
type="RadPdf.Web.HttpHandler.PdfHttpHandler" />
</httpHandlers>
</system.web>
<!--
The system.webServer element is for use with IIS 7 (and later) when Managed Pipeline Mode is set to "Integrated".
It will be ignored in other versions of IIS.
-->
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<handlers>
<add path="RadPdf.axd" verb="GET,POST"
name="RadPdfHandler"
type="RadPdf.Web.HttpHandler.PdfHttpHandler" />
</handlers>
</system.webServer>
</configuration>