RecAPI
Typedefs | Enumerations | Functions
RecPDF Module
RecPDFAPI

This is the "C" level API of RecPDFAPI. RecPDF API-level of CSDK is supported on: Windows, Linux, Mac OS X. More...

Typedefs

typedef struct tagRPDF_DOC *  RPDF_DOC
  Handle of a PDF document.
typedef struct tagRPDF_OPERATION *  RPDF_OPERATION
  Handle of a PDF operation.
typedef struct
tagRPDF_FILEENUMERATOR * 
RPDF_FILEENUMERATOR
  Handle of an enumerator for the PDF documents taking part in a PDF operation.

Enumerations

enum   RPDF_ENCRYPTION {
  ENC_NO,
  ENC_RC4,
  ENC_AES
}
  Encryption type of a PDF file. More...
enum   RPDF_RESTRICTIONS {
  PSR_NO_PRINT = 0x00000100,
  PSR_NO_HIPRINT = 0x00000200,
  PSR_NO_COPY = 0x00000400,
  PSR_NO_EXTRACT_TEXT = 0x00000800,
  PSR_NO_EXTRACT_PAGES = 0x00001000,
  PSR_NO_CHANGE = 0x00002000,
  PSR_NO_ASSEMBLE = 0x00004000,
  PSR_NO_ACROFORM = 0x00008000,
  PSR_NO_ANNOT = 0x00010000
}
  PDF security restriction flags. More...
enum   RPDF_ROTATION {
  PDFROT_NO = 0,
  PDFROT_LEFT,
  PDFROT_RIGHT,
  PDFROT_HALFTURN
}
  Page rotation. More...
enum   PDF_Version
  PDF version.
enum   PDFA_Version
  PDFA version.

Functions

RECERR PDFASMAPI  rPdfInit (void)
  Initialize the RecPDF.
RECERR PDFASMAPI  rPdfQuit (void)
  Uninitialize the RecPDF.
RECERR PDFASMAPI  rPdfOpen (LPCTSTR pFileName, LPCTSTR password, RPDF_DOC *handle)
  Open a PDF file.
RECERR PDFASMAPI  rPdfCompact (LPCTSTR pInFileName, LPCTSTR pOutFileName)
  Compact a PDF document.
RECERR PDFASMAPI  rPdfClose (RPDF_DOC handle)
  Close a PDF document.
RECERR PDFASMAPI  rPdfGetOp (RPDF_DOC handle, RPDF_OPERATION *ophandle)
  Get the PDF operation assigned to a PDF document.
RECERR PDFASMAPI  rPdfGetPath (RPDF_DOC handle, LPTSTR buffer, size_t buflen)
  Get the path of the PDF document.
RECERR PDFASMAPI  rPdfFileHasText (RPDF_DOC handle, size_t position, bool *bHasText)
  Check if a page of the PDF document does have or doesn't have searchable text.
RECERR PDFASMAPI  rPdfGetPageCount (RPDF_DOC handle, size_t *pnPages)
  Get the page count of a PDF document.
RECERR PDFASMAPI  rPdfOpStart (RPDF_OPERATION *Ophandle)
  Start a new PDF operation.
RECERR PDFASMAPI  rPdfOpAddFile (RPDF_OPERATION ophandle, RPDF_DOC handle)
  Add a PDF document to the PDF operation.
RECERR PDFASMAPI  rPdfOpGetFirstFile (RPDF_OPERATION ophandle, RPDF_DOC *handle, size_t *numfiles, RPDF_FILEENUMERATOR *enumerator)
  Get the first assigned PDF document of a PDF operation.
RECERR PDFASMAPI  rPdfOpGetNextFile (RPDF_FILEENUMERATOR enumerator, RPDF_DOC *handle)
  Get the next assigned PDF document of a PDF operation.
RECERR PDFASMAPI  rPdfOpCloseFileEnumeration (RPDF_FILEENUMERATOR enumerator)
  Close the enumeration of the assigned PDF documents in the PDF operation.
