# PDFAConvertParams Class

> Parameters for converting a document to PDF/A compliance.

- Product: Adobe PDF Library 21
- Language: Modern C++
- Version: 21.4.0
- HTML page: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFAConvertParams
- Version index: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/llms.txt

```cpp
class PDFAConvertParams
```

**Namespace:** `datalogics_interface`

## Description

Parameters for converting a document to PDF/A compliance.

These parameters control how a Document is converted to the PDF/A standard.

RemoveAllAnnotations if true, will remove all Annotations and Actions from the output IgnoreFontErrors if true, will try to rasterize the page when fonts cannot be embedded AbortIfXFAIsPresent if true, will abort conversion process if XFA form entry is detected NoValidationErrors if true, will ignore validation errors RasterizationResolution rasterization resolution; if 0, use 72 DPI ValidateImplementationLimitsOfDocument Validate PDF Implementation Limits of the Document. PDF/A is an ISO-standard version the PDF format. It is designed to be used with PDF files that need to be archived and stored for long periods. For example, the fonts in a PDF/A file are embedded in the file itself, rather than accessed through a link to a font directory on a local server.

## Constructors

### PDFAConvertParams

```cpp
datalogics_interface::PDFAConvertParams::PDFAConvertParams()
```

*constructor*

Default constructor for PDFAConvertParams.

Initializes with RemoveAllAnnotations = false, IgnoreFontErrors = true, AbortIfXFAIsPresent = false, NoValidationErrors = false, RasterizationResolution = 72, and ValidateImplementationLimitsOfDocument = true.

### PDFAConvertParams

```cpp
datalogics_interface::PDFAConvertParams::PDFAConvertParams(const PDFAConvertParams &other)
```

*constructor*

**Parameters**

- `other` ([`const PDFAConvertParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFAConvertParams.md))

Copy constructor.

### PDFAConvertParams

```cpp
datalogics_interface::PDFAConvertParams::PDFAConvertParams(PDFAConvertParams &&) noexcept
```

*constructor*

**Parameters**

- (unnamed) ([`PDFAConvertParams &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFAConvertParams.md))

### ~PDFAConvertParams

```cpp
datalogics_interface::PDFAConvertParams::~PDFAConvertParams()
```

*destructor*

## Methods

### get_abort_if_xfa_is_present

```cpp
bool datalogics_interface::PDFAConvertParams::get_abort_if_xfa_is_present() const
```

**Returns:** `bool`

The presence of XFA can result in some loss of data in output PDF/A-1 file as the PDFProcessor does not support XFA. However you can choose to abort the conversion if XFA is present by setting this parameter to true. By default we will not abort if XFA is present for PDF/A-1.

By default we will not abort if XFA is present for PDF/A-1.

If false we will convert even if XFA is found. If true we will abort the process if XFA is found.

### get_ignore_font_errors

```cpp
bool datalogics_interface::PDFAConvertParams::get_ignore_font_errors() const
```

**Returns:** `bool`

If we encounter any errors like unembeddable fonts etc. while conversion then we try to rasterize the current page on which the error occured. However the client can modify this behavior by setting the value of this parameter to false in which case we will throw an error if we encounter any problems while conversion.

By default we will rasterize the page on error.

If true we will try to rasterize the current page if any error occured. If false we will abort and throw an exception if any error occured.

### get_no_validation_errors

```cpp
bool datalogics_interface::PDFAConvertParams::get_no_validation_errors() const
```

**Returns:** `bool`

Permit validation errors to be ignored

When true, PDF Implementation Limits (as defined in the PDF Specification of the PDF/A target) of the page are ignored. When false, PDF Implementation Limits of the Page are checked and if violated will cause the Page to be rasterized as a fallback mechanism when IgnoreFontErrors is true or simply raise an error if IgnoreFontErrors is false.

### get_profile_description

```cpp
std::string datalogics_interface::PDFAConvertParams::get_profile_description() const
```

**Returns:** `std::string`

The Output Intent of a PDF/A document may be any valid CMYK Profile for CMYK Conversion, and any valid RGB profile for RGB conversion. This parameter allows the user to specify a particular profile for this conversion by description. When this parameter is not present, the profile "U.S. Web Coated (SWOP) v2" will be used for CMYK Conversions, and "sRGB IEC61966-2.1" for RGB conversions.

If this description is present, and specifies a profile of the wrong color family, or specifies a profile which cannot be located in resources, an exception will be raised.

### get_rasterization_resolution

```cpp
int datalogics_interface::PDFAConvertParams::get_rasterization_resolution() const
```

**Returns:** `int`

Permit user to select rasterization resolution When this value is zero, we will rasterize at 72 DPI (Legacy Behaviour). Otherwise, we will interpret the value as the desired resolution.

### get_remove_all_annotations

```cpp
bool datalogics_interface::PDFAConvertParams::get_remove_all_annotations() const
```

**Returns:** `bool`

Some of the standards like PDF/A prohibit the presence of some types of Annotations and Actions in order to comply with those standards.

By default we will filter all illegal Annotations and Actions.

If false we will filter out all illegal Annotations and Actions (according to the standard being used) while retaining the legal ones. If true this will remove all the Annotations and Actions from the output PDF/A compliant file.

### get_validate_implementation_limits

```cpp
bool datalogics_interface::PDFAConvertParams::get_validate_implementation_limits() const
```

**Returns:** `bool`

Validate PDF Implementation Limits (as defined in the PDF Specification of the PDF/A target) of the Document. When true. PDF Implementation Limits are checked and if violated raise an error. When false, PDF Implementation Limits are not checked. Note this option applies to the Whole document versus only Pages in the NoValidationErrors option. NOTE: It's recommended NoValidationErrors be set to false, IgnoreFontErrors be set to false, and ValidateImplementationLimitsOfDocument be set to true for getting the best quality output that adheres to the specification.

