PdfIntegrationProvider Class |
Namespace: RadPdf.Integration
The PdfIntegrationProvider type exposes the following members.
Name | Description | |
---|---|---|
PdfIntegrationProvider |
Creates a new instance of the PdfIntegrationProvider class.
|
Name | Description | |
---|---|---|
AdvancedSettings |
Gets an object that specifies the HTTP settings used with RAD PDF applications using this integration provider.
| |
Current |
Gets a reference to the current PdfIntegrationProvider being used by this code.
| |
FontResources |
Gets an object that specifies the font resources available in RAD PDF applications using this integration provider.
| |
HttpSettings |
Gets an object that specifies the HTTP settings used with RAD PDF applications using this integration provider.
| |
License |
Gets or sets an object that represents the Red Software issued license currently used by RAD PDF applications using this integration provider.
| |
LiteSessionProvider |
Gets or sets an object that specifies the session provider used for Lite Documents with RAD PDF applications using this integration provider.
| |
LiteStorageProvider |
Gets or sets an object that specifies the storage provider used for Lite Documents with RAD PDF applications using this integration provider.
| |
PdfWebControlResources |
Gets or sets a ResourceManager used by the PdfWebControl for visible resources (e.g. text strings used in the interface).
| |
StorageProvider |
Gets an object that specifies the storage provider used with RAD PDF applications using this integration provider.
| |
WcfSettings |
Gets an object that specifies the WCF settings used with RAD PDF applications using this integration provider.
|
Name | Description | |
---|---|---|
Equals | (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
OnDocumentAppending |
Called before a document is appended.
| |
OnDocumentCreated |
Called after a document is created.
| |
OnDocumentDownloading |
Called before a document is downloaded.
| |
OnDocumentEmbeddedFileDownloading |
Called before an embedded file is download from a document.
| |
OnDocumentInit |
Called before a document is loaded, as the document interface is initializing.
| |
OnDocumentPrinting |
Called before a document is printed.
| |
OnDocumentSaved |
Called after a document is saved.
| |
OnDocumentSaving |
Called before a document is saved.
| |
OnDocumentSearching |
Called before a document is searched.
| |
OnDocumentUploading |
Called before a document is uploaded into an empty PdfWebControlLite instance.
| |
OnHttpHandlerException |
Called when an exception occurs in a call to the PdfHttpHandler configured.
| |
OnInternalWarning |
Called when an internal warning occurs.
| |
OnObjectDataAdding |
Called before an object's data (e.g. the image data for an PdfImageShape object) is added.
| |
OnPageRenderOnDemand |
Called before an page is rendered on demand.
| |
ProcessAppendDataRequest |
Called when processing a request for object data initiated by the Client API which set the user mode to object insertion with a custom object key.
| |
ProcessObjectDataRequest |
Called when processing a request for object data initiated by the Client API which set the user mode to object insertion with a custom object key.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
using System; using System.Web; using RadPdf.Data.Document.Objects.Shapes; using RadPdf.Integration; public class CustomPdfIntegrationProvider : PdfIntegrationProvider { public override void OnObjectDataAdding(ObjectDataAddingEventArgs e) { base.OnObjectDataAdding(e); //if data is added to an image if (e.PdfObjectType == typeof(PdfImageShape)) { //check image size (if larger than 1 MB) if (e.Data.Length > 0x100000) { e.Cancel = true; e.CancelMessage = "Maximum image size is 1 MB."; } } else { throw new ArgumentException("PdfObjectType unsupported."); } } }
<?xml version="1.0"?> <configuration> <appSettings> <add key="RadPdfConnectionString" value="Server=.\SQLExpress;Database=RadPdf;Trusted_Connection=Yes;"/> <add key="RadPdfLicenseKey" value="DEMO"/> <add key="RadPdfIntegrationProvider" value="CustomPdfIntegrationProvider,App_Code"/> </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="PdfHttpHandler" preCondition="integratedMode" type="RadPdf.Web.HttpHandler.PdfHttpHandler"/> </handlers> </system.webServer> </configuration>