|
Pdftools SDK
|
Go to the source code of this file.
Typedefs | |
| typedef void(PDFTOOLS_CALL * | TPdfToolsOcr_Processor_WarningA) (void *pContext, const char *szMessage, TPdfToolsOcr_WarningCategory iCategory, int iPageNo, const char *szContext) |
| Event for warnings occurring during OCR processing Non-critical issues during processing are reported via this event. It is recommended to review the TPdfToolsOcr_WarningCategory and handle warnings if necessary for the application. | |
| typedef void(PDFTOOLS_CALL * | TPdfToolsOcr_Processor_WarningW) (void *pContext, const WCHAR *szMessage, TPdfToolsOcr_WarningCategory iCategory, int iPageNo, const WCHAR *szContext) |
| Event for warnings occurring during OCR processing Non-critical issues during processing are reported via this event. It is recommended to review the TPdfToolsOcr_WarningCategory and handle warnings if necessary for the application. | |
| #define PDFTOOLS_CALL |
| #define PdfToolsOcr_Engine_Create PdfToolsOcr_Engine_CreateA |
| #define PdfToolsOcr_Engine_GetLanguages PdfToolsOcr_Engine_GetLanguagesA |
| #define PdfToolsOcr_Engine_GetParameters PdfToolsOcr_Engine_GetParametersA |
| #define PdfToolsOcr_Engine_SetLanguages PdfToolsOcr_Engine_SetLanguagesA |
| #define PdfToolsOcr_Engine_SetParameters PdfToolsOcr_Engine_SetParametersA |
| #define PdfToolsOcr_Processor_AddWarningHandler PdfToolsOcr_Processor_AddWarningHandlerA |
| #define PdfToolsOcr_Processor_RemoveWarningHandler PdfToolsOcr_Processor_RemoveWarningHandlerA |
| #define TPdfToolsOcr_Processor_Warning TPdfToolsOcr_Processor_WarningA |
| typedef void(PDFTOOLS_CALL * TPdfToolsOcr_Processor_WarningA) (void *pContext, const char *szMessage, TPdfToolsOcr_WarningCategory iCategory, int iPageNo, const char *szContext) |
Event for warnings occurring during OCR processing Non-critical issues during processing are reported via this event. It is recommended to review the TPdfToolsOcr_WarningCategory and handle warnings if necessary for the application.
| [in,out] | pContext | Context of the event callback. |
| [in] | szMessage | The message describing the warning |
| [in] | iCategory | The category of the warning |
| [in] | iPageNo | The page number this warning is associated to, or 0 if not page-specific |
| [in] | szContext | A description of the context where the warning occurred |
| typedef void(PDFTOOLS_CALL * TPdfToolsOcr_Processor_WarningW) (void *pContext, const WCHAR *szMessage, TPdfToolsOcr_WarningCategory iCategory, int iPageNo, const WCHAR *szContext) |
Event for warnings occurring during OCR processing Non-critical issues during processing are reported via this event. It is recommended to review the TPdfToolsOcr_WarningCategory and handle warnings if necessary for the application.
| [in,out] | pContext | Context of the event callback. |
| [in] | szMessage | The message describing the warning |
| [in] | iCategory | The category of the warning |
| [in] | iPageNo | The page number this warning is associated to, or 0 if not page-specific |
| [in] | szContext | A description of the context where the warning occurred |
| PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsOcr_Engine_Close | ( | TPdfToolsOcr_Engine * | pObject | ) |
Close object.
Close disposable objects by invoking this function.
| [in] | pObject | Disposable object. |
| PDFTOOLS_EXPORT TPdfToolsOcr_Engine *PDFTOOLS_CALL PdfToolsOcr_Engine_CreateA | ( | const char * | szName | ) |
Create a new OCR engine Optionally the szName argument may be followed by "@" and engine creation parameters, e.g. "service@http://localhost:7982/".
| [in] | szName | The engine name and optional creation parameters. |
NULL if there is an error.
NULL was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. Possible error codes:| PDFTOOLS_EXPORT TPdfToolsOcr_Engine *PDFTOOLS_CALL PdfToolsOcr_Engine_CreateW | ( | const WCHAR * | szName | ) |
Create a new OCR engine Optionally the szName argument may be followed by "@" and engine creation parameters, e.g. "service@http://localhost:7982/".
| [in] | szName | The engine name and optional creation parameters. |
NULL if there is an error.
NULL was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. Possible error codes:| PDFTOOLS_EXPORT size_t PDFTOOLS_CALL PdfToolsOcr_Engine_GetLanguagesA | ( | TPdfToolsOcr_Engine * | pEngine, |
| char * | pBuffer, | ||
| size_t | nBufferSize ) |
The OCR language settings.
Set the languages used for recognition to improve detection accuracy. Note that for some engines it is crucial to set the used languages correctly. For example, ABBYY FineReader will only detect characters used in the specified languages.
Multiple languages can be specified as a comma-separated list, e.g. "German,English".
Default value: NULL (engine default)
| [in,out] | pEngine | Acts as a handle to the native object of type TPdfToolsOcr_Engine. |
| [out] | pBuffer | Retrieved value. To determine the required buffer size, the function has to be called with NULL. The return value of this function specifies the buffer size. |
| [in] | nBufferSize | The buffer size of the retrieved string pBuffer. |
pBuffer. 0 if either an error occurred or the returned buffer is actually NULL. To determine if an error has occurred, check the error code as described in the note section below. 0 was returned and the error code returned by PdfTools_GetLastError is different from ePdfTools_Error_Success. Get the error message with PdfTools_GetLastErrorMessage. Possible error codes:| PDFTOOLS_EXPORT size_t PDFTOOLS_CALL PdfToolsOcr_Engine_GetLanguagesW | ( | TPdfToolsOcr_Engine * | pEngine, |
| WCHAR * | pBuffer, | ||
| size_t | nBufferSize ) |
The OCR language settings.
Set the languages used for recognition to improve detection accuracy. Note that for some engines it is crucial to set the used languages correctly. For example, ABBYY FineReader will only detect characters used in the specified languages.
Multiple languages can be specified as a comma-separated list, e.g. "German,English".
Default value: NULL (engine default)
| [in,out] | pEngine | Acts as a handle to the native object of type TPdfToolsOcr_Engine. |
| [out] | pBuffer | Retrieved value. To determine the required buffer size, the function has to be called with NULL. The return value of this function specifies the buffer size. |
| [in] | nBufferSize | The buffer size of the retrieved string pBuffer. |
pBuffer. 0 if either an error occurred or the returned buffer is actually NULL. To determine if an error has occurred, check the error code as described in the note section below. 0 was returned and the error code returned by PdfTools_GetLastError is different from ePdfTools_Error_Success. Get the error message with PdfTools_GetLastErrorMessage. Possible error codes:| PDFTOOLS_EXPORT size_t PDFTOOLS_CALL PdfToolsOcr_Engine_GetParametersA | ( | TPdfToolsOcr_Engine * | pEngine, |
| char * | pBuffer, | ||
| size_t | nBufferSize ) |
Engine-specific parameters.
OCR engine-specific parameters can be set to optimize performance or activate optional recognition features.
Parameters are specified as semicolon-separated key=value pairs, e.g. "PredefinedProfile=Default;Profile=/path/to/profile.ini". The available parameters depend on the OCR engine. Commonly supported parameters include:
Parameter keys are case-sensitive.
Default value: NULL
| [in,out] | pEngine | Acts as a handle to the native object of type TPdfToolsOcr_Engine. |
| [out] | pBuffer | Retrieved value. To determine the required buffer size, the function has to be called with NULL. The return value of this function specifies the buffer size. |
| [in] | nBufferSize | The buffer size of the retrieved string pBuffer. |
pBuffer. 0 if either an error occurred or the returned buffer is actually NULL. To determine if an error has occurred, check the error code as described in the note section below. 0 was returned and the error code returned by PdfTools_GetLastError is different from ePdfTools_Error_Success. Get the error message with PdfTools_GetLastErrorMessage. Possible error codes:| PDFTOOLS_EXPORT size_t PDFTOOLS_CALL PdfToolsOcr_Engine_GetParametersW | ( | TPdfToolsOcr_Engine * | pEngine, |
| WCHAR * | pBuffer, | ||
| size_t | nBufferSize ) |
Engine-specific parameters.
OCR engine-specific parameters can be set to optimize performance or activate optional recognition features.
Parameters are specified as semicolon-separated key=value pairs, e.g. "PredefinedProfile=Default;Profile=/path/to/profile.ini". The available parameters depend on the OCR engine. Commonly supported parameters include:
Parameter keys are case-sensitive.
Default value: NULL
| [in,out] | pEngine | Acts as a handle to the native object of type TPdfToolsOcr_Engine. |
| [out] | pBuffer | Retrieved value. To determine the required buffer size, the function has to be called with NULL. The return value of this function specifies the buffer size. |
| [in] | nBufferSize | The buffer size of the retrieved string pBuffer. |
pBuffer. 0 if either an error occurred or the returned buffer is actually NULL. To determine if an error has occurred, check the error code as described in the note section below. 0 was returned and the error code returned by PdfTools_GetLastError is different from ePdfTools_Error_Success. Get the error message with PdfTools_GetLastErrorMessage. Possible error codes:| PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsOcr_Engine_SetLanguagesA | ( | TPdfToolsOcr_Engine * | pEngine, |
| const char * | szLanguages ) |
The OCR language settings.
Set the languages used for recognition to improve detection accuracy. Note that for some engines it is crucial to set the used languages correctly. For example, ABBYY FineReader will only detect characters used in the specified languages.
Multiple languages can be specified as a comma-separated list, e.g. "German,English".
Default value: NULL (engine default)
| [in,out] | pEngine | Acts as a handle to the native object of type TPdfToolsOcr_Engine. |
| [in] | szLanguages | Set value. |
| PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsOcr_Engine_SetLanguagesW | ( | TPdfToolsOcr_Engine * | pEngine, |
| const WCHAR * | szLanguages ) |
The OCR language settings.
Set the languages used for recognition to improve detection accuracy. Note that for some engines it is crucial to set the used languages correctly. For example, ABBYY FineReader will only detect characters used in the specified languages.
Multiple languages can be specified as a comma-separated list, e.g. "German,English".
Default value: NULL (engine default)
| [in,out] | pEngine | Acts as a handle to the native object of type TPdfToolsOcr_Engine. |
| [in] | szLanguages | Set value. |
| PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsOcr_Engine_SetParametersA | ( | TPdfToolsOcr_Engine * | pEngine, |
| const char * | szParameters ) |
Engine-specific parameters.
OCR engine-specific parameters can be set to optimize performance or activate optional recognition features.
Parameters are specified as semicolon-separated key=value pairs, e.g. "PredefinedProfile=Default;Profile=/path/to/profile.ini". The available parameters depend on the OCR engine. Commonly supported parameters include:
Parameter keys are case-sensitive.
Default value: NULL
| [in,out] | pEngine | Acts as a handle to the native object of type TPdfToolsOcr_Engine. |
| [in] | szParameters | Set value. |
| PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsOcr_Engine_SetParametersW | ( | TPdfToolsOcr_Engine * | pEngine, |
| const WCHAR * | szParameters ) |
Engine-specific parameters.
OCR engine-specific parameters can be set to optimize performance or activate optional recognition features.
Parameters are specified as semicolon-separated key=value pairs, e.g. "PredefinedProfile=Default;Profile=/path/to/profile.ini". The available parameters depend on the OCR engine. Commonly supported parameters include:
Parameter keys are case-sensitive.
Default value: NULL
| [in,out] | pEngine | Acts as a handle to the native object of type TPdfToolsOcr_Engine. |
| [in] | szParameters | Set value. |
| PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsOcr_ImageOptions_GetDeskewScan | ( | TPdfToolsOcr_ImageOptions * | pImageOptions | ) |
Whether to deskew scanned pages.
This option has an effect only if the required information is provided by the OCR engine, which depends on the type and settings of the engine.
Default value: FALSE
| [in,out] | pImageOptions | Acts as a handle to the native object of type TPdfToolsOcr_ImageOptions. |
May indicate an error in certain scenarios. For further information see the note section below.
| PDFTOOLS_EXPORT TPdfToolsOcr_ImageProcessingMode PDFTOOLS_CALL PdfToolsOcr_ImageOptions_GetMode | ( | TPdfToolsOcr_ImageOptions * | pImageOptions | ) |
The mode for processing images Default value: ePdfToolsOcr_ImageProcessingMode_None.
| [in,out] | pImageOptions | Acts as a handle to the native object of type TPdfToolsOcr_ImageOptions. |
May indicate an error in certain scenarios. For further information see the note section below.
0 was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. | PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsOcr_ImageOptions_GetRemoveOnlyInvisibleOcrText | ( | TPdfToolsOcr_ImageOptions * | pImageOptions | ) |
Whether to remove only invisible OCR text (text rendering mode 3)
When used with ePdfToolsOcr_ImageProcessingMode_ReplaceText or ePdfToolsOcr_ImageProcessingMode_RemoveText, only the invisible text layer typically added by OCR engines is removed, while other text is preserved.
Default value: FALSE
| [in,out] | pImageOptions | Acts as a handle to the native object of type TPdfToolsOcr_ImageOptions. |
May indicate an error in certain scenarios. For further information see the note section below.
| PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsOcr_ImageOptions_GetRotateScan | ( | TPdfToolsOcr_ImageOptions * | pImageOptions | ) |
Whether to rotate scanned pages based on detected orientation.
This option has an effect only if the required information is provided by the OCR engine, which depends on the type and settings of the engine.
Default value: FALSE
| [in,out] | pImageOptions | Acts as a handle to the native object of type TPdfToolsOcr_ImageOptions. |
May indicate an error in certain scenarios. For further information see the note section below.
| PDFTOOLS_EXPORT TPdfToolsOcr_ImageOptions *PDFTOOLS_CALL PdfToolsOcr_ImageOptions_New | ( | void | ) |
NULL if there is an error.
NULL was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. | PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsOcr_ImageOptions_SetDeskewScan | ( | TPdfToolsOcr_ImageOptions * | pImageOptions, |
| BOOL | bDeskewScan ) |
Whether to deskew scanned pages.
This option has an effect only if the required information is provided by the OCR engine, which depends on the type and settings of the engine.
Default value: FALSE
| [in,out] | pImageOptions | Acts as a handle to the native object of type TPdfToolsOcr_ImageOptions. |
| [in] | bDeskewScan | Set value. |
| PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsOcr_ImageOptions_SetMode | ( | TPdfToolsOcr_ImageOptions * | pImageOptions, |
| TPdfToolsOcr_ImageProcessingMode | iMode ) |
The mode for processing images Default value: ePdfToolsOcr_ImageProcessingMode_None.
| [in,out] | pImageOptions | Acts as a handle to the native object of type TPdfToolsOcr_ImageOptions. |
| [in] | iMode | Set value. |
| PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsOcr_ImageOptions_SetRemoveOnlyInvisibleOcrText | ( | TPdfToolsOcr_ImageOptions * | pImageOptions, |
| BOOL | bRemoveOnlyInvisibleOcrText ) |
Whether to remove only invisible OCR text (text rendering mode 3)
When used with ePdfToolsOcr_ImageProcessingMode_ReplaceText or ePdfToolsOcr_ImageProcessingMode_RemoveText, only the invisible text layer typically added by OCR engines is removed, while other text is preserved.
Default value: FALSE
| [in,out] | pImageOptions | Acts as a handle to the native object of type TPdfToolsOcr_ImageOptions. |
| [in] | bRemoveOnlyInvisibleOcrText | Set value. |
| PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsOcr_ImageOptions_SetRotateScan | ( | TPdfToolsOcr_ImageOptions * | pImageOptions, |
| BOOL | bRotateScan ) |
Whether to rotate scanned pages based on detected orientation.
This option has an effect only if the required information is provided by the OCR engine, which depends on the type and settings of the engine.
Default value: FALSE
| [in,out] | pImageOptions | Acts as a handle to the native object of type TPdfToolsOcr_ImageOptions. |
| [in] | bRotateScan | Set value. |
| PDFTOOLS_EXPORT double PDFTOOLS_CALL PdfToolsOcr_OcrOptions_GetDpi | ( | TPdfToolsOcr_OcrOptions * | pOcrOptions | ) |
The default resolution in DPI used for OCR.
Each page's optimal OCR resolution is determined automatically, such that all images and text can be recognized. The default resolution is chosen if it is within the range of optimal resolutions.
The range should be within the resolutions supported by the OCR engine. Most OCR engines are optimized for resolutions around 300 DPI.
Default value: 300.0
| [in,out] | pOcrOptions | Acts as a handle to the native object of type TPdfToolsOcr_OcrOptions. |
May indicate an error in certain scenarios. For further information see the note section below.
-1.0 was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. Possible error codes:| PDFTOOLS_EXPORT TPdfToolsOcr_ImageOptions *PDFTOOLS_CALL PdfToolsOcr_OcrOptions_GetImageOptions | ( | TPdfToolsOcr_OcrOptions * | pOcrOptions | ) |
The options for image processing Options controlling how images in the PDF are processed during OCR.
| [in,out] | pOcrOptions | Acts as a handle to the native object of type TPdfToolsOcr_OcrOptions. |
NULL if there is an error.
NULL was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. | PDFTOOLS_EXPORT double PDFTOOLS_CALL PdfToolsOcr_OcrOptions_GetMaxDpi | ( | TPdfToolsOcr_OcrOptions * | pOcrOptions | ) |
The maximum resolution in DPI used for OCR Default value: 400.0.
| [in,out] | pOcrOptions | Acts as a handle to the native object of type TPdfToolsOcr_OcrOptions. |
May indicate an error in certain scenarios. For further information see the note section below.
-1.0 was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. Possible error codes:| PDFTOOLS_EXPORT double PDFTOOLS_CALL PdfToolsOcr_OcrOptions_GetMinDpi | ( | TPdfToolsOcr_OcrOptions * | pOcrOptions | ) |
The minimum resolution in DPI used for OCR Default value: 200.0.
| [in,out] | pOcrOptions | Acts as a handle to the native object of type TPdfToolsOcr_OcrOptions. |
May indicate an error in certain scenarios. For further information see the note section below.
-1.0 was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. Possible error codes:| PDFTOOLS_EXPORT TPdfToolsOcr_PageOptions *PDFTOOLS_CALL PdfToolsOcr_OcrOptions_GetPageOptions | ( | TPdfToolsOcr_OcrOptions * | pOcrOptions | ) |
The options for page processing Options controlling page-level OCR processing and tagging.
| [in,out] | pOcrOptions | Acts as a handle to the native object of type TPdfToolsOcr_OcrOptions. |
NULL if there is an error.
NULL was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. | PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsOcr_OcrOptions_GetProcessEmbeddedFiles | ( | TPdfToolsOcr_OcrOptions * | pOcrOptions | ) |
Whether to process embedded files recursively.
If enabled, embedded PDF files are also processed with OCR. The default is to copy all embedded files as-is.
Default value: FALSE
| [in,out] | pOcrOptions | Acts as a handle to the native object of type TPdfToolsOcr_OcrOptions. |
May indicate an error in certain scenarios. For further information see the note section below.
| PDFTOOLS_EXPORT TPdfToolsOcr_TextOptions *PDFTOOLS_CALL PdfToolsOcr_OcrOptions_GetTextOptions | ( | TPdfToolsOcr_OcrOptions * | pOcrOptions | ) |
The options for text processing Options controlling how existing text is processed during OCR.
| [in,out] | pOcrOptions | Acts as a handle to the native object of type TPdfToolsOcr_OcrOptions. |
NULL if there is an error.
NULL was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. | PDFTOOLS_EXPORT TPdfToolsOcr_OcrOptions *PDFTOOLS_CALL PdfToolsOcr_OcrOptions_New | ( | void | ) |
NULL if there is an error.
NULL was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. | PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsOcr_OcrOptions_SetDpi | ( | TPdfToolsOcr_OcrOptions * | pOcrOptions, |
| double | dDpi ) |
The default resolution in DPI used for OCR.
Each page's optimal OCR resolution is determined automatically, such that all images and text can be recognized. The default resolution is chosen if it is within the range of optimal resolutions.
The range should be within the resolutions supported by the OCR engine. Most OCR engines are optimized for resolutions around 300 DPI.
Default value: 300.0
| [in,out] | pOcrOptions | Acts as a handle to the native object of type TPdfToolsOcr_OcrOptions. |
| [in] | dDpi | Set value. |
| PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsOcr_OcrOptions_SetMaxDpi | ( | TPdfToolsOcr_OcrOptions * | pOcrOptions, |
| double | dMaxDpi ) |
The maximum resolution in DPI used for OCR Default value: 400.0.
| [in,out] | pOcrOptions | Acts as a handle to the native object of type TPdfToolsOcr_OcrOptions. |
| [in] | dMaxDpi | Set value. |
| PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsOcr_OcrOptions_SetMinDpi | ( | TPdfToolsOcr_OcrOptions * | pOcrOptions, |
| double | dMinDpi ) |
The minimum resolution in DPI used for OCR Default value: 200.0.
| [in,out] | pOcrOptions | Acts as a handle to the native object of type TPdfToolsOcr_OcrOptions. |
| [in] | dMinDpi | Set value. |
| PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsOcr_OcrOptions_SetProcessEmbeddedFiles | ( | TPdfToolsOcr_OcrOptions * | pOcrOptions, |
| BOOL | bProcessEmbeddedFiles ) |
Whether to process embedded files recursively.
If enabled, embedded PDF files are also processed with OCR. The default is to copy all embedded files as-is.
Default value: FALSE
| [in,out] | pOcrOptions | Acts as a handle to the native object of type TPdfToolsOcr_OcrOptions. |
| [in] | bProcessEmbeddedFiles | Set value. |
| PDFTOOLS_EXPORT TPdfToolsOcr_PageProcessingMode PDFTOOLS_CALL PdfToolsOcr_PageOptions_GetMode | ( | TPdfToolsOcr_PageOptions * | pPageOptions | ) |
The mode for processing pages Default value: ePdfToolsOcr_PageProcessingMode_None.
| [in,out] | pPageOptions | Acts as a handle to the native object of type TPdfToolsOcr_PageOptions. |
May indicate an error in certain scenarios. For further information see the note section below.
0 was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. | PDFTOOLS_EXPORT TPdfToolsOcr_TaggingMode PDFTOOLS_CALL PdfToolsOcr_PageOptions_GetTagging | ( | TPdfToolsOcr_PageOptions * | pPageOptions | ) |
The mode for processing tagging information Default value: ePdfToolsOcr_TaggingMode_Auto.
| [in,out] | pPageOptions | Acts as a handle to the native object of type TPdfToolsOcr_PageOptions. |
May indicate an error in certain scenarios. For further information see the note section below.
0 was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. | PDFTOOLS_EXPORT TPdfToolsOcr_PageOptions *PDFTOOLS_CALL PdfToolsOcr_PageOptions_New | ( | void | ) |
NULL if there is an error.
NULL was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. | PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsOcr_PageOptions_SetMode | ( | TPdfToolsOcr_PageOptions * | pPageOptions, |
| TPdfToolsOcr_PageProcessingMode | iMode ) |
The mode for processing pages Default value: ePdfToolsOcr_PageProcessingMode_None.
| [in,out] | pPageOptions | Acts as a handle to the native object of type TPdfToolsOcr_PageOptions. |
| [in] | iMode | Set value. |
| PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsOcr_PageOptions_SetTagging | ( | TPdfToolsOcr_PageOptions * | pPageOptions, |
| TPdfToolsOcr_TaggingMode | iTagging ) |
The mode for processing tagging information Default value: ePdfToolsOcr_TaggingMode_Auto.
| [in,out] | pPageOptions | Acts as a handle to the native object of type TPdfToolsOcr_PageOptions. |
| [in] | iTagging | Set value. |
| PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsOcr_Processor_AddWarningHandlerA | ( | TPdfToolsOcr_Processor * | pProcessor, |
| void * | pContext, | ||
| TPdfToolsOcr_Processor_WarningA | pFunction ) |
Adds event handler.
| [in,out] | pProcessor | Pointer to the object to which the event handler is added. |
| [in,out] | pContext | The context of the event handler. |
| [in] | pFunction | The event callback that is added. |
| PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsOcr_Processor_AddWarningHandlerW | ( | TPdfToolsOcr_Processor * | pProcessor, |
| void * | pContext, | ||
| TPdfToolsOcr_Processor_WarningW | pFunction ) |
Adds event handler.
| [in,out] | pProcessor | Pointer to the object to which the event handler is added. |
| [in,out] | pContext | The context of the event handler. |
| [in] | pFunction | The event callback that is added. |
| PDFTOOLS_EXPORT TPdfToolsOcr_Processor *PDFTOOLS_CALL PdfToolsOcr_Processor_New | ( | void | ) |
NULL if there is an error.
NULL was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. | PDFTOOLS_EXPORT TPdfToolsPdf_Document *PDFTOOLS_CALL PdfToolsOcr_Processor_Process | ( | TPdfToolsOcr_Processor * | pProcessor, |
| TPdfToolsPdf_Document * | pDocument, | ||
| TPdfToolsOcr_Engine * | pEngine, | ||
| const TPdfToolsSys_StreamDescriptor * | pOutStreamDesc, | ||
| TPdfToolsOcr_OcrOptions * | pOptions, | ||
| TPdfToolsPdf_OutputOptions * | pOutOptions ) |
Apply OCR to a PDF document.
Process the input PDF document with OCR according to the specified options. The processed document is written to the output stream.
Non-critical processing issues raise a TPdfToolsOcr_Processor_Warning. It is recommended to review the TPdfToolsOcr_WarningCategory and handle them if necessary for the application.
| [in,out] | pProcessor | Acts as a handle to the native object of type TPdfToolsOcr_Processor. |
| [in,out] | pDocument | The input PDF document to process |
| [in,out] | pEngine | The OCR engine to use for recognition. This parameter may be NULL for operations that do not require OCR, such as ePdfToolsOcr_ImageProcessingMode_RemoveText. For all other modes, a valid engine must be provided. |
| [in,out] | pOutStreamDesc | The stream to which the output PDF is written. The stream must support both random read and write access. |
| [in,out] | pOptions | The OCR processing options. If NULL, default options are used. |
| [in,out] | pOutOptions | The PDF output options, e.g. to encrypt the output document. |
Note that this object must be disposed before the output stream object (method argument pOutStreamDesc).
NULL if there is an error.
NULL was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. Possible error codes:NULL.| PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsOcr_Processor_RemoveWarningHandlerA | ( | TPdfToolsOcr_Processor * | pProcessor, |
| void * | pContext, | ||
| TPdfToolsOcr_Processor_WarningA | pFunction ) |
Removes event handler.
| [in,out] | pProcessor | Pointer to the object from which the event handler is removed. |
| [in,out] | pContext | The context of the event handler. |
| [in] | pFunction | The event callback that is removed. |
| PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsOcr_Processor_RemoveWarningHandlerW | ( | TPdfToolsOcr_Processor * | pProcessor, |
| void * | pContext, | ||
| TPdfToolsOcr_Processor_WarningW | pFunction ) |
Removes event handler.
| [in,out] | pProcessor | Pointer to the object from which the event handler is removed. |
| [in,out] | pContext | The context of the event handler. |
| [in] | pFunction | The event callback that is removed. |
| PDFTOOLS_EXPORT TPdfToolsOcr_TextProcessingMode PDFTOOLS_CALL PdfToolsOcr_TextOptions_GetMode | ( | TPdfToolsOcr_TextOptions * | pTextOptions | ) |
The mode for processing text Default value: ePdfToolsOcr_TextProcessingMode_None.
| [in,out] | pTextOptions | Acts as a handle to the native object of type TPdfToolsOcr_TextOptions. |
May indicate an error in certain scenarios. For further information see the note section below.
0 was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. | PDFTOOLS_EXPORT TPdfToolsOcr_TextSkipMode PDFTOOLS_CALL PdfToolsOcr_TextOptions_GetSkipMode | ( | TPdfToolsOcr_TextOptions * | pTextOptions | ) |
Define text that can be skipped from text OCR processing Default value: ePdfToolsOcr_TextSkipMode_None.
| [in,out] | pTextOptions | Acts as a handle to the native object of type TPdfToolsOcr_TextOptions. |
May indicate an error in certain scenarios. For further information see the note section below.
0 was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. | PDFTOOLS_EXPORT TPdfToolsOcr_UnicodeSource PDFTOOLS_CALL PdfToolsOcr_TextOptions_GetUnicodeSource | ( | TPdfToolsOcr_TextOptions * | pTextOptions | ) |
Define additional ToUnicode sources in addition to OCR processing Default value: ePdfToolsOcr_UnicodeSource_None.
| [in,out] | pTextOptions | Acts as a handle to the native object of type TPdfToolsOcr_TextOptions. |
May indicate an error in certain scenarios. For further information see the note section below.
0 was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. | PDFTOOLS_EXPORT TPdfToolsOcr_TextOptions *PDFTOOLS_CALL PdfToolsOcr_TextOptions_New | ( | void | ) |
NULL if there is an error.
NULL was returned. Retrieve specific error code by calling PdfTools_GetLastError. Get the error message with PdfTools_GetLastErrorMessage. | PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsOcr_TextOptions_SetMode | ( | TPdfToolsOcr_TextOptions * | pTextOptions, |
| TPdfToolsOcr_TextProcessingMode | iMode ) |
The mode for processing text Default value: ePdfToolsOcr_TextProcessingMode_None.
| [in,out] | pTextOptions | Acts as a handle to the native object of type TPdfToolsOcr_TextOptions. |
| [in] | iMode | Set value. |
| PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsOcr_TextOptions_SetSkipMode | ( | TPdfToolsOcr_TextOptions * | pTextOptions, |
| TPdfToolsOcr_TextSkipMode | iSkipMode ) |
Define text that can be skipped from text OCR processing Default value: ePdfToolsOcr_TextSkipMode_None.
| [in,out] | pTextOptions | Acts as a handle to the native object of type TPdfToolsOcr_TextOptions. |
| [in] | iSkipMode | Set value. |
| PDFTOOLS_EXPORT BOOL PDFTOOLS_CALL PdfToolsOcr_TextOptions_SetUnicodeSource | ( | TPdfToolsOcr_TextOptions * | pTextOptions, |
| TPdfToolsOcr_UnicodeSource | iUnicodeSource ) |
Define additional ToUnicode sources in addition to OCR processing Default value: ePdfToolsOcr_UnicodeSource_None.
| [in,out] | pTextOptions | Acts as a handle to the native object of type TPdfToolsOcr_TextOptions. |
| [in] | iUnicodeSource | Set value. |