RecAPI
Kofax::OmniPageCSDK::RecPDF::Operation Class Reference

A PDF operation. More...

List of all members.

Public Member Functions

void MovePage (Document document, int destPosition, params int[] srcPositions)
 Move pages from one place to another place.
void MovePage (Document document, int destPosition, IEnumerable< int > srcPositions)
 Move pages from one place to another place.
void AddDocument (Document document)
 Add a PDF file to the operation.
void CopyPage (Document destination, int destPosition, Document source, params int[] srcPositions)
 Copy pages from one place to another place.
void CopyPage (Document destination, int destPosition, Document source, IEnumerable< int > srcPositions)
 Copy pages from one place to another place.
void AppendPage (Document destination, Document source, params int[] srcPositions)
 Copy pages from one place to the end of a PDF document.
void AppendPage (Document destination, Document source, IEnumerable< int > srcPositions)
 Copy pages from one place to the end of a PDF document.
void DeletePage (Document destination, params int[] destPositions)
 Delete pages from a document.
void DeletePage (Document destination, IEnumerable< int > destPositions)
 Delete pages from a document.
void RotatePage (Rotation rotation, Document destination, int destPosition)
 Rotate page in a document.
void InsertImage (Document destination, int destPosition, bool imageOnly, params IntPtr[] srcPages)
 Insert pages given by HPAGE.
void InsertImage (Document destination, int destPosition, bool imageOnly, IEnumerable< IntPtr > srcPages)
 Insert pages given by HPAGE.
void AppendImage (Document destination, bool imageOnly, params IntPtr[] srcPages)
 Insert pages given by HPAGE to the end of a PDF document.
void AppendImage (Document destination, bool imageOnly, IEnumerable< IntPtr > srcPages)
 Insert pages given by HPAGE to the end of a PDF document.
void MergeText (Document destination, int destPosition, params IntPtr[] srcPages)
 Insert a text content of the given HPAGE handles to the specified PDF pages.
void MergeText (Document destination, int destPosition, IEnumerable< IntPtr > srcPages)
 Insert a text content of the given HPAGE handles to the specified PDF pages.
void Execute ()
 Execute operation.
void Dispose ()
 Cancel the PDF operation.

Properties

IList< DocumentDocuments [get]
 List of documents taking part in this operation.
OperationHandle SafeHandle [get]
 RPDF_OPERATION C handle.

Detailed Description

A PDF operation.

Inherited from the System.IDisposable interface. With this object a series of PDF file manipulation can be achieved in an optimized way. The operations will be cumulated since the calling of Execute method, which disposes the object as well. All information got from the documents taking part in the operation shows the status of the document as if the file manipulation would taken place already, but really they will executed in the Execute method. To cancel the operation dispose it.


Member Function Documentation

void Kofax::OmniPageCSDK::RecPDF::Operation::AddDocument ( Document  document)

Add a PDF file to the operation.

Parameters:
documentPDF document
Exceptions:
ObjectDisposedExceptionThrown when the Operation object is already disposed.
ParameterIsNullExceptionThrown when the parameter is null.
RecAPIErrorThrown when it failed to attach document to operation.
void Kofax::OmniPageCSDK::RecPDF::Operation::AppendImage ( Document  destination,
bool  imageOnly,
params IntPtr[]  srcPages 
)

Insert pages given by HPAGE to the end of a PDF document.

Parameters:
destinationDestination document
imageOnlyWithout text
srcPagesPages given by HPAGE
Exceptions:
ObjectDisposedExceptionThrown when the Operation object is already disposed.
ParameterIsNullExceptionThrown when the destination document or the source pages parameter is null.
RecAPIErrorThrown when it failed to insert HPAGEs.
void Kofax::OmniPageCSDK::RecPDF::Operation::AppendImage ( Document  destination,
bool  imageOnly,
IEnumerable< IntPtr >  srcPages 
)

Insert pages given by HPAGE to the end of a PDF document.

Parameters:
destinationDestination document
imageOnlyWithout text
srcPagesPages given HPAGE
Exceptions:
ObjectDisposedExceptionThrown when the Operation object is already disposed.
ParameterIsNullExceptionThrown when the destination document or the source pages parameter is null.
RecAPIErrorThrown when it failed to insert HPAGEs.
void Kofax::OmniPageCSDK::RecPDF::Operation::AppendPage ( Document  destination,
Document  source,
params int[]  srcPositions 
)

