# APDFL Plugins

> APDFL Plugins: 4 components, 63 items.

- Product: Adobe PDF Library 18
- Language: C++
- Version: APDFL18.0.5PlusP2d
- HTML page: https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/plugins
- Version index: https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/llms.txt

## ocrengine

### Functions (27)

#### OCREngineInitialize

```cpp
ASBool OCREngineInitialize(void)
```

Header: `OCREngineProcs.h:8`

Initializes the OCREngine Plug-in.

**Parameters**

- (unnamed) (`void`)

**Returns:** [`ASBool`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/aslayer.md#ASBool)

An ASBool value.

#### OCREngineTerminate

```cpp
void OCREngineTerminate(void)
```

Header: `OCREngineProcs.h:14`

Terminates the OCREngine Plug-in.

**Parameters**

- (unnamed) (`void`)

**Returns:** `void`

void.

#### PDOCRCreateEngine

```cpp
OCREngine PDOCRCreateEngine(OCRParams params)
```

Header: `OCREngineProcs.h:33`

Create an opaque OCREngine from the supplied parameters.

**Parameters**

- `params` ([`OCRParams`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/plugins.md#OCRParams)): IN OCRParams object used to configure the engine.

**Returns:** [`OCREngine`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/plugins.md#OCREngine)

An OCREngine that must be released with PDOCRReleaseEngine.

#### PDOCRCreateForm

```cpp
PDEForm PDOCRCreateForm(OCREngine engine, PDDoc doc, PDEImage image, ASInt32 resolution, OCRMissingFontStrategy strategy)
```

Header: `OCREngineProcs.h:59`

Recognizes Text in a PDEImage, at a specified resolution, creating a PDEForm with the Image and Text underneath it. Knowing the image's resolution can enhance recognition. NOTE: Determining the resolution of the image is the caller's responsibility. Creates a PDEForm element containing the image, and additional text underneath. The PDEForm element has a transformation matrix which makes it directly substitutable for the image in a Content stream. The PDEForm will be created in the specified document, sharing fonts with the results of recognizing text in other images. If a font that will represent all the characters in a word can't be found, the missingFontStrategy will determine the behavior to employ.

**Parameters**

- `engine` ([`OCREngine`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/plugins.md#OCREngine)): IN OCREngine object
- `doc` ([`PDDoc`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/pdlayer.md#PDDoc)): IN PDDoc object
- `image` ([`PDEImage`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/pdelayer.md#PDEImage))
- `resolution` ([`ASInt32`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/aslayer.md#ASInt32)): IN image resolution for PDEImage object, in DPI
- `strategy` ([`OCRMissingFontStrategy`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/plugins.md#OCRMissingFontStrategy)): IN specifies the behavior to take if a Font isn't available to represent the Text

**Returns:** [`PDEForm`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/pdelayer.md#PDEForm)

a PDEForm composing the supplied image with the recognized text underneath

#### PDOCRDefaultParams

```cpp
OCRParams PDOCRDefaultParams(void)
```

Header: `OCREngineProcs.h:20`

Return a reference to a set of OCRParams, already configured with defaults.

**Parameters**

- (unnamed) (`void`)

**Returns:** [`OCRParams`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/plugins.md#OCRParams)

A fresh copy of the OCRParams.

#### PDOCRGetLanguagesInstalled

```cpp
OCRLanguage * PDOCRGetLanguagesInstalled(void)
```

Header: `OCREngineProcs.h:73`

Get the Languages installed as an array of OCRLanguage elements. This array isn't modifiable. The length is given by PDOCRGetNumLanguagesInstalled().

**Parameters**

- (unnamed) (`void`)

**Returns:** [`OCRLanguage *`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/plugins.md#OCRLanguage)

an array of OCRLanguage elements.

#### PDOCRGetNumLanguagesInstalled

```cpp
ASInt32 PDOCRGetNumLanguagesInstalled(void)
```

Header: `OCREngineProcs.h:65`

Get the number of Languages installed.

**Parameters**

- (unnamed) (`void`)

**Returns:** [`ASInt32`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/aslayer.md#ASInt32)

number of languages installed.

#### PDOCRParamsGetCandidateFonts

```cpp
ASAtom * PDOCRParamsGetCandidateFonts(OCRParams params)
```

Header: `OCREngineProcs.h:210`

Get the Candidate Fonts used to try to match recognized text, as an array of ASAtoms. Each ASAtom represents a name for a font to try to use for text recognition. The default list should work well in most cases. If you're using text that isn't represented by Latin fonts, or by Chinese, Japanese, or Korean fonts, then retrieve this list, add the font that can represent that text, then set that new list on OCRParams. Enough font names must be supplied to cover the expected languages/scripts in use. The code selects a font to represent each word. If a word code-switches between different scripts, for instance, if it contains non-Latin text and Arabic numerals, then make sure to supply the name of a font family that can handle both the text and the numerals. The quality of the results depends on the font choice. The list is searched in order until a font works for a particular word. To make the text fit better, it's recommended to list proportional fonts before fixed-width fonts. Decorative fonts with flourishes, like Zapf Chancery, deliver poor results. Generally, supply a font that would be used in block text, such as in a newspaper or work of literature, such as Times Roman, or a font already in the list, like MinionPro. If the PDOCRCreateForm() function can't identify a font that covers the whole text of a word, it will follow the policy set by the OCRMissingFontStrategy parameter. Each element is an ASAtom corresponding to a string representing a candidate font. This array can only be modified by calling PDOCRParamsSetCandidateFonts(). The length is given by PDOCRParamsGetNumCandidateFonts().

**Parameters**

- `params` ([`OCRParams`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/plugins.md#OCRParams)): IN OCRParams object

**Returns:** [`ASAtom *`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/aslayer.md#ASAtom)

an array of ASAtoms

#### PDOCRParamsGetConfigParameterCount

```cpp
ASInt32 PDOCRParamsGetConfigParameterCount(OCRParams params)
```

Header: `OCREngineProcs.h:278`

Get the number of engine-specific configuration parameters currently set.

**Parameters**

- `params` ([`OCRParams`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/plugins.md#OCRParams)): IN OCRParams object to query.

**Returns:** [`ASInt32`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/aslayer.md#ASInt32)

Number of key-value pairs, or 0 if params is NULL.

#### PDOCRParamsGetConfigParameterKey

```cpp
const char * PDOCRParamsGetConfigParameterKey(OCRParams params, ASInt32 index)
```

Header: `OCREngineProcs.h:287`

Get an engine-specific configuration parameter key by index.

**Parameters**

- `params` ([`OCRParams`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/plugins.md#OCRParams)): IN OCRParams object to query.
- `index` ([`ASInt32`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/aslayer.md#ASInt32)): IN Index of the parameter (0 to count-1).

**Returns:** `const char *`

The key string, or NULL if params is NULL or index is out of range.

#### PDOCRParamsGetConfigParameterValue

```cpp
const char * PDOCRParamsGetConfigParameterValue(OCRParams params, ASInt32 index)
```

Header: `OCREngineProcs.h:296`

Get an engine-specific configuration parameter value by index.

**Parameters**

- `params` ([`OCRParams`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/plugins.md#OCRParams)): IN OCRParams object to query.
- `index` ([`ASInt32`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/aslayer.md#ASInt32)): IN Index of the parameter (0 to count-1).

**Returns:** `const char *`

The value string, or NULL if params is NULL or index is out of range.

#### PDOCRParamsGetLanguagesConfigured

```cpp
OCRLanguage * PDOCRParamsGetLanguagesConfigured(OCRParams params)
```

Header: `OCREngineProcs.h:142`

Get the Languages configured to be recognized, as an array of OCRLanguage elements. This array can only be modified by calling PDOCRParamsSetLanguagesConfigured(). The length is given by PDOCRParamsGetNumLanguagesConfigured().

**Parameters**

- `params` ([`OCRParams`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/plugins.md#OCRParams)): IN OCRParams object

**Returns:** [`OCRLanguage *`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/plugins.md#OCRLanguage)

an array of OCRLanguage elements.

#### PDOCRParamsGetNumCandidateFonts

```cpp
ASInt32 PDOCRParamsGetNumCandidateFonts(OCRParams params)
```

Header: `OCREngineProcs.h:177`

Get the Number of Candidate Fonts to try to match recognized text. The default list should work well in most cases. If you're using text that isn't represented by Latin fonts, or by Chinese, Japanese, or Korean fonts, then retrieve this list, add the font that can represent that text, then set that new list on OCRParams. Enough font names must be supplied to cover the expected languages/scripts in use. The code selects a font to represent each word. If a word code-switches between different scripts, for instance, if it contains non-Latin text and Arabic numerals, then make sure to supply the name of a font family that can handle both the text and the numerals. The quality of the results depends on the font choice. The list is searched in order until a font works for a particular word. To make the text fit better, it's recommended to list proportional fonts before fixed-width fonts. Decorative fonts with flourishes, like Zapf Chancery, deliver poor results. Generally, supply a font that would be used in block text, such as in a newspaper or work of literature, such as Times Roman, or a font already in the list, like MinionPro. If the PDOCRCreateForm() function can't identify a font that covers the whole text of a word, it will follow the policy set by the OCRMissingFontStrategy parameter.

**Parameters**

- `params` ([`OCRParams`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/plugins.md#OCRParams)): IN OCRParams object

**Returns:** [`ASInt32`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/aslayer.md#ASInt32)

the number of candidate font members in the OCRParams

#### PDOCRParamsGetNumLanguagesConfigured

```cpp
ASInt32 PDOCRParamsGetNumLanguagesConfigured(OCRParams params)
```

Header: `OCREngineProcs.h:132`

Get the Number of Languages configured to be recognized.

**Parameters**

- `params` ([`OCRParams`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/plugins.md#OCRParams)): IN OCRParams object

**Returns:** [`ASInt32`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/aslayer.md#ASInt32)

the number of languages currently configured in the OCRParams object

#### PDOCRParamsGetPageSegmentationMode

```cpp
OCRPageSegmentationMode PDOCRParamsGetPageSegmentationMode(OCRParams params)
```

Header: `OCREngineProcs.h:116`

Get the page segmentation mode parameter for an OCRParams object. Specifies how the OCR engine will view the page, and how it detects text segments.

**Parameters**

- `params` ([`OCRParams`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/plugins.md#OCRParams)): IN OCRParams object

**Returns:** [`OCRPageSegmentationMode`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/plugins.md#OCRPageSegmentationMode)

the OCRPageSegmentationMode value set in the OCRParams object.

#### PDOCRParamsGetPerformance

```cpp
OCRPerformance PDOCRParamsGetPerformance(OCRParams params)
```

Header: `OCREngineProcs.h:80`

Get the performance parameter from an OCRParams object.

**Parameters**

- `params` ([`OCRParams`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/plugins.md#OCRParams)): IN OCRParams object

**Returns:** [`OCRPerformance`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/plugins.md#OCRPerformance)

the OCRPerformance value set in the OCRParams object.

#### PDOCRParamsGetPreprocessing

```cpp
ASBool PDOCRParamsGetPreprocessing(OCRParams params)
```

Header: `OCREngineProcs.h:97`

Get the Preprocessing setting. Indicates if image preprocessing (including rescaling, denoising, and deskewing) is enabled before OCR to improve character recognition.

**Parameters**

- `params` ([`OCRParams`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/plugins.md#OCRParams)): IN OCRParams object

**Returns:** [`ASBool`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/aslayer.md#ASBool)

the state of the preprocess flag

#### PDOCRParamsResetConfigParameters

```cpp
void PDOCRParamsResetConfigParameters(OCRParams params)
```

Header: `OCREngineProcs.h:270`

Clear all previously set engine-specific configuration parameters.

**Parameters**

- `params` ([`OCRParams`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/plugins.md#OCRParams)): IN OCRParams object to be modified.

**Returns:** `void`

#### PDOCRParamsSetCandidateFonts

```cpp
void PDOCRParamsSetCandidateFonts(OCRParams params, ASAtom *fonts, ASInt32 numFonts)
```

Header: `OCREngineProcs.h:240`

Set the Candidate Fonts used to try to match recognized text. The default list should work well in most cases. If you're using text that isn't represented by Latin fonts, or by Chinese, Japanese, or Korean fonts, then retrieve this list, add the font that can represent that text, then set that new list on OCRParams. Enough font names must be supplied to cover the expected languages/scripts in use. The code selects a font to represent each word. If a word code-switches between different scripts, for instance, if it contains non-Latin text and Arabic numerals, then make sure to supply the name of a font family that can handle both the text and the numerals. The quality of the results depends on the font choice. The list is searched in order until a font works for a particular word. To make the text fit better, it's recommended to list proportional fonts before fixed-width fonts. Decorative fonts with flourishes, like Zapf Chancery, deliver poor results. Generally, supply a font that would be used in block text, such as in a newspaper or work of literature, such as Times Roman, or a font already in the list, like MinionPro. If the PDOCRCreateForm() function can't identify a font that covers the whole text of a word, it will follow the policy set by the OCRMissingFontStrategy parameter. Each element is an ASAtom corresponding to a string representing a candidate font.

**Parameters**

- `params` ([`OCRParams`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/plugins.md#OCRParams)): IN OCRParams object
- `fonts` ([`ASAtom *`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/aslayer.md#ASAtom)): IN an array of ASAtoms to set as candidate fonts
- `numFonts` ([`ASInt32`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/aslayer.md#ASInt32)): the size of the fonts array

**Returns:** `void`

#### PDOCRParamsSetConfigParameter

```cpp
ASBool PDOCRParamsSetConfigParameter(OCRParams params, const char *key, const char *value)
```

Header: `OCREngineProcs.h:263`

Set an engine-specific configuration parameter. Multiple calls accumulate parameters. Calling with the same key replaces the previous value. These parameters are passed through to the underlying OCR engine (e.g., Tesseract) as engine-specific settings. See the OCR engine documentation for valid parameter names and values.

**Parameters**

- `params` ([`OCRParams`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/plugins.md#OCRParams)): IN OCRParams object to be modified.
- `key` (`const char *`): IN Parameter name (will be copied). Must not be NULL.
- `value` (`const char *`): IN Parameter value (will be copied). Must not be NULL.

**Returns:** [`ASBool`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/aslayer.md#ASBool)

true on success, false on failure (e.g., NULL params/key/value or memory allocation failure).

#### PDOCRParamsSetLanguagesConfigured

```cpp
void PDOCRParamsSetLanguagesConfigured(OCRParams params, OCRLanguage *languages, ASInt32 numLanguages)
```

Header: `OCREngineProcs.h:150`

Set the Languages configured to be recognized, as an array of OCRLanguage elements.

**Parameters**

- `params` ([`OCRParams`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/plugins.md#OCRParams)): IN OCRParams object
- `languages` ([`OCRLanguage *`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/plugins.md#OCRLanguage)): IN languages to configure OCREngine with
- `numLanguages` ([`ASInt32`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/aslayer.md#ASInt32)): the size of the languages array

**Returns:** `void`

#### PDOCRParamsSetPageSegmentationMode

```cpp
void PDOCRParamsSetPageSegmentationMode(OCRParams params, OCRPageSegmentationMode pageSegmentationMode)
```

Header: `OCREngineProcs.h:125`

Set the page segementation mode parameter for an OCRParams object. Specifies how the OCR engine will view the page, and how it detects text segments.

**Parameters**

- `params` ([`OCRParams`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/plugins.md#OCRParams)): IN OCRParams object to be modified.
- `pageSegmentationMode` ([`OCRPageSegmentationMode`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/plugins.md#OCRPageSegmentationMode))

**Returns:** `void`

#### PDOCRParamsSetPerformance

```cpp
void PDOCRParamsSetPerformance(OCRParams params, OCRPerformance performance)
```

Header: `OCREngineProcs.h:87`

Set the performance parameter for an OCRParams object.

**Parameters**

- `params` ([`OCRParams`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/plugins.md#OCRParams)): IN OCRParams object to be modified.
- `performance` ([`OCRPerformance`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/plugins.md#OCRPerformance)): IN the OCRPerformance value to set on the OCRParams object.

**Returns:** `void`

#### PDOCRParamsSetPreprocessing

```cpp
void PDOCRParamsSetPreprocessing(OCRParams params, ASBool preprocessing)
```

Header: `OCREngineProcs.h:107`

Set the Preprocessing setting. Indicates if image preprocessing (including rescaling, denoising, and deskewing) is enabled before OCR to improve character recognition.

**Parameters**

- `params` ([`OCRParams`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/plugins.md#OCRParams)): IN OCRParams object
- `preprocessing` ([`ASBool`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/aslayer.md#ASBool)): IN whether to preprocess before OCR

**Returns:** `void`

#### PDOCRRecognizePage

```cpp
void PDOCRRecognizePage(PDPage page, OCREngine engine, OCRMissingFontStrategy strategy)
```

Header: `OCREngineProcs.h:249`

Run optical character recognition (OCR) on a page.

**Parameters**

- `page` ([`PDPage`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/pdlayer.md#PDPage)): IN The page being OCR'd
- `engine` ([`OCREngine`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/plugins.md#OCREngine)): IN Configured OCREngine object
- `strategy` ([`OCRMissingFontStrategy`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/plugins.md#OCRMissingFontStrategy)): IN specifies the behavior to take if a Font isn't available to represent the Text

**Returns:** `void`

#### PDOCRReleaseEngine

```cpp
void PDOCRReleaseEngine(OCREngine engine)
```

Header: `OCREngineProcs.h:39`

Release an OCREngine created with PDOCRCreateEngine.

**Parameters**

- `engine` ([`OCREngine`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/plugins.md#OCREngine)): IN OCREngine to be released.

**Returns:** `void`

#### PDOCRReleaseParams

```cpp
void PDOCRReleaseParams(OCRParams params)
```

Header: `OCREngineProcs.h:26`

Release an OCRParams obtained with PDOCRDefaultParams.

**Parameters**

- `params` ([`OCRParams`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/plugins.md#OCRParams)): IN OCRParams object to be released.

**Returns:** `void`

### Structures (2)

#### OCREngine

```cpp
typedef struct _t_OCREngineRec* OCREngine
```

Header: `OCREngineExpT.h:205`

#### OCRParams

```cpp
typedef struct _t_OCRParamsRec* OCRParams
```

Header: `OCREngineExpT.h:203`

### Enums (4)

#### OCRLanguage

Header: `OCREngineExpT.h:70`

Enumeration to specify the language.

**Values**

- `OCRLanguage_English = 0`
- `OCRLanguage_Dutch = 1`
- `OCRLanguage_French = 2`
- `OCRLanguage_German = 3`
- `OCRLanguage_Italian = 4`
- `OCRLanguage_Portuguese = 5`
- `OCRLanguage_Spanish = 6`
- `OCRLanguage_Arabic = 7`
- `OCRLanguage_Armenian = 8`
- `OCRLanguage_ChineseTraditional = 9`
- `OCRLanguage_ChineseTraditionalVertical = 10`
- `OCRLanguage_ChineseSimplified = 11`
- `OCRLanguage_ChineseSimplifiedVertical = 12`
- `OCRLanguage_Japanese = 13`
- `OCRLanguage_JapaneseVertical = 14`
- `OCRLanguage_Korean = 15`
- `OCRLanguage_KoreanVertical = 16`
- `OCRLanguage_Afrikaans = 17`
- `OCRLanguage_Amharic = 18`
- `OCRLanguage_Assamese = 19`
- `OCRLanguage_Azerbaijani = 20`
- `OCRLanguage_AzerbaijaniCyrillic = 21`
- `OCRLanguage_Belarusian = 22`
- `OCRLanguage_Bengali = 23`
- `OCRLanguage_Tibetan = 24`
- `OCRLanguage_Bosnian = 25`
- `OCRLanguage_Breton = 26`
- `OCRLanguage_Bulgarian = 27`
- `OCRLanguage_Catalan = 28`
- `OCRLanguage_Corsican = 29`
- `OCRLanguage_Cebuano = 30`
- `OCRLanguage_Czech = 31`
- `OCRLanguage_Cherokee = 32`
- `OCRLanguage_Welsh = 33`
- `OCRLanguage_Danish = 34`
- `OCRLanguage_DanishFraktur = 35`
- `OCRLanguage_Dhivehi = 36`
- `OCRLanguage_Dzongkha = 37`
- `OCRLanguage_Greek = 38`
- `OCRLanguage_EnglishMiddle = 39`
- `OCRLanguage_Esperanto = 40`
- `OCRLanguage_MathEquationDetection = 41`
- `OCRLanguage_Estonian = 42`
- `OCRLanguage_Faroese = 43`
- `OCRLanguage_Basque = 44`
- `OCRLanguage_Persian = 45`
- `OCRLanguage_Finnish = 46`
- `OCRLanguage_Filipino = 47`
- `OCRLanguage_GermanFraktur = 48`
- `OCRLanguage_FrenchMiddle = 49`
- `OCRLanguage_Frisian = 50`
- `OCRLanguage_Irish = 51`
- `OCRLanguage_Galician = 52`
- `OCRLanguage_ScotsGaelic = 53`
- `OCRLanguage_GreekAncient = 54`
- `OCRLanguage_Gujarati = 55`
- `OCRLanguage_Haitian = 56`
- `OCRLanguage_Hebrew = 57`
- `OCRLanguage_Hindi = 58`
- `OCRLanguage_Croatian = 59`
- `OCRLanguage_Hungarian = 60`
- `OCRLanguage_Inuktitut = 61`
- `OCRLanguage_Indonesian = 62`
- `OCRLanguage_Icelandic = 63`
- `OCRLanguage_ItalianOld = 64`
- `OCRLanguage_Javanese = 65`
- `OCRLanguage_Kannada = 66`
- `OCRLanguage_Georgian = 67`
- `OCRLanguage_GeorgianOld = 68`
- `OCRLanguage_Kazakh = 69`
- `OCRLanguage_CentralKhmer = 70`
- `OCRLanguage_Kyrgyz = 71`
- `OCRLanguage_Kurmanji = 72`
- `OCRLanguage_KurdishArabicScript = 73`
- `OCRLanguage_Lao = 74`
- `OCRLanguage_Latin = 75`
- `OCRLanguage_Latvian = 76`
- `OCRLanguage_Lithuanian = 77`
- `OCRLanguage_Luxembourgish = 78`
- `OCRLanguage_Malayalam = 79`
- `OCRLanguage_Marathi = 80`
- `OCRLanguage_Macedonian = 81`
- `OCRLanguage_Maltese = 82`
- `OCRLanguage_Mongolian = 83`
- `OCRLanguage_Maori = 84`
- `OCRLanguage_Malay = 85`
- `OCRLanguage_Burmese = 86`
- `OCRLanguage_Nepali = 87`
- `OCRLanguage_Norwegian = 88`
- `OCRLanguage_Occitan = 89`
- `OCRLanguage_Oriya = 90`
- `OCRLanguage_OrientationAndScriptDetection = 91`
- `OCRLanguage_Panjabi = 92`
- `OCRLanguage_Polish = 93`
- `OCRLanguage_Pashto = 94`
- `OCRLanguage_Quechua = 95`
- `OCRLanguage_Romanian = 96`
- `OCRLanguage_Russian = 97`
- `OCRLanguage_Sanskrit = 98`
- `OCRLanguage_Sinhala = 99`
- `OCRLanguage_Slovak = 100`
- `OCRLanguage_SlovakFraktur = 101`
- `OCRLanguage_Slovenian = 102`
- `OCRLanguage_Sindhi = 103`
- `OCRLanguage_SpanishOld = 104`
- `OCRLanguage_Albanian = 105`
- `OCRLanguage_Serbian = 106`
- `OCRLanguage_SerbianLatin = 107`
- `OCRLanguage_Sundanese = 108`
- `OCRLanguage_Swahili = 109`
- `OCRLanguage_Swedish = 110`
- `OCRLanguage_Syriac = 111`
- `OCRLanguage_Tamil = 112`
- `OCRLanguage_Tatar = 113`
- `OCRLanguage_Telugu = 114`
- `OCRLanguage_Tajik = 115`
- `OCRLanguage_Tagalog = 116`
- `OCRLanguage_Thai = 117`
- `OCRLanguage_Tigrinya = 118`
- `OCRLanguage_Tonga = 119`
- `OCRLanguage_Turkish = 120`
- `OCRLanguage_Uyghur = 121`
- `OCRLanguage_Ukrainian = 122`
- `OCRLanguage_Urdu = 123`
- `OCRLanguage_Uzbek = 124`
- `OCRLanguage_UzbekCyrillic = 125`
- `OCRLanguage_Vietnamese = 126`
- `OCRLanguage_Yiddish = 127`
- `OCRLanguage_Yoruba = 128`
- `OCRLanguage_None = 129`

#### OCRMissingFontStrategy

Header: `OCREngineExpT.h:12`

Enumeration to specify how to handle missing fonts during OCR.

**Values**

- `OCRMissingFontStrategy_Raise = 0`: Raise an exception.
- `OCRMissingFontStrategy_Ignore = 1`: Ignore the missing font and continue recognizing the next word of text.
- `OCRMissingFontStrategy_ReplacementText = 2`: Replace the characters of text with the Unicode replacement Character. NOTE: the CandidateFontsNames member of the OCRParams instance must include a Font that can represent this character or an exception will be raised.

#### OCRPageSegmentationMode

Header: `OCREngineExpT.h:40`

Enumeration to specify how the OCR engine will view the page, and how it detects text segments.

**Values**

- `OCRPageSegmentationMode_OSDOnly = 0`: Orientation and script detection (OSD).
- `OCRPageSegmentationMode_AutomaticOSD = 1`: Automatic page segmentation with OSD.
- `OCRPageSegmentationMode_Automatic = 2`: Automatic without OSD.
- `OCRPageSegmentationMode_SingleColumn = 3`: Assume a single column of text.
- `OCRPageSegmentationMode_SingleBlockVertical = 4`: Assume a single block of vertically aligned text.
- `OCRPageSegmentationMode_SingleBlock = 5`: Assume a single block of text.
- `OCRPageSegmentationMode_SingleLine = 6`: Assume a single line of text.
- `OCRPageSegmentationMode_SingleWord = 7`: Assume a single word.
- `OCRPageSegmentationMode_CircleWord = 8`: Assume a single word in a circle.
- `OCRPageSegmentationMode_SingleChar = 9`: Assume a single char.
- `OCRPageSegmentationMode_SparseText = 10`: Find all text in no particular order.
- `OCRPageSegmentationMode_SparseTextOSD = 11`: Sparse text with OSD.
- `OCRPageSegmentationMode_RawLine = 12`: Treat as a raw line with no input processing.

#### OCRPerformance

Header: `OCREngineExpT.h:24`

Enumeration to specify OCR performance.

**Values**

- `OCRPerformance_Default = 0`: Default performance.

  The default performance is useful for most scenarios and is a reasonable tradeoff of speed vs. accuracy, thus suitable for most languages.
- `OCRPerformance_Accuracy = 1`: Blend accuracy with speed.
- `OCRPerformance_MoreAccuracy = 2`: Favor accuracy over speed.
- `OCRPerformance_BestAccuracy = 3`: Best possible accuracy.

## pdflattener

### Functions (6)

#### PDFlattenerConvert

```cpp
ASBool PDFlattenerConvert(PDDoc aPDDoc, PDFlatten flattenParams, float transQuality, ASUns32 firstPage, ASUns32 lastPage, ASUns32 *numFlattenedPages, ASUns32 flags)
```

Header: `PDFlattenerProcs.h:37`

Flatten a PDF file.

**Parameters**

- `aPDDoc` ([`PDDoc`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/pdlayer.md#PDDoc)): The input PDDoc which we want to Flatten. The output will be in the same PDDoc.
- `flattenParams` ([`PDFlatten`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/pdfllayer.md#PDFlatten)): Input parameters for flattening.
- `transQuality` (`float`)
- `firstPage` ([`ASUns32`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/aslayer.md#ASUns32)): The first page of aPDDoc which we want to Flatten.
- `lastPage` ([`ASUns32`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/aslayer.md#ASUns32)): The last page of aPDDoc which we want to Flatten.
- `numFlattenedPages` ([`ASUns32 *`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/aslayer.md#ASUns32)): set to the number of pages that are flattened.
- `flags` ([`ASUns32`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/aslayer.md#ASUns32)): Kept for future use. Default to 0.

**Returns:** [`ASBool`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/aslayer.md#ASBool)

1 on success.

#### PDFlattenerConvertEx

```cpp
ASBool PDFlattenerConvertEx(PDDoc aPDDoc, PDFlatten flattenParams, float transQuality, ASUns32 firstPage, ASUns32 lastPage, ASUns32 *numFlattenedPages, ASUns32 flags, FlattenProgressMonitor FlattenProgress, void *progressClientData)
```

Header: `PDFlattenerProcs.h:58`

Flatten a PDF file.

**Parameters**

- `aPDDoc` ([`PDDoc`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/pdlayer.md#PDDoc)): The input PDDoc which we want to Flatten. The output will be in the same PDDoc.
- `flattenParams` ([`PDFlatten`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/pdfllayer.md#PDFlatten)): Input parameters for flattening.
- `transQuality` (`float`)
- `firstPage` ([`ASUns32`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/aslayer.md#ASUns32)): The first page of aPDDoc which we want to Flatten.
- `lastPage` ([`ASUns32`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/aslayer.md#ASUns32)): The last page of aPDDoc which we want to Flatten.
- `numFlattenedPages` ([`ASUns32 *`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/aslayer.md#ASUns32)): set to the number of pages that are flattened.
- `flags` ([`ASUns32`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/aslayer.md#ASUns32)): Kept for future use. Default to 0.
- `FlattenProgress` ([`FlattenProgressMonitor`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/plugins.md#FlattenProgressMonitor)): the callback which we want to register with the plug-in.
- `progressClientData` (`void *`): any client data which client wants to get back with the callback for its own reference.

**Returns:** [`ASBool`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/aslayer.md#ASBool)

1 on success.

#### PDFlattenerConvertEx2

```cpp
ASBool PDFlattenerConvertEx2(PDDoc aPDDoc, ASUns32 firstPage, ASUns32 lastPage, ASUns32 *numFlattenedPages, PDFlattenerUserParams userParams)
```

Header: `PDFlattenerProcs.h:69`

Flatten a PDF file.

**Parameters**

- `aPDDoc` ([`PDDoc`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/pdlayer.md#PDDoc)): The input PDDoc which we want to Flatten. The output will be in the same PDDoc.
- `firstPage` ([`ASUns32`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/aslayer.md#ASUns32)): The first page of aPDDoc which we want to Flatten.
- `lastPage` ([`ASUns32`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/aslayer.md#ASUns32)): The last page of aPDDoc which we want to Flatten.
- `numFlattenedPages` ([`ASUns32 *`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/aslayer.md#ASUns32)): set to the number of pages that are flattened.
- `userParams` ([`PDFlattenerUserParams`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/plugins.md#PDFlattenerUserParams)): A structure object defined for user set parameters e.g flattenParams, transquality, Blending Colorspace profile, progress monitor and Compression Settings.

**Returns:** [`ASBool`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/aslayer.md#ASBool)

1 on success.

#### PDFlattenerConvertEx3

```cpp
ASBool PDFlattenerConvertEx3(PDDoc aPDDoc, ASUns32 firstPage, ASUns32 lastPage, ASUns32 *numFlattenedPages, PDFlattenerUserParams userParams, ASBool embedFlattenerProfiles)
```

Header: `PDFlattenerProcs.h:81`

Flatten a PDF file.

**Parameters**

- `aPDDoc` ([`PDDoc`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/pdlayer.md#PDDoc)): The input PDDoc which we want to Flatten. The output will be in the same PDDoc.
- `firstPage` ([`ASUns32`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/aslayer.md#ASUns32)): The first page of aPDDoc which we want to Flatten.
- `lastPage` ([`ASUns32`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/aslayer.md#ASUns32)): The last page of aPDDoc which we want to Flatten.
- `numFlattenedPages` ([`ASUns32 *`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/aslayer.md#ASUns32)): set to the number of pages that are flattened.
- `userParams` ([`PDFlattenerUserParams`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/plugins.md#PDFlattenerUserParams)): A structure object defined for user set parameters e.g flattenParams, transquality, Blending Colorspace profile, progress monitor and Compression Settings.
- `embedFlattenerProfiles` ([`ASBool`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/aslayer.md#ASBool)): embed Flattener color profiles.

**Returns:** [`ASBool`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/aslayer.md#ASBool)

1 on success.

#### PDFlattenerInitialize

```cpp
ASBool PDFlattenerInitialize(void)
```

Header: `PDFlattenerProcs.h:25`

Initialises the PDFlattener Plug-in.

**Parameters**

- (unnamed) (`void`)

**Returns:** [`ASBool`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/aslayer.md#ASBool)

An ASBool value.

#### PDFlattenerTerminate

```cpp
void PDFlattenerTerminate(void)
```

Header: `PDFlattenerProcs.h:44`

Terminates the PDFlattener Plug-in.

**Parameters**

- (unnamed) (`void`)

**Returns:** `void`

void.

### Typedefs (1)

#### FlattenProgressMonitor

```cpp
typedef ASBool(* FlattenProgressMonitor) (ASInt32 pageNum, ASInt32 totalPages, float current, ASInt32 reserved, void *clientData))(ASInt32 pageNum, ASInt32 totalPages, float current, ASInt32 reserved, void *clientData)
```

Header: `PDFlattenerExpT.h:91`

Prototype of the callback which is registered by the client with the plug-in

### Structures (1)

#### PDFlattenerUserParams

```cpp
typedef  struct PDFlattenerUserParamsRec * PDFlattenerUserParams
```

Header: `PDFlattenerExpT.h:154`

### Enums (5)

#### PDFlattenerColorCompSet

Header: `PDFlattenerExpT.h:27`

Enumeration for setting compression scheme for flattened color images.

**Values**

- `kPDFlattenerJpegCompression = 0`
- `kPDFlattenerZipCompression = 1`
- `kPDFlattenerJpeg2000Compression = 2`

#### PDFlattenerGrayscaleCompSet

Header: `PDFlattenerExpT.h:36`

Enumeration for setting the compression scheme for the Flattened Grayscale images.

**Values**

- `kPDFlattenerGrayJpegCompression = 0`
- `kPDFlattenerGrayZipCompression = 1`
- `kPDFlattenerGrayJpeg2000Compression = 2`

#### PDFlattenerMonochromeCompSet

Header: `PDFlattenerExpT.h:45`

Enumeration for setting the compression scheme for the Flattened Monochrome images.

**Values**

- `kPDFlattenerMonoCCITTGroup3Compression = 0`
- `kPDFlattenerMonoCCITTGroup4Compression = 1`
- `kPDFlattenerMonoZipCompression = 2`
- `kPDFlattenerMonoRunLengthCompression = 3`

#### PDFlattenerQualitySetting

Header: `PDFlattenerExpT.h:55`

Enumeration for setting the Quality setting for the JPEG or JPEG2000 images.

**Values**

- `kPDFlattenerMinimum = 0`
- `kPDFlattenerLow = 1`
- `kPDFlattenerMedium = 2`
- `kPDFlattenerHigh = 3`
- `kPDFlattenerMaximum = 4`
- `kPDFlattenerJpeg2000Lossless = 5`

#### kPDFlattenerFlags

Header: `PDFlattenerExpT.h:184`

**Values**

- `kPDFlattenerCompressColorImagesZIP = 0x01`: Setting this flag will choose the ZIP compression scheme (Flate encoding) for compressing the color images. Otherwise we will stick to the current default behavior and try to use JPEG compression wherever possible.

## pdfprocessor

### Functions (6)

#### PDFProcessorConvertAndSaveToPDFA

```cpp
ASBool PDFProcessorConvertAndSaveToPDFA(PDDoc srcPDDoc, ASPathName outputFilePath, ASFileSys outputFileSystem, PDFProcessorPDFAConversionOption option, PDFProcessorPDFAConvertParams userParams)
```

Header: `PDFProcessorProcs.h:36`

Processes a PDF file, converts it to a PDF/A standard, and saves the output document to disk .

**Parameters**

- `srcPDDoc` ([`PDDoc`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/pdlayer.md#PDDoc)): Input PDDoc to be converted.
- `outputFilePath` ([`ASPathName`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/aslayer.md#ASPathName)): Output file path complete with the name of the PDF file we want to save the output to.
- `outputFileSystem` ([`ASFileSys`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/aslayer.md#ASFileSys))
- `option` ([`PDFProcessorPDFAConversionOption`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/plugins.md#PDFProcessorPDFAConversionOption)): Define the PDF/A conversion option.
- `userParams` ([`PDFProcessorPDFAConvertParams`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/plugins.md#PDFProcessorPDFAConvertParams)): Parameters to control the conversion. @Return True if conversion is successful. Will throw an exception in case of errors.

**Returns:** [`ASBool`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/aslayer.md#ASBool)

#### PDFProcessorConvertAndSaveToPDFX

```cpp
ASBool PDFProcessorConvertAndSaveToPDFX(PDDoc srcPDDoc, ASPathName outputFilePath, ASFileSys outputFileSystem, PDFProcessorPDFXConversionOption option, PDFProcessorPDFXConvertParams userParams)
```

Header: `PDFProcessorProcs.h:66`

Processes a PDF file, converts it to a PDF/X standard and saves it to disk.

**Parameters**

- `srcPDDoc` ([`PDDoc`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/pdlayer.md#PDDoc)): Input PDDoc to be converted.
- `outputFilePath` ([`ASPathName`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/aslayer.md#ASPathName)): Output file path complete with the name of the PDF file we want to save the output to.
- `outputFileSystem` ([`ASFileSys`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/aslayer.md#ASFileSys))
- `option` ([`PDFProcessorPDFXConversionOption`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/plugins.md#PDFProcessorPDFXConversionOption)): Define the PDF/X conversion option.
- `userParams` ([`PDFProcessorPDFXConvertParams`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/plugins.md#PDFProcessorPDFXConvertParams)): Parameters to control the conversion. @Return True if conversion is successful. Will throw an exception in case of errors.

**Returns:** [`ASBool`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/aslayer.md#ASBool)

#### PDFProcessorConvertToPDFA

```cpp
ASBool PDFProcessorConvertToPDFA(PDDoc srcPDDoc, PDDoc *outPDDoc, PDFProcessorPDFAConversionOption option, PDFProcessorPDFAConvertParams userParams, PDDocSaveParams outSaveParams)
```

Header: `PDFProcessorProcs.h:48`

Processes a PDF file and provides a pointer to the converted PDDoc.

**Parameters**

- `srcPDDoc` ([`PDDoc`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/pdlayer.md#PDDoc)): Input PDDoc to be converted.
- `outPDDoc` ([`PDDoc *`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/pdlayer.md#PDDoc))
- `option` ([`PDFProcessorPDFAConversionOption`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/plugins.md#PDFProcessorPDFAConversionOption)): Define the PDF/A conversion option.
- `userParams` ([`PDFProcessorPDFAConvertParams`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/plugins.md#PDFProcessorPDFAConvertParams)): Parameters to control the conversion.
- `outSaveParams` ([`PDDocSaveParams`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/pdlayer.md#PDDocSaveParams))

**Returns:** [`ASBool`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/aslayer.md#ASBool)

#### PDFProcessorConvertToPDFX

```cpp
ASBool PDFProcessorConvertToPDFX(PDDoc srcPDDoc, PDDoc *outPDDoc, PDFProcessorPDFXConversionOption option, PDFProcessorPDFXConvertParams userParams, PDDocSaveParams outSaveParams)
```

Header: `PDFProcessorProcs.h:78`

Processes a PDF file, and provides a pointer to the converted PDDoc.

**Parameters**

- `srcPDDoc` ([`PDDoc`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/pdlayer.md#PDDoc)): Input PDDoc to be converted.
- `outPDDoc` ([`PDDoc *`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/pdlayer.md#PDDoc))
- `option` ([`PDFProcessorPDFXConversionOption`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/plugins.md#PDFProcessorPDFXConversionOption)): Define the PDF/X conversion option.
- `userParams` ([`PDFProcessorPDFXConvertParams`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/plugins.md#PDFProcessorPDFXConvertParams)): Parameters to control the conversion.
- `outSaveParams` ([`PDDocSaveParams`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/pdlayer.md#PDDocSaveParams))

**Returns:** [`ASBool`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/aslayer.md#ASBool)

#### PDFProcessorInitialize

```cpp
ASBool PDFProcessorInitialize(void)
```

Header: `PDFProcessorProcs.h:25`

Initialises the PDFProcessor Plug-in.

**Parameters**

- (unnamed) (`void`)

**Returns:** [`ASBool`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/aslayer.md#ASBool)

An ASBool value.

#### PDFProcessorTerminate

```cpp
void PDFProcessorTerminate(void)
```

Header: `PDFProcessorProcs.h:55`

Terminates the PDFProcessor Plug-in.

**Parameters**

- (unnamed) (`void`)

**Returns:** `void`

void.

### Typedefs (1)

#### PDFProcessorProgressMon

```cpp
typedef ASBool(* PDFProcessorProgressMon) (ASInt32 pageNum, ASInt32 totalPages, float current, void *clientData))(ASInt32 pageNum, ASInt32 totalPages, float current, void *clientData)
```

Header: `PDFProcessorExpT.h:132`

Prototype of the callback which is registered by the client with the plug-in

### Structures (2)

#### PDFProcessorPDFAConvertParams

```cpp
typedef  struct PDFProcessorPDFAConvertParamsRec * PDFProcessorPDFAConvertParams
```

Header: `PDFProcessorExpT.h:229`

#### PDFProcessorPDFXConvertParams

```cpp
typedef  struct PDFProcessorPDFXConvertParamsRec * PDFProcessorPDFXConvertParams
```

Header: `PDFProcessorExpT.h:296`

### Enums (5)

#### PDFProcessorColorCompressionSet

Header: `PDFProcessorExpT.h:100`

Enumeration for setting compression scheme for Color Images.

**Values**

- `kPDFProcessorColorJpegCompression = 0`
- `kPDFProcessorColorZipCompression = 1`
- `kPDFProcessorColorJpeg2000Compression = 2`

#### PDFProcessorGrayscaleCompressionSet

Header: `PDFProcessorExpT.h:109`

Enumeration for setting compression scheme for Grayscale Images.

**Values**

- `kPDFProcessorGrayJpegCompression = 0`
- `kPDFProcessorGrayZipCompression = 1`
- `kPDFProcessorGrayJpeg2000Compression = 2`

#### PDFProcessorMonochromeCompressionSet

Header: `PDFProcessorExpT.h:118`

Enumeration for setting compression scheme for Monochrome Images.

**Values**

- `kPDFProcessorMonoCCITTGroup3Compression = 0`
- `kPDFProcessorMonoCCITTGroup4Compression = 1`
- `kPDFProcessorMonoZipCompression = 2`
- `kPDFProcessorMonoRunLengthCompression = 3`

#### PDFProcessorPDFAConversionOption

Header: `PDFProcessorExpT.h:30`

This is used to select which particular PDF/A standard we want to convert to.

**Values**

- `kPDFProcessorConvertToPDFA1aRGB = 0`: Convert to PDF/A-1a RGB
- `kPDFProcessorConvertToPDFA1aCMYK = 1`: Convert to PDF/A-1a CMYK
- `kPDFProcessorConvertToPDFA1bRGB = 2`: Convert to PDF/A-1b RGB
- `kPDFProcessorConvertToPDFA1bCMYK = 3`: Convert to PDF/A-1b CMYK
- `kPDFProcessorConvertToPDFA2aRGB = 4`: Convert to PDF/A-2a RGB
- `kPDFProcessorConvertToPDFA2aCMYK = 5`: Convert to PDF/A-2a CMYK
- `kPDFProcessorConvertToPDFA2bRGB = 6`: Convert to PDF/A-2b RGB
- `kPDFProcessorConvertToPDFA2bCMYK = 7`: Convert to PDF/A-2b CMYK
- `kPDFProcessorConvertToPDFA2uRGB = 8`: Convert to PDF/A-2u RGB
- `kPDFProcessorConvertToPDFA2uCMYK = 9`: Convert to PDF/A-2u CMYK
- `kPDFProcessorConvertToPDFA3aRGB = 10`: Convert to PDF/A-3a RGB
- `kPDFProcessorConvertToPDFA3aCMYK = 11`: Convert to PDF/A-3a CMYK
- `kPDFProcessorConvertToPDFA3bRGB = 12`: Convert to PDF/A-3b RGB
- `kPDFProcessorConvertToPDFA3bCMYK = 13`: Convert to PDF/A-3b CMYK
- `kPDFProcessorConvertToPDFA3uRGB = 14`: Convert to PDF/A-3u RGB
- `kPDFProcessorConvertToPDFA3uCMYK = 15`: Convert to PDF/A-3u CMYK
- `kPDFProcessorConvertToPDFA4RGB = 16`: Convert to PDF/A-4 RGB
- `kPDFProcessorConvertToPDFA4CMYK = 17`: Convert to PDF/A-4 CMYK
- `kPDFProcessorConvertToPDFA4eRGB = 18`: Convert to PDF/A-4e RGB
- `kPDFProcessorConvertToPDFA4eCMYK = 19`: Convert to PDF/A-4e CMYK
- `kPDFProcessorConvertToPDFA4fRGB = 20`: Convert to PDF/A-4f RGB
- `kPDFProcessorConvertToPDFA4fCMYK = 21`: Convert to PDF/A-4f CMYK

#### PDFProcessorPDFXConversionOption

Header: `PDFProcessorExpT.h:81`

This is used to select which particular PDF/X standard we want to convert to.

**Values**

- `kPDFProcessorConvertToPDFX1a2001 = 0`: Convert to PDF/X-1a 2001
- `kPDFProcessorConvertToPDFX32003 = 1`: Convert to PDF/X-3 2003
- `kPDFProcessorConvertToPDFX42010 = 2`: Convert to PDF/X-4 2010
- `kPDFProcessorConvertToPDFX62020 = 3`: Convert to PDF/X-6 2020

## xps2pdf

### Functions (3)

#### XPS2PDFConvert

```cpp
ASInt32 XPS2PDFConvert(ASCab inSettings, ASInt32 conversionFlags, ASPathName inPath, ASFileSys inFileSys, PDDoc *outPDDoc, void *clientData)
```

Header: `XPS2PDFProcs.h:37`

Converts aa XPS file into a PDF file.

**Parameters**

- `inSettings` ([`ASCab`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/aslayer.md#ASCab))
- `conversionFlags` ([`ASInt32`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/aslayer.md#ASInt32)): Kept for future use. Default to 0.
- `inPath` ([`ASPathName`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/aslayer.md#ASPathName)): Folder path where the input XPS files are kept.
- `inFileSys` ([`ASFileSys`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/aslayer.md#ASFileSys)): File system
- `outPDDoc` ([`PDDoc *`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/pdlayer.md#PDDoc)): The output PDDoc which we want to make from XPS.
- `clientData` (`void *`): Kept for future use. Default to NULL.

**Returns:** [`ASInt32`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/aslayer.md#ASInt32)

#### XPS2PDFInitialize

```cpp
ASBool XPS2PDFInitialize(void)
```

Header: `XPS2PDFProcs.h:25`

Initialises the XPS2PDF Plug-in.

**Parameters**

- (unnamed) (`void`)

**Returns:** [`ASBool`](https://docs.datalogics.com/apdfl18/CPlusPlus/APDFL18.0.5PlusP2d/aslayer.md#ASBool)

An ASBool value.

#### XPS2PDFTerminate

```cpp
void XPS2PDFTerminate(void)
```

Header: `XPS2PDFProcs.h:44`

Terminates the XPS2PDF Plug-in.

**Parameters**

- (unnamed) (`void`)

**Returns:** `void`

void.
