This section describes the interfaces of the component detailedly. |
|
This method opens a pdf file, if the pdf file is restricted, you can ensure owner password or user password. After it opens success, it will create a converter and return the converter's handle. |
|
long oakBegin(char *pPdfFileName, char *pOwnerPw, char *pUserPw); |
。 |
pPdfFileName: Source pdf file name. It supports absolute path and relative path. |
。 |
pOwnerPw: Pdf owner password. |
。 |
pUserPw: Pdf user password. |
|
If the method succeeds, it returns a converter's handle. If the method fail, it returns a error code, such as the following, for more error codes, please click here. |
|
ERR_OVER_MAXTHREADS : Over the limit amount of threads. |
|
ERR_FILE_UNEXIST : Source pdf file unexist. |
|
ERR_FILE_DAMAGED : Source pdf file is damaged, or not a correct pdf file. |
|
ERR_FILE_RESTRICTED : Source pdf file is restricted, such as password is wrong etc. |
|
This method close the pdf file and destroy the converter appointed by the handle. |
|
long oakEnd(long nHandle); |
。 |
nHandle: The converter's handle, which created by method---oakBegin. |
|
It returns RTN_OK, the method succeeds, otherwise the method fails. For more error codes, please click here. |
|
This method converts a certain page of the pdf file, the page appointed by the second parameter---nPageNo. |
|
long oakExport(long nHandle, long nPageNo); |
。 |
nHandle: The converter's handle, which created by method---oakBegin. |
。 |
nPageNo: A certain page of the pdf file, which will be converted. |
|
It returns RTN_OK, the method succeeds, otherwise the method fails. For more error codes, please click here. |
6. Method---oakGetPageTotal() |
|
This method is to get the number of pages in the PDF document. |
|
long oakGetPageTotal(long nHandle); |
。 |
nHandle: The converter's handle, which created by method---oakBegin. |
|
If the method works successful, it returns the number of pages in the PDF document, otherwise the method works failure. For more error codes, please click here. |
|