Copy pages from one place to the end of a PDF document.

Parameters:
destinationDestination document
sourceSource document
srcPositionsSource page indices

The source and destination documents may be the same file.

Exceptions:
ObjectDisposedExceptionThrown when the Operation object is already disposed.
ParameterIsNullExceptionThrown when the destination document or the source positions parameter is null.
RecAPIErrorThrown when it failed to copy the pages.
void Kofax::OmniPageCSDK::RecPDF::Operation::AppendPage ( Document  destination,
Document  source,
IEnumerable< int >  srcPositions 
)

Copy pages from one place to the end of a PDF document.

Parameters:
destinationDestination document
sourceSource document
srcPositionsSource page indices

The source and destination documents may be the same file.

Exceptions:
ObjectDisposedExceptionThrown when the Operation object is already disposed.
ParameterIsNullExceptionThrown when the destination document or the source positions parameter is null.
RecAPIErrorThrown when it failed to copy the pages.
void Kofax::OmniPageCSDK::RecPDF::Operation::CopyPage ( Document  destination,
int  destPosition,
Document  source,
params int[]  srcPositions 
)

Copy pages from one place to another place.

Parameters:
destinationDestination document
destPositionDestination page index
sourceSource document
srcPositionsSource page indices

The source and destination documents may be the same file. The pages will be inserted in order of listing before the destination page index. To append a file, do any of the following:

  • Set the destination page index to the count of pages in the destination file.
  • Set the destination page index to -1.
  • Use the AppendPage method.
Exceptions:
ObjectDisposedExceptionThrown when the Operation object is already disposed.
ParameterIsNullExceptionThrown when the destination document or the source positions parameter is null.
RecAPIErrorThrown when it failed to copy the pages.
void Kofax::OmniPageCSDK::RecPDF::Operation::CopyPage ( Document  destination,
int  destPosition,
Document  source,
IEnumerable< int >  srcPositions 
)

Copy pages from one place to another place.

Parameters:
destinationDestination document
destPositionDestination page index
sourceSource document
srcPositionsSource page indices

The source and destination documents may be the same file. The pages will be inserted in order of listing before the destination page index. To append a file, do any of the following:

  • Set the destination page index to the count of pages in the destination file.
  • Set the destination page index to -1.
  • Use the AppendPage method.
Exceptions:
ObjectDisposedExceptionThrown when the Operation object is already disposed.
ParameterIsNullExceptionThrown when the destination document or source positions parameter is null.
RecAPIErrorThrown when it failed to copy the pages.
void Kofax::OmniPageCSDK::RecPDF::Operation::DeletePage ( Document  destination,
params int[]  destPositions 
)

Delete pages from a document.

Parameters:
destinationDocument
destPositionsPage indices
Exceptions:
ObjectDisposedExceptionThrown when the Operation object is already disposed.
ParameterIsNullExceptionThrown when the destination document or the destination positions parameter is null.
RecAPIErrorThrown when it failed to delete pages.
void Kofax::OmniPageCSDK::RecPDF::Operation::DeletePage ( Document  destination,
IEnumerable< int >  destPositions 
)

Delete pages from a document.

Parameters:
destinationDocument
destPositionsPage indices
Exceptions:
ObjectDisposedExceptionThrown when the Operation object is already disposed.
ParameterIsNullExceptionThrown when the destination document or the destination positions parameter is null.
RecAPIErrorThrown when it failed to delete pages.
void Kofax::OmniPageCSDK::RecPDF::Operation::Dispose ( )

Cancel the PDF operation.

Can be called multiple times or after Execute as well. It doesn't throws any exception.

void Kofax::OmniPageCSDK::RecPDF::Operation::Execute ( )

Execute operation.

After execution the operation will be automatically disposed. To cancel an operation dispose it instead of execution. If Dispose is called after Execute, it won't do anything, because the object has been already disposed.

Exceptions:
ObjectDisposedExceptionThrown when the Operation object is already disposed.
RecAPIErrorThrown when it failed to execute the operation.
void Kofax::OmniPageCSDK::RecPDF::Operation::InsertImage ( Document  destination,
int  destPosition,
bool  imageOnly,
params IntPtr[]  srcPages 
)

Insert pages given by HPAGE.

Parameters:
destinationDestination document
destPositionDestination page index
imageOnlyWithout text
srcPagesPages given by HPAGE