RECERR PDFASMAPI  rPdfOpRotatePage (RPDF_OPERATION ophandle, RPDF_DOC handle, size_t position, RPDF_ROTATION rotation)
  Rotate a page in a PDF document as a part of a PDF operation.
RECERR PDFASMAPI  rPdfOpDeletePages (RPDF_OPERATION ophandle, RPDF_DOC handle, const size_t *PageIndexArr, size_t numpages)
  Delete one or more pages in a PDF document as a part of a PDF operation.
RECERR PDFASMAPI  rPdfOpCopyPages (RPDF_OPERATION ophandle, RPDF_DOC desthandle, size_t destposition, RPDF_DOC srchandle, const size_t *PageIndexArr, size_t numpages)
  Copy pages as a part of a PDF operation.
RECERR PDFASMAPI  rPdfOpMovePages (RPDF_OPERATION ophandle, RPDF_DOC handle, size_t destposition, const size_t *PageIndexArr, size_t numpages)
  Move pages as a part of a PDF operation.
RECERR PDFASMAPI  rPdfOpCancel (RPDF_OPERATION ophandle)
  Cancel a PDF operation.
RECERR PDFASMAPI  rPdfOpExecute (RPDF_OPERATION ophandle)
  Execute a PDF operation.
RECERR PDFASMAPI  rPdfOpInsertHPAGEs (RPDF_OPERATION ophandle, RPDF_DOC desthandle, size_t destposition, const HPAGE *srcpages, size_t srcpagecount, bool bImageOnly)
  Insert pages to the PDF given by HPAGE handles.
RECERR PDFASMAPI  rPdfOpMergeTextToPages (RPDF_OPERATION ophandle, RPDF_DOC desthandle, size_t destposition, const HPAGE *srcpages, size_t srcpagecount)
  Insert the text content of the given HPAGE handles to the specified PDF pages.
RECERR PDFASMAPI  rPdfGetPDFSecurityInfo (LPCTSTR pFileName, RPDF_ENCRYPTION *encMethod, size_t *keySize, RPDF_RESTRICTIONS *secuRestrictions, bool *hasMasterPassword, bool *hasUserPassword)
  Get PDF encryption information without opening it.
RECERR PDFASMAPI  rPdfOptOpen (LPCTSTR pFileName, LPCTSTR password, RPDF_DOC *handle)
  Open a PDF file.
RECERR PDFASMAPI  rPdfOptAddCommandStr (RPDF_DOC handle, LPCTSTR command)
  Add an optimization command string to a handle.
RECERR PDFASMAPI  rPdfOptimize (RPDF_DOC handle, LPCTSTR pOptFileName)
  Do the optimization process.

Detailed Description

This is the "C" level API of RecPDFAPI. RecPDF API-level of CSDK is supported on: Windows, Linux, Mac OS X.

This is the "C" level Page Oriented PDF File Manipulation API of OmniPage CSDK.

This part of RecAPI is an extension can be used both with KernelAPI and with RecAPIPlus. One of them should be initialized before initialization of RecPDF.

List of header files of this module:

The library file that should be linked is recpdf.lib, but there is an alternative solution: the dynamic linking using RecPDFS.


Enumeration Type Documentation

Encryption type of a PDF file.

Enumerator:
ENC_NO 

Not encrypted.

ENC_RC4 

RC4 algorithm.

ENC_AES 

AES algorithm.

PDF security restriction flags.

Enumerator:
PSR_NO_PRINT 

Printing isn't allowed.

PSR_NO_HIPRINT 

Print the document only low resolution mode.

PSR_NO_COPY 

Can not copy the content to other document.

PSR_NO_EXTRACT_TEXT 

Extracting the content is prohibited. (For accessibility usings for disabled users.)

PSR_NO_EXTRACT_PAGES 

Extracting the pages is prohibited.

PSR_NO_CHANGE 

Modifying the content is prohibited.

PSR_NO_ASSEMBLE 

Document assemble is prohibited (can not insert, rotate, delete pages, and create bookmarks or thumbnails).

