RecAPI
Public Member Functions
Kofax::OmniPageCSDK::RecPDF::Manager Class Reference

Manager class for the RecPDFMore...

List of all members.

Public Member Functions

void  GetPDFSecurityInformation (string fileName, out Encryption encryption, out UIntPtr keySize, out Restrictions restrictions, out bool hasMasterPassword, out bool hasUserPassword)
  Get PDF encryption information without opening it.
void  GetPDFSecurityInformation (string fileName, out Encryption encryption, out UIntPtr keySize)
  Get PDF encryption information without opening it.
void  GetPDFSecurityInformation (string fileName, out Encryption encryption, out UIntPtr keySize, out Restrictions restrictions)
  Get PDF encryption information without opening it.
void  GetPDFSecurityInformation (string fileName, out Encryption encryption, out UIntPtr keySize, out bool hasMasterPassword, out bool hasUserPassword)
  Get PDF encryption information without opening it.
void  GetPDFSecurityInformation (string fileName, out Restrictions restrictions, out bool hasMasterPassword, out bool hasUserPassword)
  Get PDF encryption information without opening it.
void  GetPDFSecurityInformation (string fileName, out Restrictions restrictions)
  Get PDF encryption information without opening it.
void  GetPDFSecurityInformation (string fileName, out bool hasMasterPassword, out bool hasUserPassword)
  Get PDF encryption information without opening it.
Document  OpenDocument (string fileName, string password)
  Open a PDF file with password.
Document  OpenDocument (string fileName)
  Open a PDF file.
Operation  CreateOperation (params Document[] documents)
  Create an operation.
Operation  CreateOperation (IEnumerable< Document > documents)
  Create an operation.
void  Compact (string sourceFileName, string destinationFileName)
  Compact a file on a new file name.
OptDocument  OptOpenDocument (string fileName)
  Open a PDF file for optimization.
OptDocument  OptOpenDocument (string fileName, string password)
  Open a PDF file for optimization.
void  Dispose ()
  Quit from RecPDF.

Detailed Description

Manager class for the RecPDF

Inherited from the System.IDisposable interface. Because it uses its own thread synchronizations in .NET and in native codes, it is depended on the identity of the current physical operating system thread. That means it enters in thread affinity state at the constructor and quits the state in the destructor. In the meantime thread affinity mustn't be changed. Document and Operator objects will also be disposed when the Manager object is disposed. Because objects in the RecPDF are unavailable after uninitializing the RecPDF itself.


Member Function Documentation

void Kofax::OmniPageCSDK::RecPDF::Manager::Compact ( string  sourceFileName,
string  destinationFileName 
)

Compact a file on a new file name.

Parameters:
sourceFileName Original file name
destinationFileName Result file name

This writes out a compacted PDF file. However the old file won't change.

Exceptions:
ObjectDisposedException Thrown when the Manager object is already disposed.
ParameterIsNullException Thrown when one of the file names in the parameter list is null.
RecAPIError Thrown when it failed to create the operation or failed to add the files.
Operation Kofax::OmniPageCSDK::RecPDF::Manager::CreateOperation ( IEnumerable< Document documents )

Create an operation.

Parameters:
documents Documents taking part in the operation
Returns:
Operation object

There is no need to pass all the documents taking part in the operation. New documents can be added later by the operation object's AddDocument method.

Exceptions:
ObjectDisposedException Thrown when the Manager object is already disposed.
ParameterIsNullException Thrown when the documents parameter or an element of the enumeration is null.
RecAPIError Thrown when it failed to create the operation or failed to add the files.
Operation Kofax::OmniPageCSDK::RecPDF::Manager::CreateOperation ( params Document[]  documents )

Create an operation.

Parameters:
documents Documents taking part in the operation
Returns:
Operation object

There is no need to pass all the documents taking part in the operation. New documents can be added later by the operation object's AddDocument method.

Exceptions:
ObjectDisposedException Thrown when the Manager object is already disposed.
ParameterIsNullException Thrown when the documents parameter or an element of the array is null.
RecAPIError Thrown when it failed to create the operation or failed to add the files.
void Kofax::OmniPageCSDK::RecPDF::Manager::Dispose ( )

Quit from RecPDF.

It doesn't throw any exception.

void Kofax::OmniPageCSDK::RecPDF::Manager::GetPDFSecurityInformation ( string  fileName,
out bool  hasMasterPassword,
out bool  hasUserPassword 
)

Get PDF encryption information without opening it.

Parameters:
fileName PDF file name
hasMasterPassword Whether the PDF file has master password
hasUserPassword Whether the PDF file has user password
Exceptions:
ObjectDisposedException Thrown when the Manager object is already disposed.
ParameterIsNullException Thrown when the fileName parameter is null.
RecAPIError Thrown when it failed to get the security information.
void Kofax::OmniPageCSDK::RecPDF::Manager::GetPDFSecurityInformation ( string  fileName,
out Encryption  encryption,
out UIntPtr  keySize 
)

Get PDF encryption information without opening it.

Parameters:
fileName PDF file name
encryption Encryption method of the PDF file
keySize Key size

