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

Manager class for the RecPDF More...

Inherits IDisposable.

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 (int sid, params Document[] documents)
 Create an operation.
 
Operation CreateOperation (IEnumerable< Document > documents)
 Create an operation.
 
Operation CreateOperation (int sid, 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

◆ Compact()

void OmniPageCSDK.RecPDF.Manager.Compact ( string sourceFileName,
string destinationFileName )

Compact a file on a new file name.

Parameters
sourceFileNameOriginal file name
destinationFileNameResult file name

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

Exceptions
ObjectDisposedExceptionThrown when the Manager object is already disposed.
ParameterIsNullExceptionThrown when one of the file names in the parameter list is null.
RecAPIErrorThrown when it failed to create the operation or failed to add the files.

◆ CreateOperation() [1/4]

Operation OmniPageCSDK.RecPDF.Manager.CreateOperation ( IEnumerable< Document > documents)

Create an operation.

Parameters
documentsDocuments 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
ObjectDisposedExceptionThrown when the Manager object is already disposed.
ParameterIsNullExceptionThrown when the documents parameter or an element of the enumeration is null.
RecAPIErrorThrown when it failed to create the operation or failed to add the files.

◆ CreateOperation() [2/4]

Operation OmniPageCSDK.RecPDF.Manager.CreateOperation ( int sid,
IEnumerable< Document > documents )

Create an operation.

Parameters
sidSettings Collection ID
documentsDocuments 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
ObjectDisposedExceptionThrown when the Manager object is already disposed.
ParameterIsNullExceptionThrown when the documents parameter or an element of the enumeration is null.
RecAPIErrorThrown when it failed to create the operation or failed to add the files.

◆ CreateOperation() [3/4]

Operation OmniPageCSDK.RecPDF.Manager.CreateOperation ( int sid,
params Document[] documents )

Create an operation.

Parameters
sidSettings Collection ID
documentsDocuments 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
ObjectDisposedExceptionThrown when the Manager object is already disposed.
ParameterIsNullExceptionThrown when the documents parameter or an element of the array is null.
RecAPIErrorThrown when it failed to create the operation or failed to add the files.

◆ CreateOperation() [4/4]

Operation OmniPageCSDK.RecPDF.Manager.CreateOperation ( params Document[] documents)

Create an operation.

Parameters
documentsDocuments 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
ObjectDisposedExceptionThrown when the Manager object is already disposed.
ParameterIsNullExceptionThrown when the documents parameter or an element of the array is null.
RecAPIErrorThrown when it failed to create the operation or failed to add the files.

◆ Dispose()

void OmniPageCSDK.RecPDF.Manager.Dispose ( )

Quit from RecPDF.

It doesn't throw any exception.

References OmniPageCSDK.RecPDF.Manager.Dispose().

Referenced by OmniPageCSDK.RecPDF.Manager.Dispose().

◆ GetPDFSecurityInformation() [1/7]

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

Get PDF encryption information without opening it.

Parameters
fileNamePDF file name
hasMasterPasswordWhether the PDF file has master password
hasUserPasswordWhether the PDF file has user password
Exceptions
ObjectDisposedExceptionThrown when the Manager object is already disposed.
ParameterIsNullExceptionThrown when the fileName parameter is null.
RecAPIErrorThrown when it failed to get the security information.

◆ GetPDFSecurityInformation() [2/7]

void OmniPageCSDK.RecPDF.Manager.GetPDFSecurityInformation ( string fileName,
out Encryption encryption,
out UIntPtr keySize )

Get PDF encryption information without opening it.

Parameters
fileNamePDF file name
encryptionEncryption method of the PDF file
keySizeKey size

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

Exceptions
ObjectDisposedExceptionThrown when the Manager object is already disposed.
ParameterIsNullExceptionThrown when the fileName parameter is null.
RecAPIErrorThrown when it failed to get the security information.

◆ GetPDFSecurityInformation() [3/7]

void 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
fileNamePDF file name
encryptionEncryption method of the PDF file
keySizeKey size
hasMasterPasswordWhether the PDF file has master password
hasUserPasswordWhether the PDF file has user password
Exceptions
ObjectDisposedExceptionThrown when the Manager object is already disposed.
ParameterIsNullExceptionThrown when the fileName parameter is null.
RecAPIErrorThrown when it failed to get the security information.

◆ GetPDFSecurityInformation() [4/7]

void OmniPageCSDK.RecPDF.Manager.GetPDFSecurityInformation ( string fileName,
out Encryption encryption,
out UIntPtr keySize,
out Restrictions restrictions )

Get PDF encryption information without opening it.

Parameters
fileNamePDF file name
encryptionEncryption method of the PDF file
keySizeKey size
restrictionsRestrictions on the PDF file

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

Exceptions
ObjectDisposedExceptionThrown when the Manager object is already disposed.
ParameterIsNullExceptionThrown when the fileName parameter is null.
RecAPIErrorThrown when it failed to get the security information.

◆ GetPDFSecurityInformation() [5/7]

void 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
fileNamePDF file name
encryptionEncryption method of the PDF file
keySizeKey size
restrictionsRestrictions on the PDF file
hasMasterPasswordWhether the PDF file has master password
hasUserPasswordWhether the PDF file has user password

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

Exceptions
ObjectDisposedExceptionThrown when the Manager object is already disposed.
ParameterIsNullExceptionThrown when the fileName parameter is null.
RecAPIErrorThrown when it failed to get the security information.

◆ GetPDFSecurityInformation() [6/7]

void OmniPageCSDK.RecPDF.Manager.GetPDFSecurityInformation ( string fileName,
out Restrictions restrictions )

Get PDF encryption information without opening it.

Parameters
fileNamePDF file name
restrictionsRestrictions on the PDF file

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

Exceptions
ObjectDisposedExceptionThrown when the Manager object is already disposed.
ParameterIsNullExceptionThrown when the fileName parameter is null.
RecAPIErrorThrown when it failed to get the security information.

◆ GetPDFSecurityInformation() [7/7]

void OmniPageCSDK.RecPDF.Manager.GetPDFSecurityInformation ( string fileName,
out Restrictions restrictions,
out bool hasMasterPassword,
out bool hasUserPassword )

Get PDF encryption information without opening it.

Parameters
fileNamePDF file name
restrictionsRestrictions on the PDF file
hasMasterPasswordWhether the PDF file has master password
hasUserPasswordWhether the PDF file has user password

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

Exceptions
ObjectDisposedExceptionThrown when the Manager object is already disposed.
ParameterIsNullExceptionThrown when the fileName parameter is null.
RecAPIErrorThrown when it failed to get the security information.

◆ OpenDocument() [1/2]

Document OmniPageCSDK.RecPDF.Manager.OpenDocument ( string fileName)

Open a PDF file.

Parameters
fileNamePDF file name
Returns
Document object for the PDF file

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

Exceptions
ObjectDisposedExceptionThrown when the Manager object is already disposed.
ParameterIsNullExceptionThrown when the fileName parameter is null.
RecAPIErrorThrown when it failed to open the PDF file.

◆ OpenDocument() [2/2]

Document OmniPageCSDK.RecPDF.Manager.OpenDocument ( string fileName,
string password )

Open a PDF file with password.

Parameters
fileNamePDF file name
passwordPassword
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
ObjectDisposedExceptionThrown when the Manager object is already disposed.
ParameterIsNullExceptionThrown when the fileName parameter is null.
RecAPIErrorThrown when it failed to open the PDF file.

◆ OptOpenDocument() [1/2]

OptDocument OmniPageCSDK.RecPDF.Manager.OptOpenDocument ( string fileName)

Open a PDF file for optimization.

Parameters
fileNameOriginal file name

◆ OptOpenDocument() [2/2]

OptDocument OmniPageCSDK.RecPDF.Manager.OptOpenDocument ( string fileName,
string password )

Open a PDF file for optimization.

Parameters
fileNameOriginal file name
passwordPassword