PSR_NO_ACROFORM 

Filling in form fields are prohibited.

PSR_NO_ANNOT 

Adding or modifying annotations are prohibited.

Page rotation.

Enumerator:
PDFROT_NO 

No rotation.

PDFROT_LEFT 

Rotate counter clockwise.

PDFROT_RIGHT 

Rotate clockwise.

PDFROT_HALFTURN 

Rotate 180 degrees.


Function Documentation

RECERR PDFASMAPI rPdfClose ( RPDF_DOC  handle )

Close a PDF document.

Destroys the PDF document object.

Return values:
RECERR
Parameters:
[in] handle Handle of the PDF document.
Note:
RecPDF API-level of CSDK is supported on: Windows, Linux, Mac OS X.
All unsaved data will be lost.
The handle won't be valid any more.
The specification of this function in C# is:
 RECERR rPdfClose(IntPtr handle); 
The specification of this function in Java is:
 int rPdfClose(RPDF_DOC handle) 
RECERR PDFASMAPI rPdfCompact ( LPCTSTR  pInFileName,
LPCTSTR  pOutFileName 
)

Compact a PDF document.

Save the compacted PDF document into a new file.

Return values:
RECERR
Parameters:
[in] pInFileName Full path of the input file.
[in] pOutFileName Full path of the output file.
Note:
RecPDF API-level of CSDK is supported on: Windows, Linux, Mac OS X.
The specification of this function in C# is:
 RECERR rPdfCompact(string sourceFileName, string destinationFileName); 
The specification of this function in Java is:
 int rPdfCompact(String pInFileName, String pOutFileName) 
RECERR PDFASMAPI rPdfFileHasText ( RPDF_DOC  handle,
size_t  position,
bool *  bHasText 
)

Check if a page of the PDF document does have or doesn't have searchable text.

Return values:
RECERR
Parameters:
[in] handle Handle of the PDF document.
[in] position Page index in the PDF document.
[out] bHasText Existence of searchable text in the page of the PDF document.
Note:
RecPDF API-level of CSDK is supported on: Windows, Linux, Mac OS X.
The specification of this function in C# is:
 RECERR rPdfFileHasText(DocumentHandle handle, uint position, out bool hasText); 
The specification of this function in Java is:
 int rPdfFileHasText(RPDF_DOC handle, long position, boolean[] bHasText) 
RECERR PDFASMAPI rPdfGetOp ( RPDF_DOC  handle,
RPDF_OPERATION ophandle 
)

Get the PDF operation assigned to a PDF document.

At a time only one PDF operation can be assigned to a PDF document. If there is such an PDF operation, this function will give it back. If there is no such PDF operation NULL will be returned.

Return values:
RECERR
Parameters:
[in] handle Handle of the PDF document.
[out] ophandle The return value is the handle of the PDF operation if an PDF operation is assigned to the PDF document, otherwise NULL.
Note:
RecPDF API-level of CSDK is supported on: Windows, Linux, Mac OS X.
The specification of this function in C# is:
 RECERR rPdfGetOp(DocumentHandle handle, out OperationHandle ophandle); 
The specification of this function in Java is:
 int rPdfGetOp(RPDF_DOC handle, RPDF_OPERATION ophandle) 
RECERR PDFASMAPI rPdfGetPageCount ( RPDF_DOC  handle,
size_t *  pnPages 
)

Get the page count of a PDF document.

Return values:
RECERR
Parameters:
[in] handle Handle of the PDF document.
[out] pnPages Count of pages in the PDF document.
Note:
RecPDF API-level of CSDK is supported on: Windows, Linux, Mac OS X.
The specification of this function in C# is:
 RECERR rPdfGetPageCount(DocumentHandle handle, out UIntPtr attribs); 
The specification of this function in Java is:
 int rPdfGetPageCount(RPDF_DOC handle, long[] pnPages) 
RECERR PDFASMAPI rPdfGetPath ( RPDF_DOC  handle,
LPTSTR  buffer,
size_t  buflen 
)

Get the path of the PDF document.

