RecAPI
Static Public Member Functions | Properties
Kofax::OmniPageCSDK::RecPDF::RecPDF Class Reference

Main class for RecPDF. More...

List of all members.

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

static Manager Kofax::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"));
            }
Exceptions:
AlreadyInitializedExceptionThrown when a Manager object is already created.
RecAPIErrorThrown when the initialization failed.

Property Documentation

Manager Kofax::OmniPageCSDK::RecPDF::RecPDF::Manager [static, get]

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.