The pages will be inserted in order of listing before the destination page index. To append a file, set the destination page index to the count of pages in the destination file or set it to -1.

Exceptions:
ObjectDisposedExceptionThrown when the Operation object is already disposed.
ParameterIsNullExceptionThrown when the destination document or the source pages parameter is null.
RecAPIErrorThrown when it failed to insert HPAGEs.
void Kofax::OmniPageCSDK::RecPDF::Operation::InsertImage ( Document  destination,
int  destPosition,
bool  imageOnly,
IEnumerable< IntPtr >  srcPages 
)

Insert pages given by HPAGE.

Parameters:
destinationDestination document
destPositionDestination page index
imageOnlyWithout text
srcPagesPages given by HPAGE

The pages will be inserted in order of listing before the destination page index. To append a file, set the destination page index to the count of pages in the destination file or set it to -1.

Exceptions:
ObjectDisposedExceptionThrown when the Operation object is already disposed.
ParameterIsNullExceptionThrown when the destination document or the source pages parameter is null.
RecAPIErrorThrown when it failed to insert HPAGEs.
void Kofax::OmniPageCSDK::RecPDF::Operation::MergeText ( Document  destination,
int  destPosition,
IEnumerable< IntPtr >  srcPages 
)

Insert a text content of the given HPAGE handles to the specified PDF pages.

Parameters:
destinationDestination document
destPositionFirst destination page index
srcPagesPages given by HPAGE
Exceptions:
ObjectDisposedExceptionThrown when the Operation object is already disposed.
ParameterIsNullExceptionThrown when the destination document or the source pages parameter is null.
RecAPIErrorThrown when it failed to merge text.
void Kofax::OmniPageCSDK::RecPDF::Operation::MergeText ( Document  destination,
int  destPosition,
params IntPtr[]  srcPages 
)

Insert a text content of the given HPAGE handles to the specified PDF pages.

Parameters:
destinationDestination document
destPositionFirst destination page index
srcPagesPages given by HPAGE
Exceptions:
ObjectDisposedExceptionThrown when the Operation object is already disposed.
ParameterIsNullExceptionThrown when the destination document or the source pages parameter is null.
RecAPIErrorThrown when it failed to merge text.
void Kofax::OmniPageCSDK::RecPDF::Operation::MovePage ( Document  document,
int  destPosition,
params int[]  srcPositions 
)

Move pages from one place to another place.

Parameters:
documentDocument
destPositionDestination page index
srcPositionsSource page indices

The pages will be inserted in order of listing before the destination page index. To append a file, set the destination page index to the count of pages in the destination file, or set it to -1.

Exceptions:
ObjectDisposedExceptionThrown when the Operation object is already disposed.
ParameterIsNullExceptionThrown when the destination document or the destination positions parameter is null.
RecAPIErrorThrown when it failed to move pages.
void Kofax::OmniPageCSDK::RecPDF::Operation::MovePage ( Document  document,
int  destPosition,
IEnumerable< int >  srcPositions 
)

Move pages from one place to another place.

Parameters:
documentDocument
destPositionDestination page index
srcPositionsSource page indices

The pages will be inserted in order of listing before the destination page index. To append a file, set the destination page index to the count of pages in the destination file or set it to -1.

Exceptions:
ObjectDisposedExceptionThrown when the Operation object is already disposed.
ParameterIsNullExceptionThrown when the destination document or the destination positions parameter is null.
RecAPIErrorThrown when it failed to move pages.
void Kofax::OmniPageCSDK::RecPDF::Operation::RotatePage ( Rotation  rotation,
Document  destination,
int  destPosition 
)

Rotate page in a document.

Parameters:
rotationDegree and direction of rotation
destinationDocument
destPositionPage index
Exceptions:
ObjectDisposedExceptionThrown when the Operation object is already disposed.
ParameterIsNullExceptionThrown when the destination document parameter is null.
RecAPIErrorThrown when it failed to rotate the page.

Property Documentation

IList<Document> Kofax::OmniPageCSDK::RecPDF::Operation::Documents [get]

List of documents taking part in this operation.

Exceptions:
ObjectDisposedExceptionThrown when the Operation object is already disposed.
RecAPIErrorThrown when it failed to get the list of documents.
OperationHandle Kofax::OmniPageCSDK::RecPDF::Operation::SafeHandle [get]

RPDF_OPERATION C handle.

Exceptions:
ObjectDisposedExceptionThrown when the Operation object is already disposed.