Read the path string from the PDF file.

Return values:
RECERR
Parameters:
[in] handle Handle of the PDF document.
[out] buffer String buffer to store the full path of the PDF document.
[out] buflen Length of the buffer.
Note:
RecPDF API-level of CSDK is supported on: Windows, Linux, Mac OS X.
The specification of this function in C# is:
 RECERR rPdfGetPath(DocumentHandle handle, out string path) 
The specification of this function in Java is:
 int rPdfGetPath(RPDF_DOC handle, String[] buffer) 
RECERR PDFASMAPI rPdfGetPDFSecurityInfo ( LPCTSTR  pFileName,
RPDF_ENCRYPTION encMethod,
size_t *  keySize,
RPDF_RESTRICTIONS secuRestrictions,
bool *  hasMasterPassword,
bool *  hasUserPassword 
)

Get PDF encryption information without opening it.

Return values:
RECERR
Parameters:
[in] pFileName Full path of the source file.
[out] encMethod Encryption method of the PDF file. (Can be NULL if not needed.)
[out] keySize Encryption's key size. (Can be NULL if not needed.)
[out] secuRestrictions Restrictions on the PDF file. (Can be NULL if not needed.)
[out] hasMasterPassword Whether the PDF file has master password. (Can be NULL if not needed.)
[out] hasUserPassword Whether the PDF file has user password. (Can be NULL if not needed.)
Note:
RecPDF API-level of CSDK is supported on: Windows, Linux, Mac OS X.
The specification of this function in C# is:
 rPdfGetPDFSecurityInformation(string fileName, out Encryption encryption, out UIntPtr keySize, out Restrictions restrictions, out bool hasMasterPassword, out bool hasUserPassword)  
The specification of this function in Java is:
 int rPdfGetPDFSecurityInfo(String pFileName, RPDF_ENCRYPTION[] encMethod, long[] keySize, RPDF_RESTRICTIONS[] secuRestrictions, boolean[] hasMasterPassword, boolean[] hasUserPassword) 
RECERR PDFASMAPI rPdfInit ( void  )

Initialize the RecPDF.

The rPdfInit starts the PDF assembler SDK. All RecPDF functions must be called between an rPdfInit and an rPdfQuit calls.

Return values:
RECERR
Note:
RecPDF API-level of CSDK is supported on: Windows, Linux, Mac OS X.
Before rPdfInit a kRecInit or RecInitPlus must be called to initialize the CSDK.
The specification of this function in C# is:
 RECERR rPdfInit(); 
The specification of this function in Java is:
 int rPdfInit() 
RECERR PDFASMAPI rPdfOpAddFile ( RPDF_OPERATION  ophandle,
RPDF_DOC  handle 
)

Add a PDF document to the PDF operation.

A PDF operation is able to use only those PDF document whose are assigned to it.

Return values:
RECERR
Parameters:
[in] ophandle Handle of the PDF operation.
[in] handle Handle of the PDF document.
Note:
RecPDF API-level of CSDK is supported on: Windows, Linux, Mac OS X.
Once a PDF document is assigned to a PDF operation, there is no way to unassign it.
The specification of this function in C# is:
 RECERR rPdfOpAddFile(OperationHandle operation, DocumentHandle docHandle); 
The specification of this function in Java is:
 int rPdfOpAddFile(RPDF_OPERATION ophandle, RPDF_DOC handle) 
RECERR PDFASMAPI rPdfOpCancel ( RPDF_OPERATION  ophandle )

Cancel a PDF operation.

Destroys a PDF operation without executing it. This PDF operation handle cannot be used anymore. All page objects will be freed up and cannot be used anymore. All PDF documents will show the same state as before the PDF operation has started.

Return values:
RECERR
Parameters:
[in] ophandle Handle of the PDF operation.
Note:
RecPDF API-level of CSDK is supported on: Windows, Linux, Mac OS X.
The specification of this function in C# is:
 RECERR rPdfOpCancel(IntPtr ophandle); 