### operator=

```cpp
PDFAConvertParams & datalogics_interface::PDFAConvertParams::operator=(const PDFAConvertParams &other)
```

**Parameters**

- `other` ([`const PDFAConvertParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFAConvertParams.md))

**Returns:** [`PDFAConvertParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFAConvertParams.md)

Copy assignment.

### operator=

```cpp
PDFAConvertParams & datalogics_interface::PDFAConvertParams::operator=(PDFAConvertParams &&) noexcept
```

**Parameters**

- (unnamed) ([`PDFAConvertParams &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFAConvertParams.md))

**Returns:** [`PDFAConvertParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/PDFAConvertParams.md)

### set_abort_if_xfa_is_present

```cpp
void datalogics_interface::PDFAConvertParams::set_abort_if_xfa_is_present(bool value)
```

**Parameters**

- `value` (`bool`): true to abort PDF/A-1 conversion if XFA is present; false to continue with possible loss of XFA data.

**Returns:** `void`

The presence of XFA can result in some loss of data in output PDF/A-1 file as the PDFProcessor does not support XFA. However you can choose to abort the conversion if XFA is present by setting this parameter to true. By default we will not abort if XFA is present for PDF/A-1.

By default we will not abort if XFA is present for PDF/A-1.

If false we will convert even if XFA is found. If true we will abort the process if XFA is found.

### set_ignore_font_errors

```cpp
void datalogics_interface::PDFAConvertParams::set_ignore_font_errors(bool value)
```

**Parameters**

- `value` (`bool`): true to rasterize the current page when an error (such as an unembeddable font) is encountered during conversion; false to abort and throw an exception instead.

**Returns:** `void`

If we encounter any errors like unembeddable fonts etc. while conversion then we try to rasterize the current page on which the error occured. However the client can modify this behavior by setting the value of this parameter to false in which case we will throw an error if we encounter any problems while conversion.

By default we will rasterize the page on error.

If true we will try to rasterize the current page if any error occured. If false we will abort and throw an exception if any error occured.

### set_no_validation_errors

```cpp
void datalogics_interface::PDFAConvertParams::set_no_validation_errors(bool value)
```

**Parameters**

- `value` (`bool`): true to ignore PDF Implementation Limit violations on a page; false to enforce them, falling back to rasterization (when IgnoreFontErrors is true) or raising an error (when it is false).

**Returns:** `void`

Permit validation errors to be ignored

When true, PDF Implementation Limits (as defined in the PDF Specification of the PDF/A target) of the page are ignored. When false, PDF Implementation Limits of the Page are checked and if violated will cause the Page to be rasterized as a fallback mechanism when IgnoreFontErrors is true or simply raise an error if IgnoreFontErrors is false.

### set_profile_description

```cpp
void datalogics_interface::PDFAConvertParams::set_profile_description(const std::string &profile)
```

**Parameters**

- `profile` (`const std::string &`): the description of the Output Intent profile to use; must be a valid CMYK profile for CMYK conversions or a valid RGB profile for RGB conversions.

**Returns:** `void`

The Output Intent of a PDF/A document may be any valid CMYK Profile for CMYK Conversion, and any valid RGB profile for RGB conversion. This parameter allows the user to specify a particular profile for this conversion by description. When this parameter is not present, the profile "U.S. Web Coated (SWOP) v2" will be used for CMYK Conversions, and "sRGB IEC61966-2.1" for RGB conversions.

If this description is present, and specifies a profile of the wrong color family, or specifies a profile which cannot be located in resources, an exception will be raised.

### set_rasterization_resolution

```cpp
void datalogics_interface::PDFAConvertParams::set_rasterization_resolution(int dpi)
```

**Parameters**

- `dpi` (`int`): the desired rasterization resolution in DPI; zero rasterizes at 72 DPI (legacy behaviour).

**Returns:** `void`

Permit user to select rasterization resolution When this value is zero, we will rasterize at 72 DPI (Legacy Behaviour). Otherwise, we will interpret the value as the desired resolution.

### set_remove_all_annotations

```cpp
void datalogics_interface::PDFAConvertParams::set_remove_all_annotations(bool value)
```

**Parameters**

- `value` (`bool`): true to remove all Annotations and Actions from the output PDF/A; false to filter only those illegal under the standard while keeping the legal ones.

**Returns:** `void`

Some of the standards like PDF/A prohibit the presence of some types of Annotations and Actions in order to comply with those standards.

By default we will filter all illegal Annotations and Actions.

If false we will filter out all illegal Annotations and Actions (according to the standard being used) while retaining the legal ones. If true this will remove all the Annotations and Actions from the output PDF/A compliant file.

### set_validate_implementation_limits

```cpp
void datalogics_interface::PDFAConvertParams::set_validate_implementation_limits(bool value)
```

**Parameters**

- `value` (`bool`): true to check PDF Implementation Limits across the whole document and raise an error if violated; false to skip the check.

**Returns:** `void`

Validate PDF Implementation Limits (as defined in the PDF Specification of the PDF/A target) of the Document. When true. PDF Implementation Limits are checked and if violated raise an error. When false, PDF Implementation Limits are not checked. Note this option applies to the Whole document versus only Pages in the NoValidationErrors option. NOTE: It's recommended NoValidationErrors be set to false, IgnoreFontErrors be set to false, and ValidateImplementationLimitsOfDocument be set to true for getting the best quality output that adheres to the specification.