Security restrictions are calculated as if the PDF would be opened without password.

Exceptions:
ObjectDisposedException Thrown when the Manager object is already disposed.
ParameterIsNullException Thrown when the fileName parameter is null.
RecAPIError Thrown when it failed to get the security information.
void Kofax::OmniPageCSDK::RecPDF::Manager::GetPDFSecurityInformation ( string  fileName,
out Restrictions  restrictions,
out bool  hasMasterPassword,
out bool  hasUserPassword 
)

Get PDF encryption information without opening it.

Parameters:
fileName PDF file name
restrictions Restrictions on the PDF file
hasMasterPassword Whether the PDF file has master password
hasUserPassword Whether the PDF file has user password

Security restrictions are calculated as if the PDF would be opened without password.

Exceptions:
ObjectDisposedException Thrown when the Manager object is already disposed.
ParameterIsNullException Thrown when the fileName parameter is null.
RecAPIError Thrown when it failed to get the security information.
void Kofax::OmniPageCSDK::RecPDF::Manager::GetPDFSecurityInformation ( string  fileName,
out Encryption  encryption,
out UIntPtr  keySize,
out bool  hasMasterPassword,
out bool  hasUserPassword 
)

Get PDF encryption information without opening it.

Parameters:
fileName PDF file name
encryption Encryption method of the PDF file
keySize Key size
hasMasterPassword Whether the PDF file has master password
hasUserPassword Whether the PDF file has user password
Exceptions:
ObjectDisposedException Thrown when the Manager object is already disposed.
ParameterIsNullException Thrown when the fileName parameter is null.
RecAPIError Thrown when it failed to get the security information.
void Kofax::OmniPageCSDK::RecPDF::Manager::GetPDFSecurityInformation ( string  fileName,
out Encryption  encryption,
out UIntPtr  keySize,
out Restrictions  restrictions,
out bool  hasMasterPassword,
out bool  hasUserPassword 
)

Get PDF encryption information without opening it.

Parameters:
fileName PDF file name
encryption Encryption method of the PDF file
keySize Key size
restrictions Restrictions on the PDF file
hasMasterPassword Whether the PDF file has master password
hasUserPassword Whether the PDF file has user password

Security restrictions are calculated as if the PDF would be opened without password.

Exceptions:
ObjectDisposedException Thrown when the Manager object is already disposed.
ParameterIsNullException Thrown when the fileName parameter is null.
RecAPIError Thrown when it failed to get the security information.
void Kofax::OmniPageCSDK::RecPDF::Manager::GetPDFSecurityInformation ( string  fileName,
out Encryption  encryption,
out UIntPtr  keySize,
out Restrictions  restrictions 
)

Get PDF encryption information without opening it.

Parameters:
fileName PDF file name
encryption Encryption method of the PDF file
keySize Key size
restrictions Restrictions on the PDF file

Security restrictions are calculated as if the PDF would be opened without password.

Exceptions:
ObjectDisposedException Thrown when the Manager object is already disposed.
ParameterIsNullException Thrown when the fileName parameter is null.
RecAPIError Thrown when it failed to get the security information.
void Kofax::OmniPageCSDK::RecPDF::Manager::GetPDFSecurityInformation ( string  fileName,
out Restrictions  restrictions 
)

Get PDF encryption information without opening it.

Parameters:
fileName PDF file name
restrictions Restrictions on the PDF file

Security restrictions are calculated as if the PDF would be opened without password.

Exceptions:
ObjectDisposedException Thrown when the Manager object is already disposed.
ParameterIsNullException Thrown when the fileName parameter is null.
RecAPIError Thrown when it failed to get the security information.
Document Kofax::OmniPageCSDK::RecPDF::Manager::OpenDocument ( string  fileName )

Open a PDF file.

Parameters:
fileName PDF file name
Returns:
Document object for the PDF file

For password protected PDF files use the 2 parameter version of this function.

Exceptions:
ObjectDisposedException Thrown when the Manager object is already disposed.
ParameterIsNullException Thrown when the fileName parameter is null.
RecAPIError Thrown when it failed to open the PDF file.
Document Kofax::OmniPageCSDK::RecPDF::Manager::OpenDocument ( string  fileName,
string  password 
)

Open a PDF file with password.

Parameters:
fileName PDF file name
password Password
Returns:
Document object for the PDF file

For password protected PDF files the owner password must be passed. Otherwise for not protected PDFs the password can be null.

Exceptions:
ObjectDisposedException Thrown when the Manager object is already disposed.
ParameterIsNullException Thrown when the fileName parameter is null.
RecAPIError Thrown when it failed to open the PDF file.
OptDocument Kofax::OmniPageCSDK::RecPDF::Manager::OptOpenDocument ( string  fileName,
string  password 
)

Open a PDF file for optimization.

Parameters:
fileName Original file name
password Password
OptDocument Kofax::OmniPageCSDK::RecPDF::Manager::OptOpenDocument ( string  fileName )

Open a PDF file for optimization.

Parameters:
fileName Original file name