The specification of this function in Java is:
RECERR PDFASMAPI rPdfOpCloseFileEnumeration ( RPDF_FILEENUMERATOR  enumerator )

Close the enumeration of the assigned PDF documents in the PDF operation.

Destroys the enumerator of the assigned PDF documents.

Return values:
RECERR
Parameters:
[in] enumerator Handle of the PDF document enumerator.
Note:
RecPDF API-level of CSDK is supported on: Windows, Linux, Mac OS X.
The specification of this function in C# is:
 RECERR rPdfOpCloseFileEnumeration(IntPtr enumerator); 
The specification of this function in Java is:
RECERR PDFASMAPI rPdfOpCopyPages ( RPDF_OPERATION  ophandle,
RPDF_DOC  desthandle,
size_t  destposition,
RPDF_DOC  srchandle,
const size_t *  PageIndexArr,
size_t  numpages 
)

Copy pages as a part of a PDF operation.

Add a copy page command to a PDF operation. It can copy pages from a PDF document to another PDF document or inside a single PDF document.

Return values:
RECERR
Parameters:
[in] ophandle Handle of the PDF operation.
[in] desthandle Handle of the destination PDF document.
[in] destposition Starting page index in the destination PDF document. The first copied page will get this page index. All other copied pages will be copied continually after the first one. If this equals to the count of pages of the destination PDF document or (size_t)-1, then the new pages will be appended to the PDF document.
[in] srchandle Handle of the source PDF document. It can be the same as the desthandle. If it is NULL, then the source document will be the same as the destination.
[in] PageIndexArr Array of page indices in the source PDF document.
[in] numpages Count of pages to copy. This is the number of elements in the PageIndexArr array.
Note:
RecPDF API-level of CSDK is supported on: Windows, Linux, Mac OS X.
The command takes place when the PDF operation is executed.
After the call all functions will see as if the copy has been already taken place.
The specification of this function in C# is:
 RECERR rPdfOpCopyPages(OperationHandle ophandle, DocumentHandle handle, uint position, DocumentHandle otherHandle, UIntPtr[] otherPositions) 
The specification of this function in Java is:
 int rPdfOpCopyPages(RPDF_OPERATION ophandle, RPDF_DOC desthandle, long destposition, RPDF_DOC srchandle, long[] PageIndexArr) 
RECERR PDFASMAPI rPdfOpDeletePages ( RPDF_OPERATION  ophandle,
RPDF_DOC  handle,
const size_t *  PageIndexArr,
size_t  numpages 
)

Delete one or more pages in a PDF document as a part of a PDF operation.

Add a page delete command to a PDF operation.

Return values:
RECERR
Parameters:
[in] ophandle Handle of the PDF operation.
[in] handle Handle of the PDF document.
[in] PageIndexArr Array of the page indices in the PDF document.
[in] numpages Count of pages to delete. This is the number of elements in the PageIndexArr.
Note:
RecPDF API-level of CSDK is supported on: Windows, Linux, Mac OS X.
The command takes place when the PDF operation is executed.
After the call all functions will see as if the deletion has been already taken place.
The specification of this function in C# is:
 RECERR rPdfOpDeletePages(OperationHandle operation, DocumentHandle handle, UIntPtr[] pageIndexArray) 
The specification of this function in Java is:
 int rPdfOpDeletePages(RPDF_OPERATION ophandle, RPDF_DOC handle, long[] PageIndexArr) 
RECERR PDFASMAPI rPdfOpen ( LPCTSTR  pFileName,
LPCTSTR  password,
RPDF_DOC handle 
)

Open a PDF file.

Create a PDF document object, and assign an existing PDF file to it. Then gives back a handle for the PDF document.

Return values:
RECERR
Parameters:
[in] pFileName Full path of the source file.
[in] password Pointer to the PDF password or NULL or empty string if no password is needed.
[out] handle PDF document handle.
Note:
RecPDF API-level of CSDK is supported on: Windows, Linux, Mac OS X.
The specification of this function in C# is:
 RECERR rPdfOpen(string fileName, string password, out DocumentHandle handle); 
