# PDFXConvertParams Class

> Parameters for converting a document to PDF/X 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/PDFXConvertParams
- Version index: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/llms.txt

```cpp
class PDFXConvertParams
```

**Namespace:** `datalogics_interface`

## Description

Parameters for converting a document to PDF/X compliance.

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

PDF/X is a subset of the PDF ISO standard. The purpose of PDF/X is to facilitate graphics exchange, and it therefore has a series of printing related requirements. For example, in PDF/X-1a all fonts need to be embedded and all images need to be CMYK or spot colors. PDF/X-3 accepts calibrated RGB and CIELAB colors, while retaining most of the other restrictions of PDF/X-1a.

## Constructors

### PDFXConvertParams

```cpp
datalogics_interface::PDFXConvertParams::PDFXConvertParams()
```

*constructor*

Construct PDF/X conversion parameters with defaults.

Defaults: RemoveAllAnnotations = false, AbortIfXFAIsPresent = false.

### PDFXConvertParams

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

*constructor*

**Parameters**

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

Copy constructor.

### PDFXConvertParams

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

*constructor*

**Parameters**

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

### ~PDFXConvertParams

```cpp
datalogics_interface::PDFXConvertParams::~PDFXConvertParams()
```

*destructor*

## Methods

### get_abort_if_xfa_is_present

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

**Returns:** `bool`

Gets whether conversion is aborted when XFA forms are present.

Presence of XFA can result in some loss of data in output PDF/X file as the Library does not support XFA. However client can choose to abort the conversion in case XFA is present by setting this parameter to true.

By default we will not abort if XFA is present.

If false we will convert even if we detect the XFA form entry in PDDoc. If true we will abort the process.

### get_profile_description

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

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

Gets the Output Intent profile description for the PDF/X conversion.

The Output Intent of a PDF/X document may be any valid CMYK Profile For PDF/X-1a or any valid CMYK or RGB Profile for PDF/X-3. 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 both.

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_remove_all_annotations

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

**Returns:** `bool`

Gets whether all annotations and actions are removed during conversion.

Some of the standards like PDF/X 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/X compliant file.

### operator=

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

**Parameters**

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

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

Copy assignment.

### operator=

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

**Parameters**

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

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

### set_abort_if_xfa_is_present

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

**Parameters**

- `value` (`bool`): whether conversion is aborted when XFA forms are present

**Returns:** `void`

Sets whether conversion is aborted when XFA forms are present.

Presence of XFA can result in some loss of data in output PDF/X file as the Library does not support XFA. However client can choose to abort the conversion in case XFA is present by setting this parameter to true.

By default we will not abort if XFA is present.

If false we will convert even if we detect the XFA form entry in PDDoc. If true we will abort the process.

### set_profile_description

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

**Parameters**

- `profile` (`const std::string &`): the Output Intent profile description for the PDF/X conversion

**Returns:** `void`

Sets the Output Intent profile description for the PDF/X conversion.

The Output Intent of a PDF/X document may be any valid CMYK Profile For PDF/X-1a or any valid CMYK or RGB Profile for PDF/X-3. 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 both.

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_remove_all_annotations

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

**Parameters**

- `value` (`bool`): whether all annotations and actions are removed during conversion

**Returns:** `void`

Sets whether all annotations and actions are removed during conversion.

Some of the standards like PDF/X 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/X compliant file.
