# Additional functionality from Datalogics

> Additional functionality from Datalogics: 22 components, 201 items.

- Product: Adobe PDF Library 21
- Language: Adobe C++
- Version: APDFL21.0.0PlusP1e
- HTML page: https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras
- Version index: https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/llms.txt

## CosStream

### Functions (1)

#### CosStreamSetData

```cpp
void CosStreamSetData(CosObj stream, ASStm sourceP, ASInt32 sourceStart, ASBool encodeTheSourceData, CosObj attributes, CosObj encodeParms, ASInt32 sourceLength)
```

Header: `DLExtrasProcs.h:156`

Essentially identical to CosNewStream, except that the result is a modification of an existing stream.

**Parameters**

- `stream` ([`CosObj`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/coslayer.md#CosObj)): Stream to be modified
- `sourceP` ([`ASStm`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASStm)): source stream to be added.
- `sourceStart` ([`ASInt32`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASInt32)): The byte offset to the starting point of the stream to be added.
- `encodeTheSourceData` ([`ASBool`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/plugins.md#ASBool)): Flag indicating whether the source data is to encoded via filters specified in the attributes.
- `attributes` ([`CosObj`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/coslayer.md#CosObj)): dictionary containing string data attributes, including its length and encoding parameters.
- `encodeParms` ([`CosObj`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/coslayer.md#CosObj)): Parameters to be used for encoding (if any).
- `sourceLength` ([`ASInt32`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASInt32)): length of data to be read from the source, or `-1` to read to EOF.

**Returns:** `void`

**See also:** `CosStreamNew`

## General

### Functions (70)

#### ACGetOption

```cpp
AC_Error ACGetOption(AC_OptionCode code, ASUns32 *value)
```

Header: `DLExtrasProcs.h:129`

Returns the current value for the given AC_OptionCode. This call controls the behavior of colorspace conversions and manipulations carried out via AC-layer calls; it does not impact other Adobe PDF Library color behaviors.

**Parameters**

- `code` ([`AC_OptionCode`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#AC_OptionCode)): AC_Option_BlackPointCompensation indicates whether the Acrobat Color Engine will carry out black point compensation when converting between colorspaces with different black points.
- `value` ([`ASUns32 *`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASUns32)): AC_Option_BlackPointCompensation flag value to be retrieved (Filled by the method)

**Returns:** [`AC_Error`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/acrocolor.md#AC_Error)

Indicates if an error occurred.

**See also:** [`ACSetOption`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#ACSetOption)

#### ACSetOption

```cpp
AC_Error ACSetOption(AC_OptionCode code, ASUns32 value)
```

Header: `DLExtrasProcs.h:140`

Sets the current value for the option specified by the supplied AC_OptionCode. This call controls the behavior of colorspace conversions and manipulations carried out via AC-layer calls; it does not impact other Adobe PDF Library color behaviors.

**Parameters**

- `code` ([`AC_OptionCode`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#AC_OptionCode))
- `value` ([`ASUns32`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASUns32)): The flag value to be set.

**Returns:** [`AC_Error`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/acrocolor.md#AC_Error)

Indicates if an error occurred.

**See also:** [`ACGetOption`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#ACGetOption)

#### ASSetDefaultFileSys

```cpp
void ASSetDefaultFileSys(ASFileSys fileSys)
```

Header: `DLExtrasProcs.h:19`

Sets the default file system implementation for a platform. Added by Datalogics.

**Parameters**

- `fileSys` ([`ASFileSys`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASFileSys)): Alternate file system to be used

**Returns:** `void`

**See also:** [`ASGetDefaultFileSys`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASGetDefaultFileSys), [`ASGetTempFileSys`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASGetTempFileSys), [`ASGetRamFileSys`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASGetRamFileSys)

**Since:** `@product { Singer }`

#### ConvertPDFToExcel

```cpp
ASBool ConvertPDFToExcel(ASPathName inputPath, ASPathName outputPath, ASFileSys fileSys)
```

Header: `DLExtrasProcs.h:1056`

Converts a PDF file from the specified file path to a Microsoft Excel document (.xlsx) at the specified file path.

**Parameters**

- `inputPath` ([`ASPathName`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASPathName)): The input path of the PDF document.
- `outputPath` ([`ASPathName`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASPathName)): The output path of the Office document.
- `fileSys` ([`ASFileSys`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASFileSys)): The File System in use.

**Returns:** [`ASBool`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/plugins.md#ASBool)

#### ConvertPDFToPowerPoint

```cpp
ASBool ConvertPDFToPowerPoint(ASPathName inputPath, ASPathName outputPath, ASFileSys fileSys)
```

Header: `DLExtrasProcs.h:1067`

Converts a PDF file from the specified file path to a Microsoft Powerpoint document (.pptx) at the specified file path.

**Parameters**

- `inputPath` ([`ASPathName`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASPathName)): The input path of the PDF document.
- `outputPath` ([`ASPathName`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASPathName)): The output path of the Office document.
- `fileSys` ([`ASFileSys`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASFileSys)): The File System in use.

**Returns:** [`ASBool`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/plugins.md#ASBool)

#### ConvertPDFToWord

```cpp
ASBool ConvertPDFToWord(ASPathName inputPath, ASPathName outputPath, ASFileSys fileSys)
```

Header: `DLExtrasProcs.h:1045`

Converts a PDF file from the specified file path to a Microsoft Word document (.docx) at the specified file path.

**Parameters**

- `inputPath` ([`ASPathName`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASPathName)): The input path of the PDF document.
- `outputPath` ([`ASPathName`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASPathName)): The output path of the Office document.
- `fileSys` ([`ASFileSys`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASFileSys)): The File System in use.

**Returns:** [`ASBool`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/plugins.md#ASBool)

#### DLColorConvertPDEImage

```cpp
PDEImage DLColorConvertPDEImage(PDDoc *document, PDEImage image, AC_ProfileCode code, AC_RenderIntent intent, ASBool embed)
```

Header: `DLExtrasProcs.h:1212`

Converts the colorspace of a provided image using a new color profile and render intent.

**Parameters**

- `document` ([`PDDoc *`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdlayer.md#PDDoc)): A pointer to a PDDoc object containing the PDEImage.
- `image` ([`PDEImage`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdelayer.md#PDEImage)): The PDEImage in a PDF document that will be converted.
- `code` ([`AC_ProfileCode`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/acrocolor.md#AC_ProfileCode)): The code of the target profile for the conversion.
- `intent` ([`AC_RenderIntent`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/acrocolor.md#AC_RenderIntent)): The rendering intent of used to convert the image.
- `embed` ([`ASBool`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/plugins.md#ASBool)): A boolian value. If true, embed the target profile. If false the resulting color is Device, if possible.

**Returns:** [`PDEImage`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdelayer.md#PDEImage)

#### DLCreatePDEImageFromASFile

```cpp
PDEImage DLCreatePDEImageFromASFile(ASFile file)
```

Header: `DLExtrasProcs.h:1463`

Imports an image file (TIFF, JPEG, BMP, PNG, GIF) from the specified ASFile to a PDEImage.

**Parameters**

- `file` ([`ASFile`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASFile)): The ASFile representing the file.

**Returns:** [`PDEImage`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdelayer.md#PDEImage)

#### DLCreatePDEImageFromFile

```cpp
PDEImage DLCreatePDEImageFromFile(ASPathName imageInputPath, ASFileSys fileSys)
```

Header: `DLExtrasProcs.h:1117`

Imports an image file (TIFF, JPEG, BMP, PNG, GIF) from the specified file path to a PDEImage.

**Parameters**

- `imageInputPath` ([`ASPathName`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASPathName)): The input path of the image.
- `fileSys` ([`ASFileSys`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASFileSys)): The File System in use.

**Returns:** [`PDEImage`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdelayer.md#PDEImage)

#### DLCreatePDEImagesFromASFile

```cpp
PDEImage * DLCreatePDEImagesFromASFile(ASFile file)
```

Header: `DLExtrasProcs.h:1472`

Imports a multipage TIFF from the specified ASFile to a collection of PDEImage's.

**Parameters**

- `file` ([`ASFile`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASFile)): The ASFile representing the file.

**Returns:** [`PDEImage *`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdelayer.md#PDEImage)

#### DLCreatePDEImagesFromTIFF

```cpp
PDEImage * DLCreatePDEImagesFromTIFF(ASPathName imageInputPath, ASFileSys fileSys)
```

Header: `DLExtrasProcs.h:1436`

Imports a multipage TIFF from the specified file path to a collection of PDEImage's.

**Parameters**

- `imageInputPath` ([`ASPathName`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASPathName)): The input path of the TIFF.
- `fileSys` ([`ASFileSys`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASFileSys)): The File System in use.

**Returns:** [`PDEImage *`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdelayer.md#PDEImage)

#### DLCreateResampledPDEImage

```cpp
PDEImage DLCreateResampledPDEImage(PDEImage image, DLPDEImageExportParams *exportParams, ASInt32 resolution)
```

Header: `DLExtrasProcs.h:1249`

Create a new PDEImage from an existing one modifying the resolution (dots per inch). This image can be freely modified inside a PDF document.

**Parameters**

- `image` ([`PDEImage`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdelayer.md#PDEImage)): The PDEImage in a PDF document.
- `exportParams` (`DLPDEImageExportParams *`): A pointer to the DLPDEImageExportParams structure used by the PDEImage.
  During the function call, ExportHorizontalDPI and ExportVeritcalDPI are updated to using the new resolution.
- `resolution` ([`ASInt32`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASInt32)): The new resolution as a 32 bit integer value.

**Returns:** [`PDEImage`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdelayer.md#PDEImage)

#### DLEnableLicensedBehavior

```cpp
ASBool DLEnableLicensedBehavior(const char *keyVal, const char *additionalInfo)
```

Header: `DLExtrasProcs.h:21`

**Parameters**

- `keyVal` (`const char *`)
- `additionalInfo` (`const char *`)

**Returns:** [`ASBool`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/plugins.md#ASBool)

#### DLExportImageToNChannelTIFF

```cpp
void DLExportImageToNChannelTIFF(char *buffer, size_t bufferSize, ASInt32 width, ASInt32 height, ASPathName outputPath, DLPDEImageExportParams exportParams, PDPageInk inks)
```

Header: `DLExtrasProcs.h:1477`

For Internal Use only.

**Parameters**

- `buffer` (`char *`)
- `bufferSize` (`size_t`)
- `width` ([`ASInt32`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASInt32))
- `height` ([`ASInt32`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASInt32))
- `outputPath` ([`ASPathName`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASPathName))
- `exportParams` (`DLPDEImageExportParams`)
- `inks` (`PDPageInk`)

**Returns:** `void`

#### DLExportPDEImage

```cpp
void DLExportPDEImage(PDEImage image, ASPathName outputPath, DLImageExportType exporttype, DLPDEImageExportParams exportParams)
```

Header: `DLExtrasProcs.h:1127`

Exports a PDEImage from a document to a specified image type TIFF, JPEG, BMP, PNG, GIF the specified file path.

**Parameters**

- `image` ([`PDEImage`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdelayer.md#PDEImage)): The PDEImage in a PDF document.
- `outputPath` ([`ASPathName`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASPathName)): The output path of the image.
- `exporttype` ([`DLImageExportType`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#DLImageExportType)): The exported image format (TIFF, JPEG, BMP, PNG, GIF).
- `exportParams` (`DLPDEImageExportParams`): The DLPDEImageExportParams structure.

**Returns:** `void`

#### DLExportPDEImagesToTIFF

```cpp
void DLExportPDEImagesToTIFF(PDEImage *images, ASPathName outputPath, DLPDEImageExportParams exportParams)
```

Header: `DLExtrasProcs.h:1445`

Exports a collection of PDEImage's to a multipage TIFF at the specified file path.

**Parameters**

- `images` ([`PDEImage *`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdelayer.md#PDEImage))
- `outputPath` ([`ASPathName`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASPathName)): The output path of the TIFF file.
- `exportParams` (`DLPDEImageExportParams`): The DLPDEImageExportParams structure.

**Returns:** `void`

#### DLGetImageType

```cpp
DLImageExportType DLGetImageType(ASFile file)
```

Header: `DLExtrasProcs.h:1454`

Gets the image file type (TIFF, JPEG, BMP, PNG, GIF).

**Parameters**

- `file` ([`ASFile`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASFile)): The ASFile representing the file.

**Returns:** [`DLImageExportType`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#DLImageExportType)

#### DLPDEImageGetCompression

```cpp
DLImageCompression DLPDEImageGetCompression(const PDEImage image)
```

Header: `DLExtrasProcs.h:1237`

Gets the compression scheme of the image data.

**Parameters**

- `image` ([`const PDEImage`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdelayer.md#PDEImage)): The PDEImage in a PDF document.

**Returns:** [`DLImageCompression`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#DLImageCompression)

#### DLPDEImageGetExportParams

```cpp
DLPDEImageExportParams DLPDEImageGetExportParams()
```

Header: `DLExtrasProcs.h:1182`

Initializes a structure of PDEImage export parameters with default values.

**Returns:** `DLPDEImageExportParams`

#### DLPDEImageGetHeight

```cpp
ASDouble DLPDEImageGetHeight(const PDEImage image)
```

Header: `DLExtrasProcs.h:1175`

Gets height of specified image.

**Parameters**

- `image` ([`const PDEImage`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdelayer.md#PDEImage)): The PDEImage in a PDF document.

**Returns:** [`ASDouble`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASDouble)

#### DLPDEImageGetIntent

```cpp
const char * DLPDEImageGetIntent(const PDEImage inputImage)
```

Header: `DLExtrasProcs.h:1220`

Gets the image's Render Intent.

**Parameters**

- `inputImage` ([`const PDEImage`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdelayer.md#PDEImage))

**Returns:** `const char *`

#### DLPDEImageGetSoftMask

```cpp
PDEImage * DLPDEImageGetSoftMask(const PDEImage image)
```

Header: `DLExtrasProcs.h:1191`

Gets the soft masl of a provided image.

**Parameters**

- `image` ([`const PDEImage`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdelayer.md#PDEImage)): The PDEImage in a PDF document.

**Returns:** [`PDEImage *`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdelayer.md#PDEImage)

#### DLPDEImageGetWidth

```cpp
ASDouble DLPDEImageGetWidth(const PDEImage image)
```

Header: `DLExtrasProcs.h:1166`

Gets width of specified image.

**Parameters**

- `image` ([`const PDEImage`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdelayer.md#PDEImage)): The PDEImage in a PDF document.

**Returns:** [`ASDouble`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASDouble)

#### DLPDEImageRotate

```cpp
void DLPDEImageRotate(PDEImage image, ASDouble theta)
```

Header: `DLExtrasProcs.h:1157`

Rotates an image by theta degrees. A rotation is produced by [cos(theta), sin(theta), -sin(theta), cos(theta), 0, 0], which has the effect of rotating the coordinate system axes by an angle theta (degrees) counterclockwise.

**Parameters**

- `image` ([`PDEImage`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdelayer.md#PDEImage)): The PDEImage in a PDF document.
- `theta` ([`ASDouble`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASDouble)): The rotation angle (degrees).

**Returns:** `void`

#### DLPDEImageScale

```cpp
void DLPDEImageScale(PDEImage image, ASDouble sx, ASDouble sy)
```

Header: `DLExtrasProcs.h:1148`

Scales an image by sx units. A scaling is obtained by [sx 0 0 sy 0 0]. This scales the coordinates so that 1 unit in the horizontal and vertical dimension of the new coordinate system is the same size as sx and sy units, respectively, as in the previous coordinate system.

**Parameters**

- `image` ([`PDEImage`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdelayer.md#PDEImage)): The PDEImage in a PDF document.
- `sx` ([`ASDouble`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASDouble)): X scaling factor.
- `sy` ([`ASDouble`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASDouble)): Y scaling factor.

**Returns:** `void`

#### DLPDEImageSetIntent

```cpp
void DLPDEImageSetIntent(PDEImage inputImage, const char *renderIntent)
```

Header: `DLExtrasProcs.h:1228`

Sets the image's Render Intent.

**Parameters**

- `inputImage` ([`PDEImage`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdelayer.md#PDEImage))
- `renderIntent` (`const char *`): A pointer to the string representation of an ASAtom value that will be used to set the image's intent data.

**Returns:** `void`

#### DLPDEImageSetSoftMask

```cpp
void DLPDEImageSetSoftMask(PDEImage image, PDEImage *softMask)
```

Header: `DLExtrasProcs.h:1199`

Uses the specified soft mask and applies it to the PDEImage.

**Parameters**

- `image` ([`PDEImage`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdelayer.md#PDEImage)): The PDEImage in a PDF document.
- `softMask` ([`PDEImage *`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdelayer.md#PDEImage)): The pointer to the PDEImage's soft mask, that will be applied to the PDEImage, or a null pointer which will delete the current soft mask.

**Returns:** `void`

#### DLPDEImageTranslate

```cpp
void DLPDEImageTranslate(PDEImage image, ASDouble tx, ASDouble ty)
```

Header: `DLExtrasProcs.h:1138`

Translates an image by (tx,ty) units. A translation is specified as [ 1 0 0 1 tx ty], where tx and ty are the distance to translate from the origin of the coordinate system in the horizontal and vertical dimension, respectively.

**Parameters**

- `image` ([`PDEImage`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdelayer.md#PDEImage)): The PDEImage in a PDF document.
- `tx` ([`ASDouble`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASDouble)): X translation distance.
- `ty` ([`ASDouble`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASDouble)): Y translation distance.

**Returns:** `void`

#### PDFLAddFontDirectories

```cpp
ASBool PDFLAddFontDirectories(ASInt32 pathCount, ASPathName *paths)
```

Header: `DLExtrasProcs.h:453`

This call allows Adobe PDF Library to rescan for fonts without re-initializing. This will allow an operating Library process to detect and update new font directories and resources after startup, without requiring a restart and re-initialization. This will add one or more directories, and the fonts within them, to the set of all directories containing fonts (those specified in the DirList string arrays of resource locations). This call should be followed by a call to PDFLRescanFontDirectories after all new font directories have been loaded.

**Parameters**

- `pathCount` ([`ASInt32`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASInt32)): Number of new paths to be added.
- `paths` ([`ASPathName *`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASPathName)): Paths to new resource locations to be added.

**Returns:** [`ASBool`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/plugins.md#ASBool)

Indicates if fonts directories were changed.

**See also:** [`PDFLRescanFontDirectories`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDFLRescanFontDirectories)

#### PDFLReinit

```cpp
ASInt32 PDFLReinit(void)
```

Header: `PDFLProcs.h:688`

Warm reinitialization of the Adobe PDF Library. Call this method if you closed all documents and other PD/PDE/Cos objects. Releases memory used for cached data.

**Parameters**

- (unnamed) (`void`)

**Returns:** [`ASInt32`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASInt32)

**See also:** [`PDFLInit`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdfllayer.md#PDFLInit)

#### PDFLRescanFontDirectories

```cpp
ASBool PDFLRescanFontDirectories(FontRescanFlags flags)
```

Header: `DLExtrasProcs.h:439`

This call allows Adobe PDF Library to rescan for fonts without re-initializing. This will allow an operating Library process to detect and update new font directories and resources after startup, without requiring a restart and re-initialization. This call can, depending on flag settings, force a rescan of font resource areas defined in your dirList array, a rescan of those residing in the System folder, or both. To add new font resources to your dirList array, use the PDFLAddFontDirectories call. **Note:** This call, as well as the PDFLAddFontDirectories call, will act upon all PDSysFont structures referenced by the font cache that have a reference count of zero. Any pointers to such structures will become invalid after a rescan call has occurred. By default, all referenced PDSysFont structures will be affected, as their reference counts are always zero. To preserve a PDSysFont reference across a rescan call, use PDEAcquire and PDERelease calls to increment and decrement usage counts of a PDSysFont object as like other PDE Object.

**Parameters**

- `flags` ([`FontRescanFlags`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#FontRescanFlags)): Flags controlling rescan process.

**Returns:** [`ASBool`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/plugins.md#ASBool)

Indicates if fonts directories were changed.

**See also:** [`PDFLAddFontDirectories`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDFLAddFontDirectories)

#### PDSignDocGetCredentialDataFormat

```cpp
CredentialDataFmt PDSignDocGetCredentialDataFormat(PDSignDocSignParams params)
```

Header: `DLExtrasProcs.h:1644`

Gets the encoding format of public-key credentials used to sign the document.

**Parameters**

- `params` ([`PDSignDocSignParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDSignDocSignParams)): IN Object to be verified.

**Returns:** [`CredentialDataFmt`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#CredentialDataFmt)

Format of public-key credentials used to sign the document.

#### PDSignDocGetDigestCategory

```cpp
DigestCategory PDSignDocGetDigestCategory(PDSignDocSignParams params)
```

Header: `DLExtrasProcs.h:1630`

Gets the cryptographic hash function used to generate message digests.

**Parameters**

- `params` ([`PDSignDocSignParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDSignDocSignParams))

**Returns:** [`DigestCategory`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#DigestCategory)

Cryptographic hash function used to generate message digests.

#### PDSignDocGetDocMajorVersionNumber

```cpp
PDDocVersion PDSignDocGetDocMajorVersionNumber(PDSignDocSaveParams params)
```

Header: `DLExtrasProcs.h:1823`

Gets the major PDF version number of the document.

**Parameters**

- `params` ([`PDSignDocSaveParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDSignDocSaveParams)): IN Object to be checked.

**Returns:** [`PDDocVersion`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdlayer.md#PDDocVersion)

Major PDF version number of the document.

#### PDSignDocGetDocMinorVersionNumber

```cpp
PDDocVersion PDSignDocGetDocMinorVersionNumber(PDSignDocSaveParams params)
```

Header: `DLExtrasProcs.h:1837`

Gets the minor PDF version number of the document.

**Parameters**

- `params` ([`PDSignDocSaveParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDSignDocSaveParams)): IN Object to be checked.

**Returns:** [`PDDocVersion`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdlayer.md#PDDocVersion)

Minor PDF version number of the document.

#### PDSignDocGetDocSignType

```cpp
SignatureType PDSignDocGetDocSignType(PDSignDocSignParams params)
```

Header: `DLExtrasProcs.h:1716`

Gets the type of signature that was added to the document.

**Parameters**

- `params` ([`PDSignDocSignParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDSignDocSignParams)): IN Object fetch the value of SignatureType,

**Returns:** [`SignatureType`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#SignatureType)

#### PDSignDocGetFieldID

```cpp
SignatureFieldID PDSignDocGetFieldID(PDSignDocSignParams params)
```

Header: `DLExtrasProcs.h:1557`

Gets the field identifier that determines the form field containing the digital signature that was added to the document.

**Parameters**

- `params` ([`PDSignDocSignParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDSignDocSignParams))

**Returns:** [`SignatureFieldID`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#SignatureFieldID)

Current value of the SignatureFieldID enum.

#### PDSignDocGetFieldName

```cpp
ASConstText PDSignDocGetFieldName(PDSignDocSignParams params)
```

Header: `DLExtrasProcs.h:1572`

Gets the fully qualified name of the form field that contains the digital signature that was added to the document.

**Parameters**

- `params` ([`PDSignDocSignParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDSignDocSignParams)): IN Object to be checked.

**Returns:** [`ASConstText`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASConstText)

Fully qualified field name of the form field that contains the digital signature. May return NULL based on the SignatureFieldID attribute defined by the user.

#### PDSignDocGetFieldObject

```cpp
CosObj PDSignDocGetFieldObject(PDSignDocSignParams params)
```

Header: `DLExtrasProcs.h:1587`

Gets the Cos object of the field dictionary that contains the digital signature that was added to the document.

**Parameters**

- `params` ([`PDSignDocSignParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDSignDocSignParams)): IN Object to be checked.

**Returns:** [`CosObj`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/coslayer.md#CosObj)

Cos object identifying the field dictionary containing the signature. May return NULL based on the SignatureFieldID attribute defined by the user.

#### PDSignDocGetOutputPath

```cpp
ASPathName PDSignDocGetOutputPath(PDSignDocSaveParams params)
```

Header: `DLExtrasProcs.h:1783`

Gets the output path to which the signed document is saved.

**Parameters**

- `params` ([`PDSignDocSaveParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDSignDocSaveParams)): IN Object to be checked.

**Returns:** [`ASPathName`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASPathName)

Path to which the signed document is saved.

#### PDSignDocGetSignatureBoxPageNumber

```cpp
ASUns32 PDSignDocGetSignatureBoxPageNumber(PDSignDocSignParams params)
```

Header: `DLExtrasProcs.h:1601`

Gets the page number on which the widget annotation of the signature field is created.

**Parameters**

- `params` ([`PDSignDocSignParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDSignDocSignParams)): IN Object to be checked.

**Returns:** [`ASUns32`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASUns32)

Page number on which signature field's widget annotation is created. A value of zero is returned if page number was not set.

#### PDSignDocGetSignatureBoxRectangle

```cpp
ASFixedRectP PDSignDocGetSignatureBoxRectangle(PDSignDocSignParams params)
```

Header: `DLExtrasProcs.h:1616`

Gets the dimension of the annotation rectangle of the signature field being created.

**Parameters**

- `params` ([`PDSignDocSignParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDSignDocSignParams)): IN Object to be checked.

**Returns:** `ASFixedRectP`

Dimension of the annotation rectangle of the signature field being created. A value of {0,0,0,0} is returned if annotation rectangle dimension was not set.

#### PDSignDocSaveInitParams

```cpp
PDSignDocSaveParams PDSignDocSaveInitParams(void)
```

Header: `DLExtrasProcs.h:1763`

Creates a set of parameters used for saving the document to which a digital signature has been added. The parameters are set to default values and can be examined using "get" methods, and modified via "set" methods. When these parameters are no longer needed (after the call to PDSignDocWithParams, although they can be re-used any number of times), they must be freed by calling PDSignDocSaveReleaseParams().

**Parameters**

- (unnamed) (`void`)

**Returns:** [`PDSignDocSaveParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDSignDocSaveParams)

Initialized document signature parameters that can be further modified.

**See also:** [`PDSignDocSaveReleaseParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDSignDocSaveReleaseParams)

#### PDSignDocSaveReleaseParams

```cpp
void PDSignDocSaveReleaseParams(PDSignDocSaveParams params)
```

Header: `DLExtrasProcs.h:1769`

Deallocates resources used by a PDSignDocSaveParams structure.

**Parameters**

- `params` ([`PDSignDocSaveParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDSignDocSaveParams)): IN Object to deallocate.

**Returns:** `void`

#### PDSignDocSetCancelProc

```cpp
void PDSignDocSetCancelProc(PDSignDocSaveParams params, ASCancelProc cancelProc, void *cancelProcClientData)
```

Header: `DLExtrasProcs.h:1808`

Sets the cancel process callback and client data for the callback.

**Parameters**

- `params` ([`PDSignDocSaveParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDSignDocSaveParams)): IN Object to be modified.
- `cancelProc` ([`ASCancelProc`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASCancelProc)): IN A callback to test whether an operation should be cancelled. A CancelProc is typically passed to some method that takes a long time to complete. At frequent intervals, the method calls the CancelProc. If it returns true, then the method cancels its operation; if false, it continues.
- `cancelProcClientData` (`void *`): IN Pointer to user-supplied data to pass to cancelProc each time it is called. It must be NULL if cancelProc is NULL.

**Returns:** `void`

#### PDSignDocSetCredentialDataFormat

```cpp
void PDSignDocSetCredentialDataFormat(PDSignDocSignParams params, CredentialDataFmt dataFmt)
```

Header: `DLExtrasProcs.h:1637`

Sets the encoding format of public-key credentials required to sign the document.

**Parameters**

- `params` ([`PDSignDocSignParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDSignDocSignParams)): IN Object to be modified.
- `dataFmt` ([`CredentialDataFmt`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#CredentialDataFmt)): IN Encoding format of public-key credentials required to sign the document.

**Returns:** `void`

#### PDSignDocSetDigestCategory

```cpp
void PDSignDocSetDigestCategory(PDSignDocSignParams params, DigestCategory digestCat)
```

Header: `DLExtrasProcs.h:1623`

Sets the value of the cryptographic hash function to use for generating message digests.

**Parameters**

- `params` ([`PDSignDocSignParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDSignDocSignParams)): IN Object to be modified.
- `digestCat` ([`DigestCategory`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#DigestCategory)): IN Cryptographic hash function to use for generating message digests.

**Returns:** `void`

#### PDSignDocSetDocMajorVersionNumber

```cpp
void PDSignDocSetDocMajorVersionNumber(PDSignDocSaveParams params, PDDocVersion major)
```

Header: `DLExtrasProcs.h:1816`

Sets the major PDF version number of the document.

**Parameters**

- `params` ([`PDSignDocSaveParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDSignDocSaveParams)): IN Object to be modified.
- `major` ([`PDDocVersion`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdlayer.md#PDDocVersion)): IN Major PDF version number of the document. If major equals 0, both major and minor are ignored. It is the users responsibility to ensure the document conforms to the version number that is specified.

**Returns:** `void`

#### PDSignDocSetDocMinorVersionNumber

```cpp
void PDSignDocSetDocMinorVersionNumber(PDSignDocSaveParams params, PDDocVersion minor)
```

Header: `DLExtrasProcs.h:1830`

Sets the minor PDF version number of the document.

**Parameters**

- `params` ([`PDSignDocSaveParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDSignDocSaveParams)): IN Object to be modified.
- `minor` ([`PDDocVersion`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdlayer.md#PDDocVersion)): IN Minor PDF version number of the document.

**Returns:** `void`

#### PDSignDocSetDocSignType

```cpp
void PDSignDocSetDocSignType(PDSignDocSignParams params, SignatureType signType)
```

Header: `DLExtrasProcs.h:1710`

Sets the type of signature to be added to the document.

**Parameters**

- `params` ([`PDSignDocSignParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDSignDocSignParams)): IN Object to be modified.
- `signType` ([`SignatureType`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#SignatureType)): IN The type of signature to be added to a document.

**Returns:** `void`

#### PDSignDocSetFieldID

```cpp
void PDSignDocSetFieldID(PDSignDocSignParams params, SignatureFieldID id)
```

Header: `DLExtrasProcs.h:1550`

Sets the field identifier used to determine the form field that will contain the digital signature.

**Parameters**

- `params` ([`PDSignDocSignParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDSignDocSignParams)): IN Object to be modified.
- `id` ([`SignatureFieldID`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#SignatureFieldID)): IN Identifier to determine the form field that will contain the digital signature.

**Returns:** `void`

#### PDSignDocSetFieldName

```cpp
void PDSignDocSetFieldName(PDSignDocSignParams params, ASConstText fieldName)
```

Header: `DLExtrasProcs.h:1564`

Sets the fully qualified name of the form field that will contain the digital signature to be added to the document.

**Parameters**

- `params` ([`PDSignDocSignParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDSignDocSignParams)): IN Object to be modified.
- `fieldName` ([`ASConstText`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASConstText)): IN Fully qualified name of the form field that will contain the digital signature.

**Returns:** `void`

#### PDSignDocSetFieldObject

```cpp
void PDSignDocSetFieldObject(PDSignDocSignParams params, CosObj fieldObj)
```

Header: `DLExtrasProcs.h:1579`

Sets the form field Cos object identifying the field dictionary that will contain the digital signature.

**Parameters**

- `params` ([`PDSignDocSignParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDSignDocSignParams)): IN Object to be modified.
- `fieldObj` ([`CosObj`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/coslayer.md#CosObj)): IN Cos object identifying the field dictionary containing the signature.

**Returns:** `void`

#### PDSignDocSetFileSys

```cpp
void PDSignDocSetFileSys(PDSignDocSaveParams params, ASFileSys outputFileSys)
```

Header: `DLExtrasProcs.h:1790`

Sets the file system of the signed document to be saved.

**Parameters**

- `params` ([`PDSignDocSaveParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDSignDocSaveParams)): IN Object to be modified.
- `outputFileSys` ([`ASFileSys`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASFileSys)): IN The file system. If NULL, the file system of the document's current backing file is used.

**Returns:** `void`

#### PDSignDocSetNonPfxPassphrase

```cpp
void PDSignDocSetNonPfxPassphrase(PDSignDocSignParams params, void *passphrase, ASSize_t passphraseSize, CredentialStorageFmt storageFmt)
```

Header: `DLExtrasProcs.h:1672`

Sets the passphrase used to decrypt NonPFX credentials. The passphrase provided must use the exact same character encoding used to encrypt the private key. The application makes no effort whatsoever to re-encode the same.

**Parameters**

- `params` ([`PDSignDocSignParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDSignDocSignParams)): IN Object to be modified.
- `passphrase` (`void *`): IN Passphrase used to encrypt NonPFX private key. Should be set to NULL if unencrypted.
- `passphraseSize` ([`ASSize_t`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASSize_t)): IN Passphrase size in bytes. Shall be set to 0 if private key is unencrypted or passphrase is stored on disk.
- `storageFmt` ([`CredentialStorageFmt`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#CredentialStorageFmt)): IN Storage format for passphrase.

**Returns:** `void`

#### PDSignDocSetNonPfxPrivateKey

```cpp
void PDSignDocSetNonPfxPrivateKey(PDSignDocSignParams params, void *privateKey, ASSize_t keySize, CredentialStorageFmt storageFmt)
```

Header: `DLExtrasProcs.h:1662`

Sets the private key for NonPFX credentials.

**Parameters**

- `params` ([`PDSignDocSignParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDSignDocSignParams)): IN Object to be modified.
- `privateKey` (`void *`): IN Private key corresponding to the public key in the signer certificate.
- `keySize` ([`ASSize_t`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASSize_t)): IN Size of private key in bytes. Shall be set to 0 if key is stored on disk.
- `storageFmt` ([`CredentialStorageFmt`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#CredentialStorageFmt)): IN Storage format for private key.

**Returns:** `void`

#### PDSignDocSetNonPfxSignerCert

```cpp
void PDSignDocSetNonPfxSignerCert(PDSignDocSignParams params, void *signerCert, ASSize_t certSize, CredentialStorageFmt storageFmt)
```

Header: `DLExtrasProcs.h:1653`

Sets the signer certificate for NonPFX credentials.

**Parameters**

- `params` ([`PDSignDocSignParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDSignDocSignParams)): IN Object to be modified.
- `signerCert` (`void *`): IN Signer certificate.
- `certSize` ([`ASSize_t`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASSize_t)): IN Size of signer certificate in bytes. Shall be set to 0 if certificate is stored on disk.
- `storageFmt` ([`CredentialStorageFmt`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#CredentialStorageFmt)): IN Storage format for the signer certificate.

**Returns:** `void`

#### PDSignDocSetOutputPath

```cpp
void PDSignDocSetOutputPath(PDSignDocSaveParams params, ASPathName outputPath)
```

Header: `DLExtrasProcs.h:1776`

Sets the output path to which the signed document is saved.

**Parameters**

- `params` ([`PDSignDocSaveParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDSignDocSaveParams)): IN Object to be modified.
- `outputPath` ([`ASPathName`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASPathName)): IN Path to which the signed document is saved.

**Returns:** `void`

#### PDSignDocSetPfxCredentials

```cpp
void PDSignDocSetPfxCredentials(PDSignDocSignParams params, void *credentials)
```

Header: `DLExtrasProcs.h:1679`

Sets PFX/PKCS#12 credentials.

**Parameters**

- `params` ([`PDSignDocSignParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDSignDocSignParams)): IN Object to be modified.
- `credentials` (`void *`): IN Credentials in PFX/PKCS#12 file format.

**Returns:** `void`

#### PDSignDocSetPfxPassphrase

```cpp
void PDSignDocSetPfxPassphrase(PDSignDocSignParams params, void *passphrase, ASSize_t passphraseSize, CredentialStorageFmt storageFmt)
```

Header: `DLExtrasProcs.h:1689`

Sets the passphrase used to decrypt PFX/PKCS#12 credentials. The passphrase provided must use the exact same character encoding used to encrypt the PFX credentials. The application makes no effort whatsoever to re-encode the same.

**Parameters**

- `params` ([`PDSignDocSignParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDSignDocSignParams)): IN Object to be modified.
- `passphrase` (`void *`): IN Passphrase used to encrypt PFX/PKCS#12 credentials. Shall be set to NULL if credentials are unencrypted.
- `passphraseSize` ([`ASSize_t`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASSize_t)): IN Passphrase size in bytes. Shall be set to 0 if PFX credentials are unencrypted or passphrase is stored on disk.
- `storageFmt` ([`CredentialStorageFmt`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#CredentialStorageFmt)): IN Storage format for PFX/PKCS#12 credentials.

**Returns:** `void`

#### PDSignDocSetProgressMon

```cpp
void PDSignDocSetProgressMon(PDSignDocSaveParams params, ASProgressMonitor progMon, void *progMonClientData)
```

Header: `DLExtrasProcs.h:1798`

Sets the progress monitor and client data for the monitor.

**Parameters**

- `params` ([`PDSignDocSaveParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDSignDocSaveParams)): IN Object to be modified.
- `progMon` (`ASProgressMonitor`): IN Progress monitor. Use AVAppGetDocProgressMonitor() to obtain the default. It may be NULL.
- `progMonClientData` (`void *`): IN A pointer to user-supplied data to pass to mon each time it is called. It must be NULL if mon is NULL.

**Returns:** `void`

#### PDSignDocSetSigPolicy

```cpp
ASInt32 PDSignDocSetSigPolicy(PDSignDocSignParams params, ASConstText oid)
```

Header: `DLExtrasProcs.h:1727`

Adds a signature policy as a signed attribute to the PAdES signature used to sign the document. Signature policies may be applied to PAdES signatures, only. It is required that signature type be defined prior to adding a signature policy.

**Parameters**

- `params` ([`PDSignDocSignParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDSignDocSignParams)): IN Object to be modified.
- `oid` ([`ASConstText`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASConstText)): IN Object Identifier (OID) that uniquely identifies a specific version of the signature policy to be added.

**Returns:** [`ASInt32`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASInt32)

Number of signature policies contained within the PAdES signature.

**Exceptions**

- `Raises`: if signature type is undefined or set to a type other than PAdES, or if an invalid policy OID is provided.

#### PDSignDocSetSigPolicyQualifierURI

```cpp
void PDSignDocSetSigPolicyQualifierURI(PDSignDocSignParams params, ASConstText uri)
```

Header: `DLExtrasProcs.h:1735`

Adds an element of type SPuri containing a URI value that specifies the location of the copy of the document of the most recently added signature policy.

**Parameters**

- `params` ([`PDSignDocSignParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDSignDocSignParams)): IN Object to be modified.
- `uri` ([`ASConstText`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASConstText)): IN URI value where a copy of the document of the most-recently added signature policy can be obtained.

**Returns:** `void`

**Exceptions**

- `Raises`: if qualifying an undefined signature policy, or qualifying an existing signature policy with multiple qualifiers.

#### PDSignDocSetSigPolicyQualifierUserNotice

```cpp
void PDSignDocSetSigPolicyQualifierUserNotice(PDSignDocSignParams params, ASConstText displayText, ASConstText org, ASInt64 *noticeNos, ASSize_t numNoticeNos)
```

Header: `DLExtrasProcs.h:1750`

Adds an element of type SPUserNotice containing information that is intended for being displayed whenever the PAdES signature is validated. The displayText and org attributes can be defined independent of each other. However, a valid org attribute must be defined in order to qualify a PAdES signature policy with the noticeNos attribute.

**Parameters**

- `params` ([`PDSignDocSignParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDSignDocSignParams)): IN Object to be modified.
- `displayText` ([`ASConstText`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASConstText)): IN Text of the notice to be displayed.
- `org` ([`ASConstText`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASConstText)): IN Organization name that to be specified as part of the NoticeRef field.
- `noticeNos` ([`ASInt64 *`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASInt64)): IN Array of integers that identify a group of textual statements prepared by the organization to allow for retrieval of notices.
- `numNoticeNos` ([`ASSize_t`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASSize_t)): IN Size of the array containing notice numbers.

**Returns:** `void`

**Exceptions**

- `Raises`: if qualifying an undefined signature policy, qualifying an existing signature policy with multiple qualifiers, or defining a noticeNos attribute without a corresponding org attribute definition.

#### PDSignDocSetSignatureBoxPageNumber

```cpp
void PDSignDocSetSignatureBoxPageNumber(PDSignDocSignParams params, ASUns32 pageNumber)
```

Header: `DLExtrasProcs.h:1594`

Sets the page number on which the widget annotation of the signature field is created.

**Parameters**

- `params` ([`PDSignDocSignParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDSignDocSignParams)): IN Object to be modified.
- `pageNumber` ([`ASUns32`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASUns32)): IN Page number on which to create the widget annotation.

**Returns:** `void`

#### PDSignDocSetSignatureBoxRectangle

```cpp
void PDSignDocSetSignatureBoxRectangle(PDSignDocSignParams params, ASFixedRectP boxRect)
```

Header: `DLExtrasProcs.h:1608`

Sets the dimension of the annotation rectangle of the signature field being created.

**Parameters**

- `params` ([`PDSignDocSignParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDSignDocSignParams)): IN Object to be modified.
- `boxRect` (`ASFixedRectP`): IN Dimension of the annotation rectangle of the signature field.

**Returns:** `void`

#### PDSignDocSetSignerInfo

```cpp
void PDSignDocSetSignerInfo(PDSignDocSignParams params, PDEImage logo, ASFixed opacity, ASConstText name, ASConstText location, ASConstText reason, ASConstText contactInfo, ASInt32 displayTraits)
```

Header: `DLExtrasProcs.h:1702`

Sets signer info attributes that define corresponding signature dictionary entries and signature appearance traits.

**Parameters**

- `params` ([`PDSignDocSignParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDSignDocSignParams)): IN Object to be modified.
- `logo` ([`PDEImage`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdelayer.md#PDEImage)): IN Image to display as part of signature appearance.
- `opacity` ([`ASFixed`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASFixed)): IN Opacity of image to display as part of signature appearance.
- `name` ([`ASConstText`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASConstText)): IN Name of the person or authority signing the document.
- `location` ([`ASConstText`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASConstText)): IN CPU host name or physical location of the signing.
- `reason` ([`ASConstText`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASConstText)): IN Reason for signing the document.
- `contactInfo` ([`ASConstText`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASConstText)): IN Information provided by the signer to enable recipients to contact signer for signature verification.
- `displayTraits` ([`ASInt32`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASInt32)): IN DisplayTraits fields to display as part of signature appearance.

**Returns:** `void`

#### PDSignDocSignInitParams

```cpp
PDSignDocSignParams PDSignDocSignInitParams(void)
```

Header: `DLExtrasProcs.h:1537`

Defines a set of document signature parameters. When these parameters are no longer needed (after the call to PDSignDocWithParams, although they can be re-used any number of times), they should be freed by calling PDSignDocSignReleaseParams().

**Parameters**

- (unnamed) (`void`)

**Returns:** [`PDSignDocSignParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDSignDocSignParams)

Initialized document signature parameters that can be further modified.

**See also:** [`PDSignDocSignReleaseParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDSignDocSignReleaseParams)

#### PDSignDocSignReleaseParams

```cpp
void PDSignDocSignReleaseParams(PDSignDocSignParams params)
```

Header: `DLExtrasProcs.h:1543`

Deallocates resources used by the PDSignDocSignParams object.

**Parameters**

- `params` ([`PDSignDocSignParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDSignDocSignParams)): IN Object to deallocate.

**Returns:** `void`

#### PDSignDocWithParams

```cpp
void PDSignDocWithParams(PDDoc doc, PDSignDocSaveParams saveParams, PDSignDocSignParams signParams)
```

Header: `DLExtrasProcs.h:1525`

Adds a digital signature to a document. It is expected that the PDSignDocSaveParams and PDSignDocSignParams structure definitions have been set by the user prior to signing a document. If the document has not been previously signed, signs and saves the entire document. If the document has been previously signed, signs and saves only the portions of the document that have changed. If the document has been previously signed and the path to which the file is saved is NULL or the same as the path specified by the parameter, doc, signs and copies the document, saving only the portions of the document that have changed.

**Parameters**

- `doc` ([`PDDoc`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdlayer.md#PDDoc)): IN/OUT The PDF document object.
- `saveParams` ([`PDSignDocSaveParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDSignDocSaveParams)): IN A PDSignDocSaveParams structure specifying how the document should be saved.
- `signParams` ([`PDSignDocSignParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDSignDocSignParams)): IN A PDSignDocSignParams structure specifying how the document should be signed.

**Returns:** `void`

### Structures (5)

#### OptimizedFont

```cpp
typedef  struct OptimizedFontRec * OptimizedFont
```

Header: `DLExtrasExpT.h:311`

#### OptimizedImage

```cpp
typedef  struct OptimizedImageRec * OptimizedImage
```

Header: `DLExtrasExpT.h:297`

#### PDSignDocSaveParams

```cpp
typedef struct _t_PDSignDocSaveParams* PDSignDocSaveParams
```

Header: `DLExtrasExpT.h:690`

Type that specifies the parameters required for saving the document to which a digital signature is added.

#### PDSignDocSignParams

```cpp
typedef struct _t_PDSignDocSignParams* PDSignDocSignParams
```

Header: `DLExtrasExpT.h:687`

Type that specifies the parameters required for adding a digital signature to a document.

#### QREncodeParams

```cpp
typedef struct _t_QREncodeParamsRec* QREncodeParams
```

Header: `DLExtrasExpT.h:742`

An opaque type collecting together QREncodeParams parameters.

### Enums (11)

#### AC_OptionCode

Header: `DLExtrasExpT.h:22`

Datalogics-specific flags for the Acro Color Layer.

**Values**

- `AC_Option_BlackPointCompensation = FOUR_CHAR_CODE('kptc')`: Controls whether to adjust for differences in black points when converting colors between color spaces. If enabled the full dynamic range of the source space is mapped into the full dynamic range of the destination space. If disabled, the dynamic range of the source space is simulated in the destination space (which can result in blocked or gray shadows) This option is ignored if the rendering intent for the transformation is AC_AbsColorimetric. Default is 0 (zero).
- `AC_Option_Dither8 = FOUR_CHAR_CODE('dth8')`: Dither transformations to 8 bit color spaces. This may be ignored by optimized transforms. This option is used by AC_ApplyTransform. Default is 0 (zero).
- `AC_OptionCode_MaxEnum = 0xFFFFFFFFL`

#### CredentialDataFmt

Header: `DLExtrasExpT.h:628`

Enumeration to specify user-credential format.

**Values**

- `NonPFX = 0`: Base64-encoded or Binary DER (ASN.1 Distinguished Encoding Rules) format.
- `PFX = 1`: PKCS#12 format.

#### CredentialStorageFmt

Header: `DLExtrasExpT.h:636`

Enumeration to specify whether user-credentials reside on-disk or are cached in memory.

**Values**

- `OnDisk = 0`: Credential resides on-disk.
- `InMemory = 1`: Credential is cached in memory.

#### DLImageCompression

Header: `DLExtrasExpT.h:462`

Compression values for exporting TIF images.

**Values**

- `Compression_Default = 0`: Use the default for the output image type.
- `Compression_NONE = 1`: Use no image compression. Valid for BMP, PNG and TIFF outputs only.
- `Compression_FLATE = 2`: Deflate algorithm (PNG only). An open source standard widely used for creating zip files and with PDF.
- `Compression_LZW = 3`: Lempel-Ziv-Welch, valid for TIFF output. A lossless algorithm, resulting files are larger but retain original quality.
- `Compression_G3 = 4`: CCITT Group3 compression. Valid for TIFF, requires colorModel gray. A lossless algorithm for black and white images that efficiently compresses whitespace.
- `Compression_G4 = 5`: CCITT Group4 compression. Valid for TIFF, requires colorModel gray. A lossless algorithm for black and white images based on G3.
- `Compression_DCT = 6`: Discrete Cosine Transform. Lossy algorithm, valid for JPEG. Best when used with continuous tone (such as photographs).

#### DLImageExportType

Header: `DLExtrasExpT.h:446`

Export Image Types.

**Values**

- `ExportType_Invalid = 0`: Used for error handling
- `ExportType_TIF = 1`: Tagged Image File Format
- `ExportType_JPEG = 2`: Joint Photographic Experts Group
- `ExportType_BMP = 3`: Microsoft Windows Bitmap
- `ExportType_PNG = 4`: Portable Network Graphic
- `ExportType_GIF = 5`: Graphics Interchange Format

#### DLTIFFByteOrder

Header: `DLExtrasExpT.h:479`

**Values**

- `Order_BigEndian = 0`
- `Order_LittleEndian = 1`
- `HostEndian = 2`

#### DigestCategory

Header: `DLExtrasExpT.h:644`

Enumeration to specify cryptographic hash functions that generate variable-length message digests required for digital signature creation.

**Values**

- `sha1 = 0`: SHA-1 message digest comprised of a 160-bit hash value.
- `sha224 = 1`: SHA-2 message digest comprised of a 224-bit hash value.
- `sha256 = 2`: SHA-2 message digest comprised of a 256-bit hash value.
- `sha384 = 3`: SHA-2 message digest comprised of a 384-bit hash value.
- `sha512 = 4`: SHA-2 message digest comprised of a 512-bit hash value.

#### DisplayTraits

Header: `DLExtrasExpT.h:658`

Enumeration to specify fields to display as part of signature appearance.

**Values**

- `kDisplayNone = 0x0`: Do not display text labels or logo image. Note that specifying this option results in an empty signature appearance.
- `kDisplayAll = 0x1`: Display all available text labels and logo image. Note that the application expects valid data to be supplied for each available label that will be displayed as a result of this option being selected.
- `kDisplayName = 0x2`: Display the Name label.
- `kDisplayReason = 0x4`: Display the Reason label.
- `kDisplayLocation = 0x8`: Display the Location label.
- `kDisplayDate = 0x10`: Display the Date label.
- `kDisplayContactInfo = 0x20`: Display the ContactInfo label.
- `kDisplayDN = 0x40`: Display the Signer Certificate's Distinguished Name label.
- `kDisplayLogo = 0x80`: Display logo image.

#### FontRescanFlags

Header: `DLExtrasExpT.h:73`

flags for rescanning font directories for additional fonts after Library initialization.

**Values**

- `FontRescan_Files = 1`: This will rescan just the fields defined in dirList, plus those added with PDFLAddFontDirectories.
- `FontRescan_System = 2`: This will rescan the system directories.
- `FontRescan_All = 3`: This, or an "or" of the previous two, will rescan both.

#### SignatureFieldID

Header: `DLExtrasExpT.h:594`

Enumeration to specify identifying information of the form field expected to contain the digital signature.

**Values**

- `SearchForFirstUnsignedField = 0`: Search for the first available signature field, i.e., a field that does not contain a signature. No new signature field is created if none found. Exception raised if not found.
- `FieldCosObject = 1`: Cos object of an existing signature field that does not contain a signature. No new signature field is created if not found. Exception raised if not found.
- `FullyQualifiedFieldName = 2`: Fully qualified field name of a valid T entry in an existing field dictionary that is expected to contain the digital signature. Refer PDF specification ISO 32000-2:2020, Section 12.7.4.2 for additional information. No new signature field is created if not found. Exception raised if not found.
- `CreateFieldWithQualifiedName = 3`: Creates a new signature field to be signed using the T-entry fully qualified field name provided. The signature field created will contain neither parent nor child entries, i.e., the partial field name is the same as the fully qualified field name, per PDF specification ISO 32000-2:2020 Section 12.7.4.2.

  Field name provided shall not be separated by a period (.) character. Appearance of the generated signature field is determined by widget annotation attributes specified by signatureBoxInfo. If signatureBoxInfo is undefined, the annotation is not drawn, resulting in the creation of an invisible signature field on the first page.

#### SignatureType

Header: `DLExtrasExpT.h:693`

Enumeration to specify the type of signature to be added to the document.

**Values**

- `CMS = 0`: Digital signature based on the Cryptographic Message Syntax (CMS) standard. CMS-based digital signatures contain embedded timestamps, per the RFC3161 specification.
- `RFC3161 = 1`: Trusted timestamp based on the Time-Stamp Protocol (RFC3161). Timestamp signatures are not available on 32-bit Linux and 64-bit AIX systems.
- `PADES = 2`: PAdES B-T baseline and policy-based digital signatures per the ETSI EN 319 142 European Standard. PAdES signatures are not available on 32-bit Linux and 64-bit AIX systems.

### Definitions (1)

#### FOUR_CHAR_CODE

Header: `DLExtrasExpT.h:16`

Value: `(x)`

## JPXColorSpace

### Functions (1)

#### JPXColorSpaceGetApprox

```cpp
ASInt32 JPXColorSpaceGetApprox(JPXColorSpace jpxColorSpace)
```

Header: `DLExtrasProcs.h:814`

Returns the approximation of the JPX color space specification.

**Parameters**

- `jpxColorSpace` ([`JPXColorSpace`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdelayer.md#JPXColorSpace)): IN/OUT A JPX color space object.

**Returns:** [`ASInt32`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASInt32)

The JPX color space approximation.

**See also:** [`PDEImageJPXAcquireJPXColorSpace`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdelayer.md#PDEImageJPXAcquireJPXColorSpace)

## Metadata

### Functions (1)

#### PDDocGetXAPMetadataCompactOptional

```cpp
ASText PDDocGetXAPMetadataCompactOptional(IN PDDoc pdDoc, IN ASBool enableCompactRDF)
```

Header: `PDMetadataProcs.h:573`

Allow customer to get XML/RDF metadata in a full (non-compact) form Gets the XMP metadata associated with a document. It returns an ASText whose text is the XML text of the XMP metadata associated with the document `pdDoc`. The ASText becomes the property of the client, which is free to alter or destroy it. The XMP metadata returned always represents all the properties in the `pdDoc` object's Info dictionary, and can also contain properties not present in the Info dictionary. This call is preferred to PDDocGetInfo(), which only returns properties that are in the Info dictionary (although the older function is supported for compatibility). **Note:** The term *XAP* refers to an early internal code name for Adobe's Extensible Metadata Platform (XMP). For more information on this protocol, see the Adobe XMP specification.

**Parameters**

- `pdDoc` (`IN PDDoc`): The document containing the metadata.
- `enableCompactRDF` (`IN ASBool`): True if the XML/RDF output is in compact form.

**Returns:** [`ASText`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASText)

An ASText object containing the XMP metadata associated with the document pdDoc.

**Exceptions**

- `pdMetadataErrCouldntCreateMetaXAP`

**See also:** `PDDocGetXAPMetadataProperty`, `PDDocSetXAPMetadata`, `PDDocSetXAPMetadataProperty`

## PDDoc

### Functions (35)

#### PDDocDeletePagesEx

```cpp
void PDDocDeletePagesEx(IN PDDoc doc, ASInt32 firstPage, ASInt32 lastPage, ProgressMonitor progMon, void *progMonClientData, PDPageDeleteFlags flags)
```

Header: `DLExtrasProcs.h:899`

Deletes the specified pages.

**Parameters**

- `doc` (`IN PDDoc`): The document from which pages are deleted.
- `firstPage` ([`ASInt32`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASInt32)): The page number of the first page to delete. The first page is `0`.
- `lastPage` ([`ASInt32`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASInt32)): The page number of the last page to delete.
- `progMon` ([`ProgressMonitor`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ProgressMonitor)): A progress monitor. Use AVAppGetDocProgressMonitor() to obtain the default progress monitor. `NULL` may be passed, in which case no progress monitor is used.
- `progMonClientData` (`void *`): A pointer to user-supplied datapassed to `progMon` each time it is called. It should be `NULL` if progMon is `NULL`.
- `flags` ([`PDPageDeleteFlags`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDPageDeleteFlags)): Page Deletion flags that can be used to modify the how the deletion process works.

**Returns:** `void`

#### PDDocEmbedFonts

```cpp
void PDDocEmbedFonts(PDDoc doc, ASUns32 flags, ASStatusMonitorProcs statusMon)
```

Header: `DLExtrasProcs.h:197`

Routine to embed unembedded fonts in a document. **Note:** If the font has information indicating that it cannot be embedded for print and preview, the font will not be embedded in the document.

**Parameters**

- `doc` ([`PDDoc`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdlayer.md#PDDoc)): PDDoc to operate on. The fonts will be embedded in this document. To keep the changes the document must be saved. Fonts on the user's system that match the original font definition will be embedded. For the Times Roman and Helvetica and corresponding styles, if displayed with a font alias, then the font alias will be embedded in the file. If the font has information that indicates the font cannot be embedded for print and preview, the font will not be embedded in the document.
- `flags` ([`ASUns32`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASUns32)): One of the following:
  kDocEmbedSubset
  If set fonts will be subset when embedded. Otherwise the entire font will be embedded. Full fonts should only be embedded if the information in the fonts indicates it can be used for editible embedding. Fonts that have more than 2048 characters will be subset embedded regardless of the setting of this flag.

  kDocEmbedSubsetOfEmbeddedFont
  If set, fonts that have already been embedded but are not subset fonts, will be reembedded as a subset font.
- `statusMon` (`ASStatusMonitorProcs`): Pointer to a record containing a Progress Monitor, Cancel procedure, and report procedure. The procedures in the progress monitor are called to indicate the progress of the routine. The cancel procedure is called periodically to allow the client to cancel the routine. If the cancel procedure returns false then the routine is canceled. The report procedure will be called to report errors or warnings while embedding the fonts. For each font that cannot be embedded, the report procedure will be called.

**Returns:** `void`

**See also:** [`PDDocEmbedFontsFromFontArray`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDDocEmbedFontsFromFontArray)

#### PDDocEmbedFontsFromFontArray

```cpp
void PDDocEmbedFontsFromFontArray(PDDoc doc, const PDFont *fonts, ASUns32 nFonts, ASUns32 flags, ASStatusMonitorProcs statusMon)
```

Header: `DLExtrasProcs.h:240`

Routine to embed fonts in a document. This will embed only the fonts listed in an array. The parameters to this routine are them same as described for PDDocEmbedFonts. With the exception of the additional fonts and nFonts parameters described below. **Note:** If the font has information indicating that it cannot be embedded for print and preview, then the font will not be embedded in the document.

**Parameters**

- `doc` ([`PDDoc`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdlayer.md#PDDoc)): PDDoc to operate on. The fonts will be embedded in this document. To keep the changes the document must be saved. Fonts on the user's system that match the original font definition will be embedded. For the Times Roman and Helvetica and corresponding styles, if displayed with a font alias, then the font alias will be embedded in the file. If the font has information that indicates the font cannot be embedded for print and preview, then the font will not be embedded in the document.
- `fonts` ([`const PDFont *`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdlayer.md#PDFont)): An array of PDFont containing fonts to be embedded.
- `nFonts` ([`ASUns32`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASUns32)): The number of fonts in the fonts array.
- `flags` ([`ASUns32`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASUns32)): One of the following:
  kDocEmbedSubset
  If set fonts will be subset when embedded. Otherwise the entire font will be embedded. Full fonts should only be embedded if the information in the fonts indicates it can be used for editible embedding. Fonts that have more than 2048 characters will be subset embedded regardless of the setting of this flag.

  kDocEmbedSubsetOfEmbeddedFont
  If set, fonts that have already been embedded but are not subset fonts, will be reembedded as a subset font.
- `statusMon` (`ASStatusMonitorProcs`): Pointer to a record containing a Progress Monitor, Cancel procedure, and report procedure. The procedures in the progress monitor are called to indicate the progress of the routine. The cancel procedure is called periodically to allow the client to cancel the routine. If the cancel procedure returns false then the routine is canceled. The report procedure will be called to report errors or warnings while embedding the fonts. For each font that cannot be embedded, the report procedure will be called.

**Returns:** `void`

**See also:** [`PDDocEmbedFonts`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDDocEmbedFonts)

#### PDDocFlattenAcroFormFieldsAsIfPrinted

```cpp
void PDDocFlattenAcroFormFieldsAsIfPrinted(PDDoc doc)
```

Header: `DLExtrasProcs.h:1489`

Flatten a AcroForms Document as if printed. Flattening transforms the document into static PDF page content. All AcroForm fields are removed. The Flattened appearance will take into consideration how the document's appearance should look when printed.

**Parameters**

- `doc` ([`PDDoc`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdlayer.md#PDDoc)): IN/OUT The PDF document object.

**Returns:** `void`

#### PDDocHasSignature

```cpp
ASBool PDDocHasSignature(PDDoc pdDoc)
```

Header: `DLExtrasProcs.h:794`

Determines if the document contains a digital signature.

**Parameters**

- `pdDoc` ([`PDDoc`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdlayer.md#PDDoc)): The document.

**Returns:** [`ASBool`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/plugins.md#ASBool)

If the document has a digital signature.

#### PDDocOptimizeDefaultParams

```cpp
PDFOptimizationParams PDDocOptimizeDefaultParams(void)
```

Header: `DLExtrasProcs.h:647`

This will create a set of optimization parameters, set to the default values. These can be examined using "get" methods, and changed with the "set" methods When these parameters are no longer needed (after the call to PDDocumentOptimize, although they be re-used any number of times), they should be freed by the method PDDocOptimizeReleaseParams.

**Parameters**

- (unnamed) (`void`)

**Returns:** [`PDFOptimizationParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDFOptimizationParams)

initialized optimization parameters that can be further modified.

**See also:** [`PDDocOptimizeReleaseParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDDocOptimizeReleaseParams)

#### PDDocOptimizeGetImageRecompress

```cpp
void PDDocOptimizeGetImageRecompress(PDFOptimizationParams Params, PDFOptimizerCompressImageType imageType, ASInt16 *recompressIfAbove, ASInt16 *recompressTo, PDFOptimizerCompressionType *compressType, PDFOptimizationCompressQuality *compressQuality)
```

Header: `DLExtrasProcs.h:729`

This will return the values set for one of the three cases of Image Recompression and Downsampling. These values are used in deciding which Images from the set of all Images in the document will be modified by the Optimizer.

**Parameters**

- `Params` ([`PDFOptimizationParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDFOptimizationParams)): IN a PDFOptimizationParams object to be checked
- `imageType` ([`PDFOptimizerCompressImageType`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDFOptimizerCompressImageType)): OUT The class of Images these parameters are to refer to.
- `recompressIfAbove` ([`ASInt16 *`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASInt16)): OUT The lower limit of resolution (In DPI) of an Image to be Resampled.
- `recompressTo` ([`ASInt16 *`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASInt16)): OUT The target DPI for Resampling. Images which are Resampled will be changed to this resolution.
- `compressType` ([`PDFOptimizerCompressionType *`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDFOptimizerCompressionType)): OUT a member of the enumeration PDFOptimizerCompressionType.
- `compressQuality` ([`PDFOptimizationCompressQuality *`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDFOptimizationCompressQuality)): OUT a member of the enumeration PDFOptimizationCompressQuality

**Returns:** `void`

**See also:** [`PDDocOptimizeSetImageRecompress`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDDocOptimizeSetImageRecompress)

#### PDDocOptimizeGetObjectCompression

```cpp
PDFOptimizerObjectCompressionType PDDocOptimizeGetObjectCompression(PDFOptimizationParams params)
```

Header: `DLExtrasProcs.h:671`

This will get the type of compression used for objects.

**Parameters**

- `params` ([`PDFOptimizationParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDFOptimizationParams)): the PDFOptimizationParams object from which the compression type will be read from.

**Returns:** [`PDFOptimizerObjectCompressionType`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDFOptimizerObjectCompressionType)

PDFOptimizerObjectCompressionType

**See also:** [`PDDocOptimizeSetObjectCompression`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDDocOptimizeSetObjectCompression)

#### PDDocOptimizeGetOption

```cpp
ASBool PDDocOptimizeGetOption(PDFOptimizationParams Params, PDFOptimizerOption option)
```

Header: `DLExtrasProcs.h:750`

This will return the setting of an optimization option.

**Parameters**

- `Params` ([`PDFOptimizationParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDFOptimizationParams)): IN. A PDFOptimizationParams object to be checked
- `option` ([`PDFOptimizerOption`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDFOptimizerOption)): IN. A member of the enumeration PDFOptimizerOption, selecting which option to effect.

**Returns:** [`ASBool`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/plugins.md#ASBool)

If true, the associated option is ON. If false, the option is OFF.

#### PDDocOptimizeGetPDFOutputLevel

```cpp
void PDDocOptimizeGetPDFOutputLevel(PDFOptimizationParams params, ASInt16 *majorP, ASInt16 *minorP)
```

Header: `DLExtrasProcs.h:691`

Gets the output level for the optimized pdf.

**Parameters**

- `params` ([`PDFOptimizationParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDFOptimizationParams))
- `majorP` ([`ASInt16 *`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASInt16)): (Filled by method) The major version number.
- `minorP` ([`ASInt16 *`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASInt16)): (Filled by method) The minor version number.

**Returns:** `void`

**See also:** [`PDDocOptimizeSetPDFOutputLevel`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDDocOptimizeSetPDFOutputLevel)

#### PDDocOptimizeReleaseParams

```cpp
void PDDocOptimizeReleaseParams(PDFOptimizationParams params)
```

Header: `DLExtrasProcs.h:654`

This will completely free the resources used by a PDFOptimizationParams structure.

**Parameters**

- `params` ([`PDFOptimizationParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDFOptimizationParams)): the PDFOptimizationParams to free.

**Returns:** `void`

#### PDDocOptimizeSetImageRecompress

```cpp
void PDDocOptimizeSetImageRecompress(PDFOptimizationParams Params, PDFOptimizerCompressImageType imageType, ASInt16 recompressIfAbove, ASInt16 recompressTo, PDFOptimizerCompressionType compressType, PDFOptimizationCompressQuality compressQuality)
```

Header: `DLExtrasProcs.h:712`

This will set the value for one of the cases of Image Recompression and Downsampling. These values are used in deciding which Images from the set of all Images in the document will be modified by the Optimizer.

**Parameters**

- `Params` ([`PDFOptimizationParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDFOptimizationParams)): IN a PDFOptimizationParams object to be modified
- `imageType` ([`PDFOptimizerCompressImageType`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDFOptimizerCompressImageType)): IN The class of Images these parameters are to refer to. This is a member of the Enumeration PDFOptimizerCompressImageType and is one of the set of values "Color", "Gray", or "Monochrome" (B/W).
- `recompressIfAbove` ([`ASInt16`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASInt16)): IN The lower limit of resolution (In DPI) of an Image to be Resampled. Only Images above this limitation will be considered for Resampling.
- `recompressTo` ([`ASInt16`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASInt16)): IN The target DPI for Resampling. Images which are Resampled will be changed to this resolution.
- `compressType` ([`PDFOptimizerCompressionType`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDFOptimizerCompressionType)): IN a member of the enumeration PDFOptimizerCompressionType. Images which are either Resampled or Recompressed will be written in this compression type. If the value of this enumeration is either the specifier for "Same", or for "None", then we will not Recompress images which do not require Downsampling.
- `compressQuality` ([`PDFOptimizationCompressQuality`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDFOptimizationCompressQuality)): IN a member of the enumeration PDFOptimizationCompressQuality. NOTE that this enumeration is only meaningful for lossy compression techniques. Note also that it is an error to specify "Lossless" for techniques that cannot support lossless compression.

**Returns:** `void`

**See also:** [`PDDocOptimizeGetImageRecompress`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDDocOptimizeGetImageRecompress)

#### PDDocOptimizeSetObjectCompression

```cpp
void PDDocOptimizeSetObjectCompression(PDFOptimizationParams params, PDFOptimizerObjectCompressionType compressionType)
```

Header: `DLExtrasProcs.h:663`

This will set the type of compression used for objects.

**Parameters**

- `params` ([`PDFOptimizationParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDFOptimizationParams)): a PDFOptimizationParams object to be modified.
- `compressionType` ([`PDFOptimizerObjectCompressionType`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDFOptimizerObjectCompressionType)): The type of compression to apply to the document.

**Returns:** `void`

**See also:** [`PDDocOptimizeGetObjectCompression`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDDocOptimizeGetObjectCompression)

#### PDDocOptimizeSetOption

```cpp
void PDDocOptimizeSetOption(PDFOptimizationParams Params, PDFOptimizerOption option, ASBool OnOff)
```

Header: `DLExtrasProcs.h:741`

This will set one the optimzation option either ON or OFF.

**Parameters**

- `Params` ([`PDFOptimizationParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDFOptimizationParams)): IN. A PDFOptimizationParams object to be modified
- `option` ([`PDFOptimizerOption`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDFOptimizerOption)): IN. A member of the enumeration PDFOptimizerOption, selecting which option to effect.
- `OnOff` ([`ASBool`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/plugins.md#ASBool)): IN. If true, set the associated option as ON. If false, set it as OFF.

**Returns:** `void`

**See also:** [`PDDocOptimizeGetOption`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDDocOptimizeGetOption)

#### PDDocOptimizeSetPDFOutputLevel

```cpp
void PDDocOptimizeSetPDFOutputLevel(PDFOptimizationParams params, ASInt16 majorP, ASInt16 minorP)
```

Header: `DLExtrasProcs.h:681`

Sets the output level for the optimized pdf.

**Parameters**

- `params` ([`PDFOptimizationParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDFOptimizationParams))
- `majorP` ([`ASInt16`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASInt16)): The major version number.
- `minorP` ([`ASInt16`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASInt16)): The minor version number.

**Returns:** `void`

**See also:** [`PDDocOptimizeGetPDFOutputLevel`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDDocOptimizeGetPDFOutputLevel)

#### PDDocOptimizeSetTDMReservationPolicy

```cpp
void PDDocOptimizeSetTDMReservationPolicy(PDDoc inputDoc, PDFOptimizationParams params, ASBool reservation, ASText policyURL)
```

Header: `DLExtrasProcs.h:1846`

This will set the Text Data Mining (TDM) reservation and policy of the Document.

**Parameters**

- `inputDoc` ([`PDDoc`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdlayer.md#PDDoc)): IN Document object
- `params` ([`PDFOptimizationParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDFOptimizationParams)): IN PDFOptimizationParams object
- `reservation` ([`ASBool`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/plugins.md#ASBool)): IN TDM reservation being set
- `policyURL` ([`ASText`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASText))

**Returns:** `void`

#### PDDocQREncodeParamsDefault

```cpp
QREncodeParams PDDocQREncodeParamsDefault(void)
```

Header: `DLExtrasProcs.h:1871`

This will create a set of Encode Parameters, set to the default values. These can be examined using "get" methods, and changed with the "set" methods When these parameters are no longer needed, they should be freed by the method PDDocQREncodeParamsRelease.

**Parameters**

- (unnamed) (`void`)

**Returns:** [`QREncodeParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#QREncodeParams)

initialized parameters that can be further modified. NOTE: Typical usage is to specify where the code should be located, what size it should be, what should be encoded etc. The default values are prepopulated to be a small visible barcode on a typical page size.

**See also:** [`PDDocQREncodeParamsRelease`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDDocQREncodeParamsRelease)

#### PDDocQREncodeParamsGetBackgroundColor

```cpp
void PDDocQREncodeParamsGetBackgroundColor(QREncodeParams params, QRColor *backgroundColor)
```

Header: `DLExtrasProcs.h:1949`

Gets the Background Color of the QR code to be Encoded.

**Parameters**

- `params` ([`QREncodeParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#QREncodeParams))
- `backgroundColor` ([`QRColor *`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#QRColor)): The color of the Background of the barcode

**Returns:** `void`

**See also:** [`PDDocQREncodeParamsSetBackgroundColor`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDDocQREncodeParamsSetBackgroundColor)

#### PDDocQREncodeParamsGetCodeColor

```cpp
void PDDocQREncodeParamsGetCodeColor(QREncodeParams params, QRColor *codeColor)
```

Header: `DLExtrasProcs.h:1963`

Gets the Code Color of the QR code to be Encoded.

**Parameters**

- `params` ([`QREncodeParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#QREncodeParams))
- `codeColor` ([`QRColor *`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#QRColor)): The color of the Code itself

**Returns:** `void`

**See also:** [`PDDocQREncodeParamsSetCodeColor`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDDocQREncodeParamsSetCodeColor)

#### PDDocQREncodeParamsGetErrorLevel

```cpp
void PDDocQREncodeParamsGetErrorLevel(QREncodeParams params, QRErrorCorrectionLevel *errorLevel)
```

Header: `DLExtrasProcs.h:1921`

Gets the Error Correction Level of the QR code to be Encoded

**Parameters**

- `params` ([`QREncodeParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#QREncodeParams))
- `errorLevel` ([`QRErrorCorrectionLevel *`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#QRErrorCorrectionLevel)): The Error Correction Level

**Returns:** `void`

**See also:** [`PDDocQREncodeParamsSetErrorLevel`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDDocQREncodeParamsSetErrorLevel)

#### PDDocQREncodeParamsGetPositionAndSize

```cpp
void PDDocQREncodeParamsGetPositionAndSize(QREncodeParams params, ASDouble *x, ASDouble *y, ASDouble *width, ASDouble *height)
```

Header: `DLExtrasProcs.h:1904`

Gets the Position and Size of the QR code to be Encoded.

**Parameters**

- `params` ([`QREncodeParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#QREncodeParams))
- `x` ([`ASDouble *`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASDouble)): The x location of the Code
- `y` ([`ASDouble *`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASDouble)): The y location of the Code
- `width` ([`ASDouble *`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASDouble)): The width of the Code
- `height` ([`ASDouble *`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASDouble)): The height of the Code

**Returns:** `void`

**See also:** [`PDDocQREncodeParamsSetPositionAndSize`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDDocQREncodeParamsSetPositionAndSize)

#### PDDocQREncodeParamsGetQuietZoneSize

```cpp
void PDDocQREncodeParamsGetQuietZoneSize(QREncodeParams params, ASUns32 *quietZoneSize)
```

Header: `DLExtrasProcs.h:1935`

Gets the Size in pixels of the Quiet Zone on each side of the QR code to be Encoded.

**Parameters**

- `params` ([`QREncodeParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#QREncodeParams))
- `quietZoneSize` ([`ASUns32 *`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASUns32)): The Size of the Quiet Zone

**Returns:** `void`

**See also:** [`PDDocQREncodeParamsSetQuietZoneSize`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDDocQREncodeParamsSetQuietZoneSize)

#### PDDocQREncodeParamsGetTextToEncode

```cpp
void PDDocQREncodeParamsGetTextToEncode(QREncodeParams params, ASText *textToEncode)
```

Header: `DLExtrasProcs.h:1886`

Gets the Text of the QR code to be Encoded.

**Parameters**

- `params` ([`QREncodeParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#QREncodeParams))
- `textToEncode` ([`ASText *`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASText)): The text to be encoded

**Returns:** `void`

**See also:** [`PDDocQREncodeParamsSetTextToEncode`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDDocQREncodeParamsSetTextToEncode)

#### PDDocQREncodeParamsRelease

```cpp
void PDDocQREncodeParamsRelease(QREncodeParams params)
```

Header: `DLExtrasProcs.h:1879`

This will completely free the resources used by a QREncodeParams structure.

**Parameters**

- `params` ([`QREncodeParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#QREncodeParams)): the QREncodeParams to free.

**Returns:** `void`

**See also:** [`PDDocQREncodeParamsDefault`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDDocQREncodeParamsDefault)

#### PDDocQREncodeParamsSetBackgroundColor

```cpp
void PDDocQREncodeParamsSetBackgroundColor(QREncodeParams params, QRColor backgroundColor)
```

Header: `DLExtrasProcs.h:1956`

Sets the Background Color of the QR code to be Encoded.

**Parameters**

- `params` ([`QREncodeParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#QREncodeParams))
- `backgroundColor` ([`QRColor`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#QRColor)): The color of the Background of the barcode

**Returns:** `void`

**See also:** [`PDDocQREncodeParamsGetBackgroundColor`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDDocQREncodeParamsGetBackgroundColor)

#### PDDocQREncodeParamsSetCodeColor

```cpp
void PDDocQREncodeParamsSetCodeColor(QREncodeParams params, QRColor codeColor)
```

Header: `DLExtrasProcs.h:1970`

Sets the Code Color of the QR code to be Encoded.

**Parameters**

- `params` ([`QREncodeParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#QREncodeParams))
- `codeColor` ([`QRColor`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#QRColor)): The color of the Code itself

**Returns:** `void`

**See also:** [`PDDocQREncodeParamsGetCodeColor`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDDocQREncodeParamsGetCodeColor)

#### PDDocQREncodeParamsSetErrorLevel

```cpp
void PDDocQREncodeParamsSetErrorLevel(QREncodeParams params, QRErrorCorrectionLevel errorLevel)
```

Header: `DLExtrasProcs.h:1928`

Sets the Error Correction Level of the QR code to be Encoded

**Parameters**

- `params` ([`QREncodeParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#QREncodeParams))
- `errorLevel` ([`QRErrorCorrectionLevel`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#QRErrorCorrectionLevel)): The Error Correction Level

**Returns:** `void`

**See also:** [`PDDocQREncodeParamsGetErrorLevel`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDDocQREncodeParamsGetErrorLevel)

#### PDDocQREncodeParamsSetPositionAndSize

```cpp
void PDDocQREncodeParamsSetPositionAndSize(QREncodeParams params, ASDouble x, ASDouble y, ASDouble width, ASDouble height)
```

Header: `DLExtrasProcs.h:1914`

Sets the Position and Size of the QR code to be Encoded.

**Parameters**

- `params` ([`QREncodeParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#QREncodeParams))
- `x` ([`ASDouble`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASDouble)): The x location of the Code
- `y` ([`ASDouble`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASDouble)): The y location of the Code
- `width` ([`ASDouble`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASDouble)): The width of the Code
- `height` ([`ASDouble`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASDouble)): The height of the Code

**Returns:** `void`

**See also:** [`PDDocQREncodeParamsGetPositionAndSize`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDDocQREncodeParamsGetPositionAndSize)

#### PDDocQREncodeParamsSetQuietZoneSize

```cpp
void PDDocQREncodeParamsSetQuietZoneSize(QREncodeParams params, ASUns32 quietZoneSize)
```

Header: `DLExtrasProcs.h:1942`

Sets the Size in pixels of the Quiet Zone on each side of the QR code to be Encoded.

**Parameters**

- `params` ([`QREncodeParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#QREncodeParams))
- `quietZoneSize` ([`ASUns32`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASUns32))

**Returns:** `void`

**See also:** [`PDDocQREncodeParamsGetQuietZoneSize`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDDocQREncodeParamsGetQuietZoneSize)

#### PDDocQREncodeParamsSetTextToEncode

```cpp
void PDDocQREncodeParamsSetTextToEncode(QREncodeParams params, ASText textToEncode)
```

Header: `DLExtrasProcs.h:1894`

Sets the Text of the QR code to be Encoded.

**Parameters**

- `params` ([`QREncodeParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#QREncodeParams))
- `textToEncode` ([`ASText`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASText)): The text to be encoded NOTE: If textToEncode has already been set to a ASText object, it will be released first.

**Returns:** `void`

**See also:** [`PDDocQREncodeParamsGetTextToEncode`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDDocQREncodeParamsGetTextToEncode)

#### PDDocRemoveAttachment

```cpp
void PDDocRemoveAttachment(PDDoc doc, char *attachmentNameToRemove)
```

Header: `DLExtrasProcs.h:1497`

Removes a PDF attachment that matches the specified name.

**Parameters**

- `doc` ([`PDDoc`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdlayer.md#PDDoc)): IN The PDF document object.
- `attachmentNameToRemove` (`char *`): IN The attachment name to remove, this should be a null terminated string.

**Returns:** `void`

#### PDDocReplaceUnembeddedSimpleFonts

```cpp
void PDDocReplaceUnembeddedSimpleFonts(PDDoc doc, ASAtom *currentFontNames, ASAtom *newFontNames, ASUns32 fontNamesLength)
```

Header: `DLExtrasProcs.h:853`

NOTE: This method should only be used by advanced users. It is useful for applications that need to define precise font substitutions for unembedded fonts rather than relying on the PDF Viewer to find a suitable font on the local system. If you choose a new font replacement that is not similar to the font being replaced, in terms of encoding, metrics, and glyphs, your result may appear distorted or incorrect in a variety of ways. The user must take care when selecting a replacement font. This method replaces Simple (not Type 0 or Composite), Unembedded, non-subset Fonts with a different font. NOTE: Fonts that lack required dictionary entries (e.g. /FontDescriptor) will have default ones created.

**Parameters**

- `doc` ([`PDDoc`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdlayer.md#PDDoc)): IN a PDDoc object (Required)
- `currentFontNames` ([`ASAtom *`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASAtom)): IN The names of the fonts to be replaced (Required)
- `newFontNames` ([`ASAtom *`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASAtom)): IN The names of the new fonts (Required)
- `fontNamesLength` ([`ASUns32`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASUns32)): IN The number of current font names and the number of new font names (they have to be the same) (Required)

**Returns:** `void`

#### PDDocWillNeedIncrementalSave

```cpp
ASBool PDDocWillNeedIncrementalSave(PDDoc pdDoc)
```

Header: `DLExtrasProcs.h:802`

Determines if the document must be saved incrementally.

**Parameters**

- `pdDoc` ([`PDDoc`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdlayer.md#PDDoc)): The document.

**Returns:** [`ASBool`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/plugins.md#ASBool)

If the document requires an Incremental save.

#### PDDocumentOptimize

```cpp
ASBool PDDocumentOptimize(PDDoc InputDoc, ASPathName OutputPath, ASFileSys fileSys, PDFOptimizationParams params, ProgressMonitor progMon, void *progMonClientData, ASCancelProc cancelProc, void *cancelProcClientData)
```

Header: `DLExtrasProcs.h:633`

This function is used to create an optimized document. The types of Optimization performed depend on the optimization parameters. The result of optimization is a new document, saved to a file.

**Parameters**

- `InputDoc` ([`PDDoc`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdlayer.md#PDDoc)): IN a PDDoc object (Required)
- `OutputPath` ([`ASPathName`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASPathName)): IN an ASFilePath where the optimized document is to be written (Required)
- `fileSys` ([`ASFileSys`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASFileSys))
- `params` ([`PDFOptimizationParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDFOptimizationParams))
- `progMon` ([`ProgressMonitor`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ProgressMonitor))
- `progMonClientData` (`void *`): IN An optional pointer to client data used by the progress monitor.
- `cancelProc` ([`ASCancelProc`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASCancelProc)): IN an optional pointer to a cancel procedure
- `cancelProcClientData` (`void *`): IN an optional pointer to cancel proc client data

**Returns:** [`ASBool`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/plugins.md#ASBool)

#### PDDocumentOptimizeWithReport

```cpp
ASBool PDDocumentOptimizeWithReport(PDDoc InputDoc, ASPathName OutputPath, ASFileSys fileSys, PDFOptimizationParams params, ProgressMonitor progMon, void *progMonClientData, ASCancelProc cancelProc, void *cancelProcClientData, PDFOptimizerReport report)
```

Header: `DLExtrasProcs.h:834`

This facility is used to create an optimized copy of the original document. Optimization can be in many specific forms, controlled by control records input to the optimizer. The result of optimization is always a new document, saved to a file. This is because some of the optimizations are done at Document save time.

**Parameters**

- `InputDoc` ([`PDDoc`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdlayer.md#PDDoc)): IN a PDDoc object (Required)
- `OutputPath` ([`ASPathName`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASPathName)): IN an ASFilePath where the optimized document is to be written (Required)
- `fileSys` ([`ASFileSys`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASFileSys))
- `params` ([`PDFOptimizationParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDFOptimizationParams))
- `progMon` ([`ProgressMonitor`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ProgressMonitor))
- `progMonClientData` (`void *`): IN An optional pointer to client data used by the progress monitor
- `cancelProc` ([`ASCancelProc`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASCancelProc)): IN an optional pointer to a cancel procedure
- `cancelProcClientData` (`void *`): IN an optiona pointer to cancel proc client data
- `report` ([`PDFOptimizerReport`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDFOptimizerReport)): OUT an PDFOptimizerReport that will be filled by the method

**Returns:** [`ASBool`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/plugins.md#ASBool)

### Structures (5)

#### PDDocTextFinder

```cpp
typedef struct _t_PDDocTextFinder* PDDocTextFinder
```

Header: `DLExtrasExpT.h:395`

Extracts words or phrases that match a regular expression (regex) on a given page range or on all of the pages in a document.

#### PDDocTextFinderConfig

```cpp
typedef  struct PDDocTextFinderConfigRec * PDDocTextFinderConfig
```

Header: `DLExtrasExpT.h:404`

#### PDFOptimizationParams

```cpp
typedef struct _t_PDFOptimizationParamsRec* PDFOptimizationParams
```

Header: `DLExtrasExpT.h:253`

An opaque type collecting together the PDFOptimizerOption parameters for PDDocumentOptimize.

#### PDFOptimizerReport

```cpp
typedef  struct PDFOptimizerReportRec * PDFOptimizerReport
```

Header: `DLExtrasExpT.h:391`

#### QRColor

```cpp
typedef  struct QRColorRec * QRColor
```

Header: `DLExtrasExpT.h:739`

### Enums (7)

#### PDDocEmbedFontFlags

Header: `DLExtrasExpT.h:50`

Flags for PDDocEmbedFonts.

**Values**

- `kDocEmbedSubset = 0x01`: Fonts will be subset when embedded. Otherwise the entire font will be embedded. Full fonts should only be embedded if the information in the fonts indicates it can be used for editible embedding. Fonts that have more than 2048 characters will be subset embedded regardless of the setting of this flag.

  This flag implies a scan of the document text to ensure that all required characters are in the subset.
- `kDocEmbedSubsetOfEmbeddedFont = 0x02`: If set, fonts that have already been embedded but are not subset fonts, will be reembedded as a subset font.

  If clear, already embedded fonts will not be re-scanned for embedding at all, subset or no.

#### PDFOptimizationCompressQuality

Header: `DLExtrasExpT.h:106`

Compression quality options

**Values**

- `PDFOptimizerCompressQualityUnset = 0`
- `PDFOptimizerCompressMinimum = 1`
- `PDFOptimizerCompressLowQuality = 2`
- `PDFOptimizerCompressMediumQuality = 3`
- `PDFOptimizerCompressHighQuality = 4`
- `PDFOptimizerCompressMaximumQuality = 5`
- `PDFOptimizerCompressLossless = 6`

#### PDFOptimizerCompressImageType

Header: `DLExtrasExpT.h:117`

Image types for PDFOptimizer compression

**Values**

- `PDFOptimizerColor = 1`: Compress colored images
- `PDFOptimizerGray = 2`: Compress Gray scale Images
- `PDFOptimizerMonochrome = 3`: Compress B/W images

#### PDFOptimizerCompressionType

Header: `DLExtrasExpT.h:84`

types of compression for PDFOptimizer

**Values**

- `PDFOptimizerRecompressNone = 0`: Used only when original image is not compressed
- `PDFOptimizerRecompressSame = 1`: Compress using the same compression
- `PDFOptimizerRecompressFlate = 2`: Compress image using Flate
- `PDFOptimizerRecompressJpeg = 3`: Compress image using Jpeg
- `PDFOptimizerRecompressJP2k = 4`: Compress image using JPEG2000
- `PDFOptimizerRecompressJBig = 5`: Compress image using JBig2
- `PDFOptimizerRecompressCCITTG4 = 6`: Compress image using CCITTG4
- `PDFOptimizerRecompressCCITTG3 = 7`: Compress image using CCITTG3
- `PDFOptimizerRecompressFlateJpeg = 8`: Compress using Flate and Jpeg

#### PDFOptimizerObjectCompressionType

Header: `DLExtrasExpT.h:127`

Object Compression types for PDFOptimizer

**Values**

- `PDFOptimizerObjectCompressionAll = 0`: Compress all objects.
- `PDFOptimizerObjectCompressionNone = 1`: No object compression is used.
- `PDFOptimizerObjectCompressionStructure = 2`: Compress objects related to Logical Structure of a document.
- `PDFOptimizerObjectCompressionLeaveUnchanged = 3`: Leave object compression unchanged.

#### PDFOptimizerOption

Header: `DLExtrasExpT.h:143`

PDFOptimizer Options

**Values**

- `PDFOptimizerDownsampleColor = 1`: Defaults to ON
- `PDFOptimizerRecompressColor = 2`: Defaults to ON
- `PDFOptimizerDownsampleGray = 3`: Defaults to ON
- `PDFOptimizerRecompressGray = 4`: Defaults to ON
- `PDFOptimizerDownsampleBW = 5`: Defaults to ON
- `PDFOptimizerRecompressBW = 6`: Defaults to ON
- `PDFOptimizerDownsampleRecompressOnlyIfSmaller = 7`: Defaults to ON
- `PDFOptimizerDiscardAlternateImages = 8`: Defaults to ON
- `PDFOptimizerSubsetAllEmbeddedFonts = 9`: Defaults to ON
- `PDFOptimizerRemoveAllEmbeddedFonts = 10`: Defaults to OFF
- `PDFOptimizerRemoveAllBase14Fonts = 11`: Defaults to ON
- `PDFOptimizerMergeDuplicateFonts = 12`: Defaults to ON
- `PDFOptimizerDiscardBookmarks = 13`: Defaults to OFF
- `PDFOptimizerDiscardAcroforms = 14`: Defaults to OFF
- `PDFOptimizerDiscardOutputIntent = 15`: Defaults to ON
- `PDFOptimizerDiscardThumbnails = 16`: Defaults to ON
- `PDFOptimizerDiscardPageLabels = 17`: Defaults to ON
- `PDFOptimizerDiscardNameTrees = 18`: Defaults to ON
- `PDFOptimizerDiscardStructureTrees = 19`: Defaults to ON
- `PDFOptimizerDiscardFileAttachments = 20`: Defaults to ON
- `PDFOptimizerDiscardXMPPadding = 21`: Defaults to ON Remove padding from XMP Metadata
- `PDFOptimizerDiscardUnusedForms = 22`: Defaults to ON
- `PDFOptimizerDiscardPieceData = 23`: Defaults to ON
- `PDFOptimizerCompressStreams = 24`: Defaults to ON, indicates if Uncompressed Streams will be compressed when possible.
- `PDFOptimizerReplaceLZW = 25`: Defaults to ON When set to false, the related option PDFOptimizerOptimizeContentStreams must also be disabled or Page /Contents that are LZW-compressed won't be affected.
- `PDFOptimizerDiscardMetadata = 26`: Defaults to ON
- `PDFOptimizerDiscardDocumentInfo = 27`: Defaults to ON
- `PDFOptimizerOptimizeContentStreams = 28`: Defaults to ON, indicates if Page /Contents will be compressed when possible by removing redundancies and utilizing Flate compression.
- `PDFOptimizerLinearize = 29`: Defaults to OFF
- `PDFOptimizerDiscardDuplicateForms = 30`: Defaults to OFF
- `PDFOptimizerDiscardDuplicateObjects = 31`: Defaults to ON
- `PDFOptimizerDiscardASCIIFilters = 32`: Defaults to ON
- `PDFOptimizerDiscardComments = 33`: Defaults to OFF, discards Markup Annotations
- `PDFOptimizerDiscardAnnotations = 34`: Defaults to OFF, discards any Annotation besides Widgets
- `PDFOptimizerDiscardJavaScriptActions = 35`: Defaults to OFF
- `PDFOptimizerFlattenOptionalContent = 36`: Defaults to OFF
- `PDFOptimizerResubsetSubsetFonts = 37`: Defaults to ON.

  The related option PDFOptimizerSubsetAllEmbeddedFonts must be Enabled for this option to have an effect. Fonts which are already Embedded Subset will be Re-subset. If the document being optimized represents an extraction of pages from a larger document, or if the document has been edited to remove Content, this can result in savings. NOTE: This can ONLY remove glyphs from an already subset font. It doesn't add missing glyphs.
- `PDFOptimizerDownConvert16To8BpcImages = 38`: Defaults to ON
- `PDFOptimizerDiscardUnusedImages = 39`: Defaults to ON
- `PDFOptimizerDiscardUnusedFonts = 40`: Defaults to ON
- `PDFOptimizerIncludeIndexedImages = 41`: Defaults to ON. Controls if Indexed images are eligible for compression and downsampling or not. When true, if possible, Indexed images are recompressed and/or downsampled. When false, Indexed images aren't recompressed or downsampled.
- `PDFOptimizerDoNotPersistFileAttributes = 42`: Defaults to OFF
- `PDFOptimizerDoNotConvertDeviceNImages = 43`: Defaults to OFF
- `PDFOptimizerLastOption = 44`

**See also:** [`PDDocOptimizeDefaultParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDDocOptimizeDefaultParams), [`PDDocumentOptimize`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDDocumentOptimize)

#### QRErrorCorrectionLevel

Header: `DLExtrasExpT.h:713`

The Error Correction Level of the QR Code

**Values**

- `Low = 0`: Can tolerate 7% of bad codewords.
- `Medium = 1`: Can tolerate 15% of bad codewords.
- `Quartile = 2`: Can tolerate 25% of bad codewords.
- `High = 3`: Can tolerate 30% of bad codewords.

## PDDocTextFinder

### Functions (5)

#### PDDocTextFinderAcquireMatchList

```cpp
PDDocTextFinderMatchList PDDocTextFinderAcquireMatchList(PDDocTextFinder mObj, PDDoc pdDoc, ASInt32 beginPageNumber, ASInt32 endPageNumber, const char *regexstr)
```

Header: `DLExtrasProcs.h:987`

Finds all regular expression (regex) matches for the given page range. Only words within or partially within the page's crop box (see PDPageGetCropBox()) are included. Words outside the crop box are skipped. There can be only one match list in existence at a time; clients must release the previous match list, using PDDocTextFinderReleaseMatchList(), before creating a new one. Available only on Windows, Mac, and Linux platforms

**Parameters**

- `mObj` ([`PDDocTextFinder`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDDocTextFinder)): IN (Required) The document text finder used to acquire the match list.
- `pdDoc` ([`PDDoc`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdlayer.md#PDDoc)): IN (Required) The document to search for matches.
- `beginPageNumber` ([`ASInt32`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASInt32)): IN (Required) The beginning page number from which to search.
  The first page is `0`, not `1` as designated in Acrobat.
  Pass PDAllPages (see PDExpT.h) to sequentially process all
  pages in the document.
- `endPageNumber` ([`ASInt32`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASInt32)): IN (Required) The end page number from which to search to.
  If beginPageNumber is set to PDAllPages, this parameter is ignored.
- `regexstr` (`const char *`)

**Returns:** `PDDocTextFinderMatchList`

**Exceptions**

- `pdErrBadRegex`

**See also:** [`PDDocTextFinderCreate`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDDocTextFinderCreate), [`PDDocTextFinderReleaseMatchList`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDDocTextFinderReleaseMatchList)

#### PDDocTextFinderCreate

```cpp
PDDocTextFinder PDDocTextFinderCreate(PDWordFinderConfig wfConfig)
```

Header: `DLExtrasProcs.h:919`

Creates a document text finder that is used to extract words or phrases that match regular expressions from a PDF file based on words extracted using a given word finder configuration. Available only on Windows, Mac, and Linux platforms

**Parameters**

- `wfConfig` (`PDWordFinderConfig`): IN (Required) The word finder configuration to be used to extract the words.

**Returns:** [`PDDocTextFinder`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDDocTextFinder)

**See also:** [`PDDocTextFinderDestroy`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDDocTextFinderDestroy), [`PDDocTextFinderAcquireMatchList`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDDocTextFinderAcquireMatchList), [`PDDocTextFinderReleaseMatchList`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDDocTextFinderReleaseMatchList), [`PDDocTextFinderCreateEx`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDDocTextFinderCreateEx)

#### PDDocTextFinderCreateEx

```cpp
PDDocTextFinder PDDocTextFinderCreateEx(PDWordFinderConfig wfConfig, PDDocTextFinderConfig dtfConfig)
```

Header: `DLExtrasProcs.h:937`

Creates a document text finder with additional configurable properties. Available only on Windows, Mac, and Linux platforms

**Parameters**

- `wfConfig` (`PDWordFinderConfig`): IN (Required) The word finder configuration to be used to extract the words.
- `dtfConfig` ([`PDDocTextFinderConfig`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDDocTextFinderConfig)): IN (Required) The document text finder configuration to be used to configure the extracted text.

**Returns:** [`PDDocTextFinder`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDDocTextFinder)

**See also:** [`PDDocTextFinderDestroy`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDDocTextFinderDestroy), [`PDDocTextFinderAcquireMatchList`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDDocTextFinderAcquireMatchList), [`PDDocTextFinderReleaseMatchList`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDDocTextFinderReleaseMatchList), [`PDDocTextFinderCreate`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDDocTextFinderCreate)

#### PDDocTextFinderDestroy

```cpp
void PDDocTextFinderDestroy(PDDocTextFinder mObj)
```

Header: `DLExtrasProcs.h:951`

Destroys a document text finder. Use this when you are done extracting phrases in a file. Available only on Windows, Mac, and Linux platforms

**Parameters**

- `mObj` ([`PDDocTextFinder`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDDocTextFinder)): IN (Required) The document text finder to destroy.

**Returns:** `void`

**See also:** [`PDDocTextFinderCreate`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDDocTextFinderCreate)

#### PDDocTextFinderReleaseMatchList

```cpp
void PDDocTextFinderReleaseMatchList(PDDocTextFinder mObj)
```

Header: `DLExtrasProcs.h:1002`

Releases the match list. Use this to release a list created by PDDocTextFinderAcquireMatchList() when you are done using this list. Available only on Windows, Mac, and Linux platforms

**Parameters**

- `mObj` ([`PDDocTextFinder`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDDocTextFinder)): IN (Required) A document text finder object.

**Returns:** `void`

**See also:** [`PDDocTextFinderCreate`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDDocTextFinderCreate), [`PDDocTextFinderAcquireMatchList`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDDocTextFinderAcquireMatchList)

## PDEContent

### Functions (2)

#### PDEContentGetAttrsEx

```cpp
void PDEContentGetAttrsEx(IN PDEContent pdeContent, OUT PDEContentAttrsExP attrsP, IN ASUns32 attrsSize)
```

Header: `PERProcs.h:3426`

Obtains `PDEContentAttrsEx`, which gives matrix and bounding box in ASDouble Gets the attributes of a content.

**Parameters**

- `pdeContent` (`IN PDEContent`): IN/OUT A content object.
- `attrsP` (`OUT PDEContentAttrsExP`): IN/OUT (Filled by the method) A pointer to a `PDEContentAttrsEx` structure containing the attributes of the content.
- `attrsSize` (`IN ASUns32`): IN/OUT The size of the `attrsP` buffer in bytes.

**Returns:** `void`

**Exceptions**

- `peErrWrongPDEObjectType`

#### PDEContentToCosObjEx

```cpp
void PDEContentToCosObjEx(IN PDEContent pdeContent, IN ASUns32 flags, IN PDEContentAttrsExP attrs, IN ASUns32 attrsSize, IN CosDoc cosDoc, IN PDEFilterArrayP filtersP, OUT CosObj *contentsP, OUT CosObj *resourcesP)
```

Header: `PEWProcs.h:108`

This is the same as PDEContentToCosObj, above, except that the Content Attributes are passed as `PDEContentAttrsEx`, so as to allow for ASDouble Matrices and Bounding Boxes

**Parameters**

- `pdeContent` (`IN PDEContent`)
- `flags` (`IN ASUns32`)
- `attrs` (`IN PDEContentAttrsExP`)
- `attrsSize` (`IN ASUns32`)
- `cosDoc` (`IN CosDoc`)
- `filtersP` (`IN PDEFilterArrayP`)
- `contentsP` (`OUT CosObj *`)
- `resourcesP` (`OUT CosObj *`)

**Returns:** `void`

## PDEFont

### Functions (1)

#### PDEFontCheckASTextIsRepresentable

```cpp
ASBool PDEFontCheckASTextIsRepresentable(const PDEFont font, const ASText text, ASUns32 *index)
```

Header: `DLExtrasProcs.h:338`

Routine to check that the entire contents of an ASText are representable in the font. If the index parameter is not NULL and this function returns FALSE, the index will indicate the first character not representable in the font. An exception will be raised if the supplied font is incompatible with the API. Such may happen, for example, if font is a Type 1 font or if the font is retrieved from an existing PDF document.

**Parameters**

- `font` ([`const PDEFont`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdelayer.md#PDEFont)): The PDEFont to check against. Its type must be 'Type0' or 'TrueType'.
- `text` ([`const ASText`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASText)): An ASText containing the text to check
- `index` ([`ASUns32 *`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASUns32)): The index of the first character in the Unicode representation of the string that could not be represented in the font. May be NULL if the user wants to ignore this information.

**Returns:** [`ASBool`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/plugins.md#ASBool)

Whether the ASText is representable or not using the font.

## PDEForm

### Functions (7)

#### PDEFormCalcBBox

```cpp
void PDEFormCalcBBox(PDEForm form)
```

Header: `DLExtrasProcs.h:616`

This function allows the BBox stored in a form's XObject to be recalculated after its contents have been modified. The bounding box of a form is set in the COS form, and is usually not changed by any event in the conversions between PDE and COS content. This is done so that the user may set the bounding box of a form so as to specifically clip its contents to a given path (the bounding box). Sometimes the content of a form is changed, and then the user may want to reset the form's bounding box to the size of the current content.

**Parameters**

- `form` ([`PDEForm`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdelayer.md#PDEForm)): the PDEForm whose BBox should be recalculated.

**Returns:** `void`

#### PDEFormGetFont

```cpp
PDEFont PDEFormGetFont(PDEForm form)
```

Header: `DLExtrasProcs.h:558`

This retrieves the PDEFont referenced in a PDEForm.

**Parameters**

- `form` ([`PDEForm`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdelayer.md#PDEForm)): The PDEForm of interest

**Returns:** [`PDEFont`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdelayer.md#PDEFont)

**See also:** [`PDEFormSetFont`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDEFormSetFont)

#### PDEFormGetName

```cpp
ASAtom PDEFormGetName(IN PDEForm form)
```

Header: `DLExtrasProcs.h:1014`

Reserved for Internal Use.

**Parameters**

- `form` (`IN PDEForm`)

**Returns:** [`ASAtom`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASAtom)

#### PDEFormGetTextState

```cpp
void PDEFormGetTextState(IN PDEForm form, OUT PDETextState *tState)
```

Header: `PERProcs.h:3389`

Gets the `PDETextState` for a form.

**Parameters**

- `form` (`IN PDEForm`): IN The form whose Cos object is obtained.
- `tState` (`OUT PDETextState *`)

**Returns:** `void`

**Exceptions**

- `peErrWrongPDEObjectType`

#### PDEFormSetContentEx

```cpp
void PDEFormSetContentEx(IN PDEForm form, IN PDEContent content)
```

Header: `DLExtrasProcs.h:1106`

Reserved for Internal Use.

**Parameters**

- `form` (`IN PDEForm`)
- `content` (`IN PDEContent`)

**Returns:** `void`

#### PDEFormSetFont

```cpp
void PDEFormSetFont(PDEForm form, PDEFont font)
```

Header: `DLExtrasProcs.h:565`

This sets the PDEFont referenced in a PDEForm.

**Parameters**

- `form` ([`PDEForm`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdelayer.md#PDEForm)): The PDEForm of interest.
- `font` ([`PDEFont`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdelayer.md#PDEFont)): The PDEFont to be set.

**Returns:** `void`

**See also:** [`PDEFormGetFont`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDEFormGetFont)

#### PDEFormSetTextState

```cpp
void PDEFormSetTextState(IN PDEForm form, IN PDETextState *tState)
```

Header: `PERProcs.h:3398`

Sets the `PDETextState` for a form.

**Parameters**

- `form` (`IN PDEForm`): IN The form whose Cos object is obtained.
- `tState` (`IN PDETextState *`)

**Returns:** `void`

**Exceptions**

- `peErrWrongPDEObjectType`

## PDEGraphicFont

### Functions (1)

#### PDEGraphicFontGetPDEFont

```cpp
PDEFont PDEGraphicFontGetPDEFont(IN PDEGraphicFont font)
```

Header: `DLExtrasProcs.h:1008`

Reserved for Internal Use.

**Parameters**

- `font` (`IN PDEGraphicFont`)

**Returns:** [`PDEFont`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdelayer.md#PDEFont)

## PDEImage

### Functions (2)

#### PDEImageGetColorValue

```cpp
void PDEImageGetColorValue(IN PDEImage image, IN PDEColorValueP color)
```

Header: `PERProcs.h:3364`

Gets an image's Color Value. This call is valid only for a PDEImage which is an Image Mask

**Parameters**

- `image` (`IN PDEImage`): IN/OUT The image whose data is obtained.
- `color` (`IN PDEColorValueP`)

**Returns:** `void`

**Exceptions**

- `peErrUnknownPDEColorSpace`
- `genErrBadParm`
- `peErrWrongPDEObjectType`

#### PDEImageRemoveIndexedColor

```cpp
PDEImage PDEImageRemoveIndexedColor(PDEImage image)
```

Header: `DLExtrasProcs.h:786`

If the image input uses an indexed color space, a new image will be created from it. The new image will use the base color space. If the image is not using an indexed color model, the original image will be incremented and returned. **Note:** The image returned must be released when no longer needed.

**Parameters**

- `image` ([`PDEImage`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdelayer.md#PDEImage)): The Indexed image `inP`.

**Returns:** [`PDEImage`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdelayer.md#PDEImage)

The new image or the original image.

## PDEImageJPX

### Functions (1)

#### PDEImageJPXGetSMask

```cpp
PDEImage PDEImageJPXGetSMask(PDEImageJPX pdeImageJPX)
```

Header: `DLExtrasProcs.h:1507`

Retrieves the SoftMask image contained within the JPX-encoded data.

**Parameters**

- `pdeImageJPX` ([`PDEImageJPX`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdelayer.md#PDEImageJPX)): IN The JP2K encoded image object. NOTE: The returned PDEImage must be released using PDERelease() when done using it.

**Returns:** [`PDEImage`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdelayer.md#PDEImage)

The PDEImage representing the Soft Mask image of the JPX-encoded data if one is present, otherwise NULL.

## PDEPS

### Functions (1)

#### PDEPSGetCosObj

```cpp
void PDEPSGetCosObj(IN PDEPS ps, OUT CosObj *cosObjP)
```

Header: `DLExtrasProcs.h:421`

Get the CosObj for a Postscript Passthrough.

**Parameters**

- `ps` (`IN PDEPS`): IN The PostScript XObject whose Cos object is obtained.
- `cosObjP` (`OUT CosObj *`): OUT The Cos object of the PostScript XObject.

**Returns:** `void`

## PDEPath

### Functions (4)

#### PDEPathGetDataDouble

```cpp
ASUns32 PDEPathGetDataDouble(IN PDEPath path, OUT ASDouble *data, IN ASUns32 dataSize)
```

Header: `DLExtrasProcs.h:1100`

Gets the size of the path data.

**Parameters**

- `path` (`IN PDEPath`): IN The path whose data is obtained.
- `data` (`OUT ASDouble *`): OUT A pointer to the path data.
  If `data` is non-`NULL`, it contains a variable-sized array of path operators and operands.
  The format is a 32-bit operator followed by 0 to 3 ASDouble values, depending on the operator. Opcodes are codes
  for `moveto`, `lineto`, `curveto`, `rect`, or `closepath`
  operators; operands are ASDouble values. If `data` is `NULL`, the number of bytes required for
  `data` is returned by the method. Note that it returns *raw* path
  data. If you want the points in page coordinates, concatenate
  the path data points with the PDEElement matrix obtained
  from PDEElementGetMatrix().
- `dataSize` (`IN ASUns32`): IN Specifies the size of the buffer provided in data. If it is less than the
  length of the path data, the method copies `dataSize` bytes.`path`.

**Returns:** [`ASUns32`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASUns32)

#### PDEPathGetDataFloat

```cpp
ASUns32 PDEPathGetDataFloat(IN PDEPath path, OUT ASFloat *data, IN ASUns32 dataSize)
```

Header: `PERProcs.h:3407`

Superseded by PDEPathGetDataEx(). Get path using float-point values for coordinate values. This effectively removes the PDEPathGetData implementation limit that path coordinate values need to be no larger than +/-32767.0.

**Parameters**

- `path` (`IN PDEPath`)
- `data` (`OUT ASFloat *`)
- `dataSize` (`IN ASUns32`)

**Returns:** [`ASUns32`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASUns32)

#### PDEPathSetDataDouble

```cpp
void PDEPathSetDataDouble(IN PDEPath path, IN ASDouble *data, IN ASUns32 dataSize)
```

Header: `DLExtrasProcs.h:1081`

Sets the size of the path data.

**Parameters**

- `path` (`IN PDEPath`): IN The path whose data is set.
- `data` (`IN ASDouble *`): IN A pointer to the path data. It is a variable-sized array of path operators and operands.
  The format is a 32-bit operator followed by zero to three ASDouble values, depending
  on the operator. Operators are codes for `moveto`, `lineto`,
  `curveto`, `rect`, or `closepath` operators, and must be
  one of PDEPathElementType. Operands are ASDouble values. The data is copied into the PDEPath object.
- `dataSize` (`IN ASUns32`): IN The size of the new path data in bytes.

**Returns:** `void`

#### PDEPathSetDataFloat

```cpp
void PDEPathSetDataFloat(IN PDEPath path, IN ASFloat *data, IN ASUns32 dataSize)
```

Header: `PEWProcs.h:3837`

Superseded by PDEPathSetDataEx(). Set path using floats for pdfs that use larger values than will fit in ASFixed/ASInt32.

**Parameters**

- `path` (`IN PDEPath`)
- `data` (`IN ASFloat *`)
- `dataSize` (`IN ASUns32`)

**Returns:** `void`

## PDEText

### Functions (2)

#### PDETextAddASText

```cpp
void PDETextAddASText(PDEText pdeText, ASUns32 flags, ASInt32 index, ASText text, PDEFont font, PDEGraphicStateP gstateP, ASUns32 gstateLen, PDETextStateP tstateP, ASUns32 tstateLen, ASFixedMatrixP textMatrixP)
```

Header: `DLExtrasProcs.h:363`

Adds a character or a text run to a PDEText object, taking them from the ASText; thus Unicode characters can be placed in the PDEText. This function will accept characters that are not representable in the given font; such characters will be replaced with the .notdef glyph. An exception will be raised if the supplied font is incompatible with the API. Such may happen, for example, if font is a Type 1 font or if the font is retrieved from an existing PDF document.

**Parameters**

- `pdeText` ([`PDEText`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdelayer.md#PDEText)): The text object to which a character or text run is added.
- `flags` ([`ASUns32`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASUns32)): A PDETextFlags that specifies what kind of text to add.
- `index` ([`ASInt32`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASInt32)): The index after which to add the character or text run.
- `text` ([`ASText`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASText)): An ASText containing the text to add
- `font` ([`PDEFont`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdelayer.md#PDEFont)): The PDEFont for the element. Its type must be 'Type0' or 'TrueType'.
- `gstateP` (`PDEGraphicStateP`): A pointer to a PDEGraphicStateP structure with the graphics state for the element.
- `gstateLen` ([`ASUns32`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASUns32)): The length of the graphics state for the element.
- `tstateP` (`PDETextStateP`): A pointer to a `PDETextState` structure with the text state for the element.
- `tstateLen` ([`ASUns32`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASUns32)): The length of the text state for the element.
- `textMatrixP` (`ASFixedMatrixP`): A pointer to an `ASFixedMatrix` that holds the matrix for the element.

**Returns:** `void`

**See also:** [`PDEFontCheckASTextIsRepresentable`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDEFontCheckASTextIsRepresentable), [`PDETextGetASText`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDETextGetASText)

#### PDETextGetASText

```cpp
void PDETextGetASText(PDEText pdeText, ASUns32 flags, ASInt32 index, ASText text)
```

Header: `DLExtrasProcs.h:412`

Gets the text for a text run or character. The PDEFont associated with the PDEText must contain a ToUnicode table unless the descendant CIDFont uses the Adobe-GB1, Adobe-CNS1, Adobe-Japan1, or Adobe-Korea1 character collection.

**Parameters**

- `pdeText` ([`PDEText`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdelayer.md#PDEText)): A text object containing a character or text run whose text is found
- `flags` ([`ASUns32`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASUns32)): A PDETextFlags that specifies whether index refers to a character or a text run.
- `index` ([`ASInt32`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASInt32)): The index of the character or text run in pdeText
- `text` ([`ASText`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASText)): An ASText that is filled with the text from the text item

**Returns:** `void`

**See also:** [`PDETextAddASText`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDETextAddASText)

## PDETextItem

### Functions (2)

#### PDETextItemCopyASText

```cpp
void PDETextItemCopyASText(PDETextItem textItem, ASText text)
```

Header: `DLExtrasProcs.h:396`

Copies the text from a text item element into an ASText. The PDEFont associated with the PDEText must contain a ToUnicode table.

**Parameters**

- `textItem` ([`PDETextItem`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdelayer.md#PDETextItem)): The text item from which the text will be copied
- `text` ([`ASText`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASText)): An ASText object that is filled in with the text from the text item.

**Returns:** `void`

**See also:** [`PDETextItemCreateASText`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDETextItemCreateASText)

#### PDETextItemCreateASText

```cpp
PDETextItem PDETextItemCreateASText(ASText text, PDEFont font, PDEGraphicStateP gStateP, ASUns32 gStateLen, PDETextStateP textStateP, ASUns32 textStateLen, ASFixedMatrixP textMatrixP)
```

Header: `DLExtrasProcs.h:385`

Creates a text element containing a character or text run which can be added to a PDEText object. This function will accept characters that are not representable in the given font; such characters will be replaced with the .notdef glyph. An exception will be raised if the supplied font is incompatible with the API. Such may happen, for example, if font is a Type 1 font or if the font is retrieved from an existing PDF document.

**Parameters**

- `text` ([`ASText`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASText)): An ASText containing the text to add. Note that passing an ASText containing an empty string will throw a genErrBadParm.
- `font` ([`PDEFont`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdelayer.md#PDEFont)): The PDEFont for the element. Its type must be 'Type0' or 'TrueType'.
- `gStateP` (`PDEGraphicStateP`): A pointer to a PDEGraphicStateP structure with the graphics state for the element.
- `gStateLen` ([`ASUns32`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASUns32)): The length of the graphics state for the element.
- `textStateP` (`PDETextStateP`): A pointer to a `PDETextState` structure with the text state for the element. Note that PDFEdit ignores the wasSetFlags flag of the `PDETextState` structure, so you must initialize the `PDETextState` fields.
- `textStateLen` ([`ASUns32`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASUns32)): The length of the text state for the element.
- `textMatrixP` (`ASFixedMatrixP`): A pointer to an `ASFixedMatrix` that holds the matrix for the element.

**Returns:** [`PDETextItem`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdelayer.md#PDETextItem)

**Exceptions**

- `genErrBadParm`

**See also:** [`PDETextItemCopyASText`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDETextItemCopyASText)

## PDFileAttachment

### Functions (2)

#### PDFileAttachmentGetAFRelationship

```cpp
ASBool PDFileAttachmentGetAFRelationship(PDFileAttachment attachment, AFRelationship *relationship)
```

Header: `DLExtrasProcs.h:1979`

Gets the Associated Files Relationship of the FileAttachment

**Parameters**

- `attachment` ([`PDFileAttachment`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdlayer.md#PDFileAttachment)): IN a PDFileAttachment object.
- `relationship` ([`AFRelationship *`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#AFRelationship)): The AFRelationship found

**Returns:** [`ASBool`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/plugins.md#ASBool)

if True, the AFRelationship was successfully found. NOTE: Since PDF 2.0

**See also:** [`PDFileAttachmentSetAFRelationship`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDFileAttachmentSetAFRelationship)

#### PDFileAttachmentSetAFRelationship

```cpp
void PDFileAttachmentSetAFRelationship(PDFileAttachment attachment, AFRelationship relationship)
```

Header: `DLExtrasProcs.h:1987`

Sets the Associated Files Relationship of the FileAttachment to the specified value

**Parameters**

- `attachment` ([`PDFileAttachment`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdlayer.md#PDFileAttachment)): IN a PDFileAttachment object to be modified.
- `relationship` ([`AFRelationship`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#AFRelationship)): The AFRelationship to be set

**Returns:** `void`

**See also:** `PDFileAttachmentGetAFRelationship NOTE: Since PDF 2.0`

### Enums (1)

#### AFRelationship

Header: `DLExtrasExpT.h:745`

Represents the relationship between the component of the PDF document that refers to this attachment and the file denoted by the attachment

**Values**

- `Source = 0`: Original source material.
- `Data = 1`: Information used to derive a visual presentation, e.g. table or graph.
- `Alternative = 2`: Alternative representation of content, e.g. audio.
- `Supplement = 3`: Supplemental representation of the original source or data that may be more easily consumable.
- `EncryptedPayload = 4`: Encrypted payload document that should be displayed if the Processor has the cryptographic filter needed to decrypt it.
- `FormData = 5`: Data associated with the AcroForm.
- `Schema = 6`: Schema definition for the associated object.
- `UnspecifiedOrUnknown = 7`: Relationship is not known or can't be described using of the other values.

## PDFont

### Functions (1)

#### PDFontXlateToUCSCanRaise

```cpp
ASInt32 PDFontXlateToUCSCanRaise(PDFont fontP, ASUns8 *inP, ASInt32 inLen, ASUns8 *outP, ASInt32 outLen)
```

Header: `DLExtrasProcs.h:773`

Translates a string from whatever encoding the PDFont uses to Unicode encoding. This may raise an error.

**Parameters**

- `fontP` ([`PDFont`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdlayer.md#PDFont)): The font of the input string `inP`.
- `inP` ([`ASUns8 *`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASUns8)): A pointer to the string to translate.
- `inLen` ([`ASInt32`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASInt32)): The length of the `inP` buffer in bytes.
- `outP` ([`ASUns8 *`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASUns8)): (Filled by the method) A pointer to the translated string. If it is `NULL`, the method returns the size of the translated string.
- `outLen` ([`ASInt32`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASInt32)): The length of the `outP` buffer in bytes. If it is `0`, the method returns the size of the translated string.

**Returns:** [`ASInt32`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASInt32)

The number of bytes in the translated string in `outP`.

**Exceptions**

- `An`: genErrBadParm can be raised.

**See also:** [`PDFontXlateToUCS`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdlayer.md#PDFontXlateToUCS)

## PDPage

### Functions (8)

#### PDPageAddQRBarcode

```cpp
ASBool PDPageAddQRBarcode(PDPage page, ASText textToEncode, double x, double y, double width, double height)
```

Header: `DLExtrasProcs.h:1266`

Add a QR Two-Dimensional Barcode encoded with the specified Text to the specified PDF page as an image.

**Parameters**

- `page` ([`PDPage`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdlayer.md#PDPage)): The page of the PDF document.
- `textToEncode` ([`ASText`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASText)): The Text to be encoded in the barcode
- `x` (`double`): The horizontal location on the page in points
- `y` (`double`): The vertical location on the page in points
- `width` (`double`): The width of the barcode image in points
- `height` (`double`): The height of the barcode image in points

  NOTE: The Error Correction Level is set to Medium.

**Returns:** [`ASBool`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/plugins.md#ASBool)

#### PDPageAddQRBarcodeEx

```cpp
ASBool PDPageAddQRBarcodeEx(PDPage page, QREncodeParams params)
```

Header: `DLExtrasProcs.h:1856`

Add a QR Two-Dimensional Barcode encoded with the specified Params to the specified PDF page as an image.

**Parameters**

- `page` ([`PDPage`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdlayer.md#PDPage)): The page of the PDF document.
- `params` ([`QREncodeParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#QREncodeParams)): The Params specified how to encode the barcode

**Returns:** [`ASBool`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/plugins.md#ASBool)

#### PDPageDrawContentsToMemoryWithParams

```cpp
ASSize_t PDPageDrawContentsToMemoryWithParams(PDPage page, PDPageDrawMParams drawParams)
```

Header: `DLExtrasProcs.h:49`

Renders a page to memory. For use in rasterizing pages for viewing or previewing. This call supports the same rasterization parameters as PDPageDrawContentsToMemory, and also allows users to specify these additional arguments: • The destination rectangle (in ASFixed or ASReal notation) • The update rectangle (in ASFixed notation) • The transformation matrix (in ASFixed or ASReal notation) • The colorspace to use, as a named colorspace or as a color profile • The rendering intent to use for rendering • A request to ignore restrictions on content copying & page extraction • Default profile for uncalibrated RGB

**Parameters**

- `page` ([`PDPage`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdlayer.md#PDPage)): The PDPage to be rendered.
- `drawParams` (`PDPageDrawMParams`): Set of parameters describing how to rasterize the supplied PDPage, rasterizing the PDPage into a memory buffer supplied in the parameter set.

**Returns:** [`ASSize_t`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASSize_t)

the size of the buffer required to rasterize the PDPage if the buffer is not supplied and the length of the buffer is specified as `0`.

**See also:** [`PDPageDrawContentsToMemory`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdfllayer.md#PDPageDrawContentsToMemory), [`PDPageDrawContentsToWindowWithParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDPageDrawContentsToWindowWithParams)

#### PDPageDrawContentsToMemoryWithParams

```cpp
ASSize_t PDPageDrawContentsToMemoryWithParams(PDPage page, PDPageDrawMParams drawParams)
```

Header: `PDPageDrawM.h:257`

**Parameters**

- `page` ([`PDPage`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdlayer.md#PDPage))
- `drawParams` (`PDPageDrawMParams`)

**Returns:** [`ASSize_t`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASSize_t)

#### PDPageDrawContentsToWindowWithParams

```cpp
void PDPageDrawContentsToWindowWithParams(PDPage page, PDPageDrawWParams drawParams)
```

Header: `DLExtrasProcs.h:68`

Renders a page to a (platform-dependent) window. For use in rasterizing pages for viewing or previewing. This API accepts a structure of type PDPageDrawWParams, which includes a set of ASReal-based values in the same manner as PDPageDrawContentsToMemoryWithParams. It is intended to address overflow or underflow issues with the ASFixed-based drawing APIs when rendering a page to a window object. **Note:** Platform: (!MAC_PLATFORM || (MAC_PLATFORM && !AS_ARCH_64BIT))

**Parameters**

- `page` ([`PDPage`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdlayer.md#PDPage)): The PDPage to be rendered.
- `drawParams` (`PDPageDrawWParams`): Set of parameters describing how to rasterize the supplied PDPage to a platform-dependent window object.

**Returns:** `void`

**See also:** [`PDPageDrawContentsToMemoryWithParams`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDPageDrawContentsToMemoryWithParams)

#### PDPageDrawContentsToWindowWithParams

```cpp
void PDPageDrawContentsToWindowWithParams(PDPage page, PDPageDrawWParams drawParams)
```

Header: `PDPageDrawM.h:262`

**Parameters**

- `page` ([`PDPage`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdlayer.md#PDPage))
- `drawParams` (`PDPageDrawWParams`)

**Returns:** `void`

#### PDPageEnumInksWithParams

```cpp
void PDPageEnumInksWithParams(PDPage Page, PDPageEnumInksParam Params)
```

Header: `DLExtrasProcs.h:757`

Enumerates the inks for a page, using the supplied options specified in the parameters.

**Parameters**

- `Page` ([`PDPage`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdlayer.md#PDPage)): The page of interest.
- `Params` ([`PDPageEnumInksParam`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDPageEnumInksParam)): The parameters describing options for enumerating inks.

**Returns:** `void`

#### PDPageSetBlendingProfile

```cpp
void PDPageSetBlendingProfile(PDPage page, AC_Profile profile)
```

Header: `DLExtrasProcs.h:508`

This function sets the blending profile for a PD page for the duration of of the PDPage. Effectively, this creates an isolated page level, a non-knockout transparency group with the specified profile for the page. This apparent group will be used in rendering the page, but it is not preserved when the document is saved. In order to create a persistent transparency group, the user must add a "Group" entry to the page dictionary.

**Parameters**

- `page` ([`PDPage`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdlayer.md#PDPage)): The PDPage to be rendered.
- `profile` ([`AC_Profile`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/acrocolor.md#AC_Profile)): The color blending profile to be used when rendering.

**Returns:** `void`

### Structures (1)

#### PDPageEnumInksParam

```cpp
typedef  struct PDPageEnumInksParamRec * PDPageEnumInksParam
```

Header: `DLExtrasExpT.h:280`

### Enums (1)

#### PDPageDeleteFlags

Header: `DLExtrasExpT.h:436`

Page Deletion Flags.

**Values**

- `PDDeleteNormal = 1`: Normal page deletion.
- `PDDeleteDoNotParseStructureTree = 2`: Do not parse Structure Tree. For documents with a complicated Structure Tree, parsing can be exhorbitantly slow, set this flag to bypass processing it.

## PDPref

### Functions (17)

#### PDPrefGetAllowOpeningXFA

```cpp
ASBool PDPrefGetAllowOpeningXFA(void)
```

Header: `DLExtrasProcs.h:293`

Routine to get the current allow-XFA setting.

**Parameters**

- (unnamed) (`void`)

**Returns:** [`ASBool`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/plugins.md#ASBool)

true if opening XFA PDFs is allowed.

**See also:** [`PDPrefGetAllowOpeningXFA`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDPrefGetAllowOpeningXFA)

#### PDPrefGetAllowRelaxedSyntax

```cpp
ASBool PDPrefGetAllowRelaxedSyntax(void)
```

Header: `DLExtrasProcs.h:493`

Returns the current value of the AllowRelaxedSyntax flag setting.

**Parameters**

- (unnamed) (`void`)

**Returns:** [`ASBool`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/plugins.md#ASBool)

if True, the Library will attempt to resolve or ignore certain minor PDF syntax errors.

**See also:** [`PDPrefSetAllowRelaxedSyntax`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDPrefSetAllowRelaxedSyntax)

#### PDPrefGetAllowStringRetrievalFailingDecryption

```cpp
ASBool PDPrefGetAllowStringRetrievalFailingDecryption(void)
```

Header: `DLExtrasProcs.h:881`

Returns the current value of the AllowStringRetrievalFailingDecryption flag setting.

**Parameters**

- (unnamed) (`void`)

**Returns:** [`ASBool`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/plugins.md#ASBool)

**See also:** [`PDPrefSetAllowStringRetrievalFailingDecryption`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDPrefSetAllowStringRetrievalFailingDecryption)

#### PDPrefGetDefaultIntentToProfile

```cpp
ASBool PDPrefGetDefaultIntentToProfile(void)
```

Header: `DLExtrasProcs.h:476`

This function returns the current status of the default source intent used in a color profile.

**Parameters**

- (unnamed) (`void`)

**Returns:** [`ASBool`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/plugins.md#ASBool)

If true, the intent to be used shall be the intent specified in the profile; otherwise AC_RelColorimetric will be assumed.

**See also:** [`PDPrefSetDefaultIntentToProfile`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDPrefSetDefaultIntentToProfile)

#### PDPrefGetNeverUseOutputIntent

```cpp
ASBool PDPrefGetNeverUseOutputIntent(void)
```

Header: `DLExtrasProcs.h:586`

This function returns whether that the output intent should be completely ignored when rendering a document. **Note:** This setting defaults to false.

**Parameters**

- (unnamed) (`void`)

**Returns:** [`ASBool`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/plugins.md#ASBool)

If true, the OutputIntent will not be used when rendering even for PDF/A, PDF/E, or PDF/X documents.

**See also:** [`PDPrefSetPrintUsingWorkingSpaces`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDPrefSetPrintUsingWorkingSpaces), [`PDPrefGetUseOutputIntents`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdlayer.md#PDPrefGetUseOutputIntents)

#### PDPrefGetPrintUsingWorkingSpaces

```cpp
ASBool PDPrefGetPrintUsingWorkingSpaces(void)
```

Header: `DLExtrasProcs.h:534`

This function returns whether the device spaces are treated as calibrated when rendering. **Note:** This setting is only effective when the document is being rendered to memory, or a window, and kPDPageIsPrinting is true.

**Parameters**

- (unnamed) (`void`)

**Returns:** [`ASBool`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/plugins.md#ASBool)

if true, treats device spaces as calibrated to the associated working space profile. Otherwise, treats device spaces as uncalibrated

**See also:** [`PDPrefSetPrintUsingWorkingSpaces`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDPrefSetPrintUsingWorkingSpaces)

#### PDPrefGetStrictFormEmission

```cpp
ASBool PDPrefGetStrictFormEmission(void)
```

Header: `DLExtrasProcs.h:1033`

Returns the current value of the PDPrefGetStrictFormEmission flag setting.

**Parameters**

- (unnamed) (`void`)

**Returns:** [`ASBool`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/plugins.md#ASBool)

**See also:** [`PDPrefGetStrictFormEmission`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDPrefGetStrictFormEmission)

#### PDPrefSetAllowOpeningXFA

```cpp
void PDPrefSetAllowOpeningXFA(ASBool flag)
```

Header: `DLExtrasProcs.h:285`

Routine to allow APDFL to open XFA PDF documents, which as of 9.1P2f is disallowed.

**Parameters**

- `flag` ([`ASBool`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/plugins.md#ASBool)): True will allow APDFL to open XFA PDF documents.

**Returns:** `void`

**See also:** [`PDPrefGetAllowOpeningXFA`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDPrefGetAllowOpeningXFA)

#### PDPrefSetAllowRelaxedSyntax

```cpp
void PDPrefSetAllowRelaxedSyntax(ASBool flag)
```

Header: `DLExtrasProcs.h:487`

This call, with a True flag value, allows callers to ask Adobe PDF Library to attempt to ignore minor PDF syntax errors. For example, the Library may correct FontDescriptor entries with missing values by adding defaults, add a missing Supplement for Adobe Identity, or add a missing /FirstChar or /LastChar entry if the other of the pair is present, along with a valid Widths table).

**Parameters**

- `flag` ([`ASBool`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/plugins.md#ASBool)): When true, this will tell the PDF Library to ignore certain minor PDF document errors.

**Returns:** `void`

**See also:** [`PDPrefGetAllowRelaxedSyntax`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDPrefGetAllowRelaxedSyntax)

#### PDPrefSetAllowStringRetrievalFailingDecryption

```cpp
void PDPrefSetAllowStringRetrievalFailingDecryption(ASBool allowStringRetrievalFailingDecryption)
```

Header: `DLExtrasProcs.h:872`

This call is used to retrive the value of String objects using an Encryption that's not supported by the Library in order to still retrieve the String's value. This is useful to Advanced Users who know how to interpret the String data when advanced Encryption is in use.

**Parameters**

- `allowStringRetrievalFailingDecryption` ([`ASBool`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/plugins.md#ASBool))

**Returns:** `void`

**See also:** [`PDPrefGetAllowStringRetrievalFailingDecryption`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDPrefGetAllowStringRetrievalFailingDecryption)

#### PDPrefSetDefaultIntentToProfile

```cpp
void PDPrefSetDefaultIntentToProfile(ASBool flag)
```

Header: `DLExtrasProcs.h:468`

When this preference is set to true, the intent used (when no other intent is explicitly specified) will be the intent specified in the profile. Otherwise AC_RelColorimetric will be assumed by default.

**Parameters**

- `flag` ([`ASBool`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/plugins.md#ASBool)): If true, use intent specified in the profile.

**Returns:** `void`

**See also:** [`PDPrefGetDefaultIntentToProfile`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDPrefGetDefaultIntentToProfile)

#### PDPrefSetNeverUseOutputIntent

```cpp
void PDPrefSetNeverUseOutputIntent(ASBool value)
```

Header: `DLExtrasProcs.h:596`

This function sets a flag to specify that the output intent should not be considered when rendering a document. This overrides the default behavior of the preference set with PDPrefSetUseOutputIntents. The PDPrefSetUseOutputIntents may still use the OutputIntent in spite of being set to false, if the document purports to be PDF/A, PDF/E, or PDF/X. **Note:** This setting defaults to false.

**Parameters**

- `value` ([`ASBool`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/plugins.md#ASBool)): if true, the OutputIntent will not be used when rendering even for PDF/A, PDF/E, or PDF/X documents.

**Returns:** `void`

**See also:** [`PDPrefGetPrintUsingWorkingSpaces`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDPrefGetPrintUsingWorkingSpaces), [`PDPrefSetUseOutputIntents`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdlayer.md#PDPrefSetUseOutputIntents)

#### PDPrefSetPrintUsingWorkingSpaces

```cpp
void PDPrefSetPrintUsingWorkingSpaces(ASBool flag)
```

Header: `DLExtrasProcs.h:525`

This function sets a flag to treat the device spaces as calibrated when rendering. **Note:** This setting is only effective when the document is being rendered to memory, or a window, and kPDPageIsPrinting is true.

**Parameters**

- `flag` ([`ASBool`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/plugins.md#ASBool)): if true, treats device spaces as calibrated to the associated working space profile. Otherwise, treats device spaces as uncalibrated

**Returns:** `void`

**See also:** [`PDPrefGetPrintUsingWorkingSpaces`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDPrefGetPrintUsingWorkingSpaces)

#### PDPrefSetStrictFormEmission

```cpp
void PDPrefSetStrictFormEmission(ASBool strictFormEmission)
```

Header: `DLExtrasProcs.h:1024`

This call is used to allow user to set strictFormEmission.

**Parameters**

- `strictFormEmission` ([`ASBool`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/plugins.md#ASBool))

**Returns:** `void`

**See also:** [`PDPrefSetStrictFormEmission`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDPrefSetStrictFormEmission)

#### PDPrefSuppressDefaultCMYKCalibration

```cpp
void PDPrefSuppressDefaultCMYKCalibration(ASBool flag)
```

Header: `DLExtrasProcs.h:264`

Routine to suppress the Adobe-defined default color profile used for DeviceCMYK specified object. If a default color space is defined in the document resources, or via PDEContentSetDefault, it will still be used.

**Parameters**

- `flag` ([`ASBool`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/plugins.md#ASBool)): True will suppress the Adobe-defined default color profile.

**Returns:** `void`

**See also:** [`PDPrefSuppressDefaultGrayCalibration`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDPrefSuppressDefaultGrayCalibration), [`PDPrefSuppressDefaultRGBCalibration`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDPrefSuppressDefaultRGBCalibration)

#### PDPrefSuppressDefaultGrayCalibration

```cpp
void PDPrefSuppressDefaultGrayCalibration(ASBool flag)
```

Header: `DLExtrasProcs.h:276`

Routine to suppress the Adobe-defined default color profile used for DeviceGray specified object. If a default color space is defined in the document resources, or via PDEContentSetDefault, it will still be used.

**Parameters**

- `flag` ([`ASBool`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/plugins.md#ASBool)): True will suppress the Adobe-defined default color profile.

**Returns:** `void`

**See also:** [`PDPrefSuppressDefaultCMYKCalibration`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDPrefSuppressDefaultCMYKCalibration), [`PDPrefSuppressDefaultRGBCalibration`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDPrefSuppressDefaultRGBCalibration)

#### PDPrefSuppressDefaultRGBCalibration

```cpp
void PDPrefSuppressDefaultRGBCalibration(ASBool flag)
```

Header: `DLExtrasProcs.h:252`

Routine to suppress the Adobe-defined default color profile used for DeviceRGB specified object. If a default color space is defined in the document resources, or via PDEContentSetDefault, it will still be used.

**Parameters**

- `flag` ([`ASBool`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/plugins.md#ASBool)): True will suppress the Adobe Defined Default Color Profile.

**Returns:** `void`

**See also:** `PDPrefSuppressDefaultYKCalibration`, [`PDPrefSuppressDefaultGrayCalibration`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/dlextras.md#PDPrefSuppressDefaultGrayCalibration)

## PDSysFont

### Functions (1)

#### PDSysFontGetFullName

```cpp
ASText PDSysFontGetFullName(PDSysFont sysFont)
```

Header: `DLExtrasProcs.h:861`

This method retrieves the full font name of a system font. Note: This method only returns a meaningful result for TrueType-based technology fonts.

**Parameters**

- `sysFont` (`PDSysFont`)

**Returns:** [`ASText`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASText)

### Enums (1)

#### PDSysFontMatchFlagsEx

Header: `DLExtrasExpT.h:576`

Font matching flags for PDFindSysFont().

**Values**

- `kPDSysFontMatchNameAndCharSetEx = 0x0001`: Match the font name and character set.
- `kPDSysFontMatchFontTypeEx = 0x0002`: Match the font type.
- `kPDSysFontMatchWritingModeEx = 0x0004`: Match the writing mode (horizontal or vertical).
- `kPDSysFontDontUseNameAsPrefixEx = 0x0008`: The Legacy behavior of System Font Matching is when all conventional attempts have failed to yield a match to treat the entire font name as a prefix to match with available fonts. This behavior worked well for names with illegal characters or Unicode where matching is difficult, the user could provide the well-known part of the font name. However this prefix matching behavior isn't always desirable, using this flag will disable it

## PDWord

### Functions (3)

#### PDWordGetCharPoint

```cpp
ASBool PDWordGetCharPoint(PDWord word, ASInt16 byteIdx, ASFixedPoint *point)
```

Header: `DLExtrasProcs.h:106`

Gets the placement point of the character at a given index position in the word. If the specified character is constructed with multiple bytes, only the first byte returns a valid quad. Otherwise, this method returns false. The placement point is specified in user space coordinates.

**Parameters**

- `word` ([`PDWord`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdlayer.md#PDWord)): The word whose character placement point is obtained.
- `byteIdx` ([`ASInt16`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASInt16)): The byte index within the word of the character whose placement point is obtained. Valid values are 0 to PDWordGetLength(word)-1.
- `point` (`ASFixedPoint *`): (Filled by the method) Pointer to the character's placement point, specified in user-space coordinates.

**Returns:** [`ASBool`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/plugins.md#ASBool)

Returns true if the word has an nth quad, false otherwise.

**See also:** [`PDWordGetCharQuad`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdlayer.md#PDWordGetCharQuad)

#### PDWordGetNthQuadPoint

```cpp
ASBool PDWordGetNthQuadPoint(PDWord word, ASInt16 nTh, ASFixedPoint *point)
```

Header: `DLExtrasProcs.h:86`

Gets the specified word's nth quad placement point, specified in user space coordinates.

**Parameters**

- `word` ([`PDWord`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdlayer.md#PDWord)): The word whose nth quad is obtained.
- `nTh` ([`ASInt16`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/aslayer.md#ASInt16)): The quad placement point to obtain. A word's first quad has an index of zero.
- `point` (`ASFixedPoint *`): (Filled by the method) Pointer to the word's nth quad placement point, specified in user-space coordinates.

**Returns:** [`ASBool`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/plugins.md#ASBool)

Returns true if the word has an nth quad, false otherwise.

**See also:** [`PDWordGetNumQuads`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdlayer.md#PDWordGetNumQuads)

#### PDWordIsLastWordInRegion

```cpp
ASBool PDWordIsLastWordInRegion(PDWord word)
```

Header: `DLExtrasProcs.h:116`

Routine to check if a word is the last word in a region as determined by the WordFinder.

**Parameters**

- `word` ([`PDWord`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/pdlayer.md#PDWord)): The word to check.

**Returns:** [`ASBool`](https://docs.datalogics.com/apdfl21/AdobeCPlusCPlus/APDFL21.0.0PlusP1e/plugins.md#ASBool)

Returns true if the given PDWord is the last word in a region, false otherwise.