The specification of this function in Java is:
 int rPdfOpen(String pFileName, String password, RPDF_DOC handle) 
RECERR PDFASMAPI rPdfOpExecute ( RPDF_OPERATION  ophandle )

Execute a PDF operation.

Execute a PDF operation and after the execution destroy it. This PDF operation handle cannot be used anymore. All page objects will be freed up and cannot be used anymore.

Return values:
RECERR
Parameters:
[in] ophandle Handle of the PDF operation.
Note:
RecPDF API-level of CSDK is supported on: Windows, Linux, Mac OS X.
There is no guarantee that all commands will be executed.
The specification of this function in C# is:
 RECERR rPdfOpExecute(OperationHandle ophandle); 
The specification of this function in Java is:
RECERR PDFASMAPI rPdfOpGetFirstFile ( RPDF_OPERATION  ophandle,
RPDF_DOC handle,
size_t *  numfiles,
RPDF_FILEENUMERATOR enumerator 
)

Get the first assigned PDF document of a PDF operation.

Start the enumeration of the assigned PDF document of a PDF operation. The created file enumerator must be freed up after use with the rPdfOpCloseFileEnumeration function call.

Return values:
RECERR
Parameters:
[in] ophandle Handle of the PDF operation.
[out] handle Handle of the first PDF document.
[out] numfiles Count of assigned PDF documents in the PDF operation.
[out] enumerator New enumerator handle. This handle can be used to continue the enumeration with the rPdfOpGetNextFile.
Note:
RecPDF API-level of CSDK is supported on: Windows, Linux, Mac OS X.
By the time when the enumeration takes place the PDF operation object or the referenced PDF documents may be destroyed. If the PDF operation object is destroyed a referenced PDF document may be attached to another PDF operation.
The specification of this function in C# is:
 RECERR rPdfOpGetFirstFile(OperationHandle ophandle, out DocumentHandle handle, out UIntPtr numfiles, out FileEnumeratorHandle enumerator); 
The specification of this function in Java is:
 int rPdfOpGetFirstFile(RPDF_OPERATION ophandle, RPDF_DOC handle, long[] numfiles, RPDF_FILEENUMERATOR enumerator) 
RECERR PDFASMAPI rPdfOpGetNextFile ( RPDF_FILEENUMERATOR  enumerator,
RPDF_DOC handle 
)

Get the next assigned PDF document of a PDF operation.

Step the enumerator of the assigned PDF document and give back the next one.

Return values:
RECERR
Parameters:
[in] enumerator Handle of the PDF document enumerator.
[out] handle Assigned PDF document in the PDF operation.
Note:
RecPDF API-level of CSDK is supported on: Windows, Linux, Mac OS X.
The specification of this function in C# is:
 RECERR rPdfOpGetNextFile(FileEnumeratorHandle enumerator, out DocumentHandle handle); 
The specification of this function in Java is:
RECERR PDFASMAPI rPdfOpInsertHPAGEs ( RPDF_OPERATION  ophandle,
RPDF_DOC  desthandle,
size_t  destposition,
const HPAGE srcpages,
size_t  srcpagecount,
bool  bImageOnly 
)

Insert pages to the PDF given by HPAGE handles.

Add an insert HPAGE command to a PDF operation. It can insert pages to a PDF document by HPAGE.

Return values:
RECERR
Parameters:
[in] ophandle Handle of the PDF operation.
[in] desthandle Handle of the destination PDF document.
[in] destposition Starting page index in the destination PDF document. The first inserted page will get this page index. All other inserted pages will be inserted continually after the first one. If this equals to the count of pages of the destination PDF document or (size_t)-1, then the new pages will be appended to the PDF document.
[in] srcpages Array of pages given by HPAGEs.
[in] srcpagecount Count of HPAGEs to insert. This is the number of elements in the srcpages array.
[in] bImageOnly If this parameter is true, the command inserts only the images without the recognized text.
Note:
RecPDF API-level of CSDK is supported on: Windows, Linux, Mac OS X.
The command takes place when the PDF operation is executed.
The HPAGEs can free after the end of the operation.
After the call all functions will see as if the insertion has been already taken place.
The specification of this function in C# is:
 RECERR rPdfOpInsertHPAGEs(OperationHandle ophandle, DocumentHandle handle, uint position, IntPtr[] srcpages, bool imageOnly) 
