RecAPI
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties Modules Pages
OmniPageCSDK.RecPDF.RecPDF Class Reference

Main class for RecPDF. More...

Static Public Member Functions

static Manager Initialize ()
 Initialize the RecPDF.
 

Properties

static Manager Manager [get]
 The current instance of Manager object if it is already initialized.
 

Detailed Description

Main class for RecPDF.

This is a static factory class to create and store the Manager object as a singleton. The Initialize static method is responsible to create the Manager object, and it returns it as well. If the Manager object is already present, then the Initialize method throws an exception. It won't create a duplication. The Manager static property returns the Manager object too, but it won't create it. That way you can check the object without accidentally creating it. This can be useful, because creating the Manager object will call the rPdfInit function on the C API which might be slow. To uninitialize the RecPDF API the Dispose method of the Manager class should be called. This removes the object from the singleton too. To use the Manager object again, the Initialize method should be called again.

Member Function Documentation

◆ Initialize()

static Manager OmniPageCSDK.RecPDF.RecPDF.Initialize ( )
static

Initialize the RecPDF.

This must be the first method to call. To unitialize the RecPDF, the Dispose method of the Manager object should be called. Using of the 'using' instruction is advisable for intializion of RecPDF.

This example shows how to use using for initialization of RecPDF:

using (Manager manager = RecPDF.Initialize())
{
System.Console.WriteLine("PDF Password protected: {0}", manager.IsPDFPasswordProtected("test.pdf"));
}
Manager class for the RecPDF
Definition Manager.cs:42
Main class for RecPDF.
Definition RecPDF.cs:36
static Manager Initialize()
Initialize the RecPDF.
Definition RecPDF.cs:97
Exceptions
AlreadyInitializedExceptionThrown when a Manager object is already created.
RecAPIErrorThrown when the initialization failed.

References OmniPageCSDK.RecPDF.RecPDF.Manager.

Property Documentation

◆ Manager

Manager OmniPageCSDK.RecPDF.RecPDF.Manager
staticget

The current instance of Manager object if it is already initialized.

If the Manager object is not initialized, it will give you a null reference instead of an exception.

Referenced by OmniPageCSDK.RecPDF.RecPDF.Initialize().