The specification of this function in Java is:
 int rPdfOpInsertHPAGEs(RPDF_OPERATION ophandle, RPDF_DOC desthandle, long destposition, HPAGE[] srcpages, boolean bImageOnly) 
RECERR PDFASMAPI rPdfOpMergeTextToPages ( RPDF_OPERATION  ophandle,
RPDF_DOC  desthandle,
size_t  destposition,
const HPAGE srcpages,
size_t  srcpagecount 
)

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

Add a Make Pages Searchable command to a PDF operation. It can merge the text content of a HPAGE to the specified pages.

Return values:
RECERR
Parameters:
[in] ophandle Handle of the PDF operation.
[in] desthandle Handle of the destination PDF document.
[in] destposition Starting page index in the destination PDF document. The first searchable page will get this page index. All other searchable pages will continually after the first one.
[in] srcpages Array of pages given by HPAGEs.
[in] srcpagecount Count of HPAGEs to insert. This is the number of elements in the srcpages array.
Note:
RecPDF API-level of CSDK is supported on: Windows, Linux, Mac OS X.
The command takes place when the PDF operation is executed.
After this function call, the HPAGE can free by the caller.
After the call all functions will see as if the insertion has been already taken place.
The specification of this function in C# is:
 RECERR rPdfOpMergeTextToPages(OperationHandle ophandle, DocumentHandle handle, uint destposition, IntPtr[] srcpages) 
The specification of this function in Java is:
 int rPdfOpMergeTextToPages(RPDF_OPERATION ophandle, RPDF_DOC desthandle, long destposition, HPAGE[] srcpages) 
RECERR PDFASMAPI rPdfOpMovePages ( RPDF_OPERATION  ophandle,
RPDF_DOC  handle,
size_t  destposition,
const size_t *  PageIndexArr,
size_t  numpages 
)

Move pages as a part of a PDF operation.

Add a move page command to a PDF operation. It can move pages inside a single PDF document.

Return values:
RECERR
Parameters:
[in] ophandle Handle of the PDF operation.
[in] handle Handle of the PDF document.
[in] destposition The starting page index. This will be the page index of the first moved page. All other move pages will be moved continually after the first one. If this equals to the count of pages of the destination PDF document or (size_t)-1, then the new pages will be appended to the PDF document.
[in] PageIndexArr Array of page indices in the source PDF document.
[in] numpages Count of pages to copy. This is the number of elements in the PageIndexArr array.
Note:
RecPDF API-level of CSDK is supported on: Windows, Linux, Mac OS X.
The command takes place when the PDF operation is executed.
After the call all functions will see as if the move has been already taken place.
The specification of this function in C# is:
 RECERR rPdfOpMovePages(OperationHandle ophandle, DocumentHandle handle, uint position, UIntPtr[] otherPositions) 
The specification of this function in Java is:
 int rPdfOpMovePages(RPDF_OPERATION ophandle, RPDF_DOC handle, long destposition, long[] PageIndexArr) 
RECERR PDFASMAPI rPdfOpRotatePage ( RPDF_OPERATION  ophandle,
RPDF_DOC  handle,
size_t  position,
RPDF_ROTATION  rotation 
)

Rotate a page in a PDF document as a part of a PDF operation.

Add a page rotate command to a PDF operation.

Return values:
RECERR
Parameters:
[in] ophandle Handle of the PDF operation.
[in] handle Handle of the PDF document.
[in] position Page index in the PDF document.
[in] rotation How much rotate the page.
Note:
RecPDF API-level of CSDK is supported on: Windows, Linux, Mac OS X.
The command takes place when the PDF operation is executed.
After the call all functions will see as if the rotation has been already taken place.
If the page is a part of a page object, then it will be removed from the page object.
The specification of this function in C# is:
 RECERR rPdfOpRotatePage(OperationHandle operation, DocumentHandle handle, uint position, Rotation rotation); 
The specification of this function in Java is:
 int rPdfOpRotatePage(RPDF_OPERATION ophandle, RPDF_DOC handle, long position, RPDF_ROTATION rotation) 
RECERR PDFASMAPI rPdfOpStart ( RPDF_OPERATION Ophandle )

Start a new PDF operation.

Create a new PDF operation object.

Return values:
RECERR
Parameters:
[out] Ophandle Handle of the new PDF operation.
Note:
RecPDF API-level of CSDK is supported on: Windows, Linux, Mac OS X.
The specification of this function in C# is:
 RECERR rPdfOpStart(out OperationHandle ophandle); 
The specification of this function in Java is:
 int rPdfOpStart(RPDF_OPERATION Ophandle) 
RECERR PDFASMAPI rPdfOptAddCommandStr ( RPDF_DOC  handle,
LPCTSTR  command 
)

Add an optimization command string to a handle.

See the possible command strings in the RecPDF help! You can specify more command strings by calling this function more than once

Return values:
RECERR
Parameters:
[in] handle Handle of the PDF operation coming from rPdfOptOpen.
[in] command Commands, see the command descriptions.
Note:
RecPDF API-level of CSDK is supported on: Windows, Linux, Mac OS X.
After collecting the required commands calling this function sequentially they can be performed by calling rPdfOptimize.
The specification of this function in C# is:
 RECERR rPdfOptAddCommandStr(DocumentHandle Handle, string Command); 
The specification of this function in Java is:
 int rPdfOptAddCommandStr(RPDF_DOC handle, String command) 
RECERR PDFASMAPI rPdfOptimize ( RPDF_DOC  handle,
LPCTSTR  pOptFileName 
)

Do the optimization process.

Return values:
RECERR
Parameters:
[in] handle Handle of the PDF operation coming from rPdfOptOpen.
[in] pOptFileName Full path of the optimized output file.
Note:
RecPDF API-level of CSDK is supported on: Windows, Linux, Mac OS X.
The commands to be performed during optimization can be added by calling rPdfOptAddCommandStr.
The specification of this function in C# is:
 RECERR rPdfOptimize(DocumentHandle Handle, string OptFileName); 
The specification of this function in Java is:
 int rPdfOptimize(RPDF_DOC handle, String pOptFileName) 
RECERR PDFASMAPI rPdfOptOpen ( LPCTSTR  pFileName,
LPCTSTR  password,
RPDF_DOC handle 
)

Open a PDF file.

Create a PDF document object, and assign an existing PDF file to it. Then gives back a handle for the PDF document. This handle can be used only for PDF optimalization. Do not add to an Operation

Return values:
RECERR
Parameters:
[in] pFileName Full path of the source file.
[in] password Pointer to the PDF password or NULL or empty string if no password is needed.
[out] handle PDF document handle.
Note:
RecPDF API-level of CSDK is supported on: Windows, Linux, Mac OS X.
The handle should be closed by calling rPdfClose.
The specification of this function in C# is:
 RECERR rPdfOptOpen(string Path, string Password, out DocumentHandle Handle); 
The specification of this function in Java is:
 int rPdfOptOpen(String pFileName, String password, RPDF_DOC handle) 
RECERR PDFASMAPI rPdfQuit ( void  )

Uninitialize the RecPDF.

The rPdfQuit stops the PDF assembler SDK. All RecPDF functions must be called between an rPdfInit and an rPdfQuit calls.

Return values:
RECERR
Note:
RecPDF API-level of CSDK is supported on: Windows, Linux, Mac OS X.
After rPdfQuit a kRecQuit or RecQuitPlus must be called to shut down the CSDK.
The specification of this function in C# is:
 RECERR rPdfQuit(); 
The specification of this function in Java is:
 int rPdfQuit()