# PageImageParams Class

> Used to manage converting a PDF page to an image.

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

```cpp
class PageImageParams
```

**Namespace:** `datalogics_interface`

## Description

Used to manage converting a PDF page to an image.

The Page Image Parameters are a set of parameters used to control converting a PDF page to an image, such as a PNG, JPG, or BMP. The parameters include pixel height & width, color space, resolution, so on.

**Uses types:** [`ColorProfile`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorProfile.md), [`ColorSpace`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md), [`DrawFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/DrawFlags.md), [`RenderIntent`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/RenderIntent.md), [`SmoothFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/SmoothFlags.md)

## Constructors

### PageImageParams

```cpp
datalogics_interface::PageImageParams::PageImageParams()
```

*constructor*

Construct default PageImageParams.

Initializes with DeviceRGB color space, no smoothing, zero pixel dimensions, 300 dpi resolution, relative colorimetric render intent, and black point compensation enabled.

### PageImageParams

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

*constructor*

**Parameters**

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

Copy constructor.

### PageImageParams

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

*constructor*

**Parameters**

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

### ~PageImageParams

```cpp
datalogics_interface::PageImageParams::~PageImageParams()
```

*destructor*

## Methods

### get_black_point_compensation

```cpp
bool datalogics_interface::PageImageParams::get_black_point_compensation() const
```

**Returns:** `bool`

The BlackPointCompensation setting.

Default is true if not explicitly set.

### get_bypass_copy_perm

```cpp
bool datalogics_interface::PageImageParams::get_bypass_copy_perm() const
```

**Returns:** `bool`

true if this option is turned on.

The BypassCopyPerm allows to bypass copy permitions.

### get_calibrate_device_spaces_when_printing

```cpp
bool datalogics_interface::PageImageParams::get_calibrate_device_spaces_when_printing() const
```

**Returns:** `bool`

true if this option is turned on.

Sets if Device spaces should be treated as calibrated to the associated working profile (when true), otherwise it treats them as uncalibrated (when false) when printing.

### get_horizontal_resolution

```cpp
double datalogics_interface::PageImageParams::get_horizontal_resolution() const
```

**Returns:** `double`

The desired horizontal resolution in pixels/inch of the output image.

Defaults to 300 dpi. Must not be negative. Horizontal and vertical resolution must be either both zero or both non-zero.

### get_icc_profile

```cpp
ColorProfile datalogics_interface::PageImageParams::get_icc_profile() const
```

**Returns:** [`ColorProfile`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorProfile.md)

Gets the ICC Profile of the colorspace to be used for rendering from a known value.

NOTE: The ICCProfileCustomPath must not be set for this property to be used. The profile must be compatible with the ColorSpace property value, which can't be set to ICCBased either.

### get_icc_profile_custom_path

```cpp
std::string datalogics_interface::PageImageParams::get_icc_profile_custom_path() const
```

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

Gets the ICC Profile of the colorspace to be used for rendering from a custom file path.

NOTE: The ICCProfile is ignored when this property is a non-empty string. The profile must be compatible with the ColorSpace property value, which can't be set to ICCBased either.

### get_image_color_space

```cpp
std::unique_ptr< ColorSpace > datalogics_interface::PageImageParams::get_image_color_space() const
```

**Returns:** [`std::unique_ptr< ColorSpace >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/ColorSpace.md)

The ColorSpace used in exporting a PDF page to an image.

Must be one of DeviceGray, DeviceRGB, DeviceRGBA, DeviceCMYK, DeviceN, or ICCBased.

### get_page_draw_flags

```cpp
DrawFlags datalogics_interface::PageImageParams::get_page_draw_flags() const
```

**Returns:** [`DrawFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/DrawFlags.md)

The DrawFlags used for rendering a PDF page to an image.

An OR of the flags from DrawFlags which control how the PDF page is drawn.

### get_pixel_height

```cpp
int datalogics_interface::PageImageParams::get_pixel_height() const
```

**Returns:** `int`

The height in pixels of the image to be created from a PDF page.

If not specified (zero), the rendered PDF page size will be used. PixelWidth and PixelHeight must be either both zero or both non-zero.

### get_pixel_width

```cpp
int datalogics_interface::PageImageParams::get_pixel_width() const
```

**Returns:** `int`

The width in pixels of the image to be created from a PDF page.

If not specified (zero), the rendered PDF page size will be used. PixelWidth and PixelHeight must be either both zero or both non-zero.

### get_render_intent

```cpp
RenderIntent datalogics_interface::PageImageParams::get_render_intent() const
```

**Returns:** [`RenderIntent`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/RenderIntent.md)

The RenderIntent used to specify color translation for colors outside gamut of the color profile used.

The default is relative colorimetric.

### get_smoothing

```cpp
SmoothFlags datalogics_interface::PageImageParams::get_smoothing() const
```

**Returns:** [`SmoothFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/SmoothFlags.md)

The SmoothFlags used in exporting a PDF page to an image.

Indicates what parts of the PDF page (text, image, art, none) are to be smoothed when rendering to an image. These flags can be OR'd together.

### get_thin_line_heuristics

```cpp
bool datalogics_interface::PageImageParams::get_thin_line_heuristics() const
```

**Returns:** `bool`

true if thin line heuristics are applied, false otherwise.

The ThinLineHeuristics setting.

Determines whether thin lines will be fattened non-linearly or the stroke adjust will be applied to thin rectangles.

### get_use_device_n_for_image_separations

```cpp
bool datalogics_interface::PageImageParams::get_use_device_n_for_image_separations() const
```

**Returns:** `bool`

true if this option is turned on. NOTE: This member is only applicable when calling the GetImageSeparations() method, only when Colorants used are only Process.

Gets the UseDeviceNForImageSeparations setting, which indicates when the GetImageSeparations() method is called if a DeviceN colorspace will be used for rasterization. When false, if only Process colorants are provided to GetImageSeparations() then it's rendered using DeviceCMYK. When true, then it's rendered using DeviceN.

### get_vertical_resolution

```cpp
double datalogics_interface::PageImageParams::get_vertical_resolution() const
```

**Returns:** `double`

The desired vertical resolution in pixels/inch of the output image.

Defaults to 300 dpi. Must not be negative. Horizontal and vertical resolution must be either both zero or both non-zero.

### operator=

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

**Parameters**

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

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

Copy assignment.

### operator=

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

**Parameters**

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

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

### set_black_point_compensation

```cpp
void datalogics_interface::PageImageParams::set_black_point_compensation(bool value)
```

**Parameters**

- `value` (`bool`)

**Returns:** `void`

The BlackPointCompensation setting.

Default is true if not explicitly set.

### set_bypass_copy_perm

```cpp
void datalogics_interface::PageImageParams::set_bypass_copy_perm(bool value)
```

**Parameters**

- `value` (`bool`): the bypass copy perm

**Returns:** `void`

### set_calibrate_device_spaces_when_printing

```cpp
void datalogics_interface::PageImageParams::set_calibrate_device_spaces_when_printing(bool value)
```

**Parameters**

- `value` (`bool`): the calibrate device spaces when printing

**Returns:** `void`

### set_horizontal_resolution

```cpp
void datalogics_interface::PageImageParams::set_horizontal_resolution(double dpi)
```

**Parameters**

- `dpi` (`double`)

**Returns:** `void`

The desired horizontal resolution in pixels/inch of the output image.

Defaults to 300 dpi. Must not be negative. Horizontal and vertical resolution must be either both zero or both non-zero.

### set_icc_profile

```cpp
void datalogics_interface::PageImageParams::set_icc_profile(ColorProfile profile)
```

**Parameters**

- `profile` ([`ColorProfile`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/ColorProfile.md)): the ICC Profile of the colorspace to be used for rendering to a known value

**Returns:** `void`

Sets the ICC Profile of the colorspace to be used for rendering to a known value.

NOTE: The ICCProfileCustomPath must not be set for this property to be used. The profile must be compatible with the ColorSpace property value, which can't be set to ICCBased either.

### set_icc_profile_custom_path

```cpp
void datalogics_interface::PageImageParams::set_icc_profile_custom_path(const std::string &path)
```

**Parameters**

- `path` (`const std::string &`): the ICC Profile of the colorspace to be used for rendering from a custom file path

**Returns:** `void`

Sets the ICC Profile of the colorspace to be used for rendering from a custom file path.

NOTE: The ICCProfile is ignored when this property is a non-empty string. The profile must be compatible with the ColorSpace property value, which can't be set to ICCBased either.

### set_image_color_space

```cpp
void datalogics_interface::PageImageParams::set_image_color_space(ColorSpace &cs)
```

**Parameters**

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

**Returns:** `void`

The ColorSpace used in exporting a PDF page to an image.

Must be one of DeviceGray, DeviceRGB, DeviceRGBA, DeviceCMYK, DeviceN, or ICCBased.

### set_page_draw_flags

```cpp
void datalogics_interface::PageImageParams::set_page_draw_flags(DrawFlags flags)
```

**Parameters**

- `flags` ([`DrawFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/DrawFlags.md))

**Returns:** `void`

The DrawFlags used for rendering a PDF page to an image.

An OR of the flags from DrawFlags which control how the PDF page is drawn.

### set_pixel_height

```cpp
void datalogics_interface::PageImageParams::set_pixel_height(int height)
```

**Parameters**

- `height` (`int`)

**Returns:** `void`

The height in pixels of the image to be created from a PDF page.

If not specified (zero), the rendered PDF page size will be used. PixelWidth and PixelHeight must be either both zero or both non-zero.

### set_pixel_width

```cpp
void datalogics_interface::PageImageParams::set_pixel_width(int width)
```

**Parameters**

- `width` (`int`)

**Returns:** `void`

The width in pixels of the image to be created from a PDF page.

If not specified (zero), the rendered PDF page size will be used. PixelWidth and PixelHeight must be either both zero or both non-zero.

### set_render_intent

```cpp
void datalogics_interface::PageImageParams::set_render_intent(RenderIntent intent)
```

**Parameters**

- `intent` ([`RenderIntent`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/RenderIntent.md))

**Returns:** `void`

The RenderIntent used to specify color translation for colors outside gamut of the color profile used.

The default is relative colorimetric.

### set_smoothing

```cpp
void datalogics_interface::PageImageParams::set_smoothing(SmoothFlags flags)
```

**Parameters**

- `flags` ([`SmoothFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/SmoothFlags.md))

**Returns:** `void`

The SmoothFlags used in exporting a PDF page to an image.

Indicates what parts of the PDF page (text, image, art, none) are to be smoothed when rendering to an image. These flags can be OR'd together.

### set_thin_line_heuristics

```cpp
void datalogics_interface::PageImageParams::set_thin_line_heuristics(bool value)
```

**Parameters**

- `value` (`bool`)

**Returns:** `void`

Set the ThinLineHeuristics setting.

Determines whether thin lines will be fattened non-linearly or the stroke adjust will be applied to thin rectangles.

### set_use_device_n_for_image_separations

```cpp
void datalogics_interface::PageImageParams::set_use_device_n_for_image_separations(bool value)
```

**Parameters**

- `value` (`bool`): true to render with DeviceN when only Process colorants are provided to GetImageSeparations(); false to render with DeviceCMYK in that case.

**Returns:** `void`

Sets the UseDeviceNForImageSeparations setting, which indicates when GetImageSeparations() is called if a DeviceN colorspace will be used for rasterization. When false, if only Process colorants are provided to GetImageSeparations() then it's rendered using DeviceCMYK. When true, then it's rendered using DeviceN. NOTE: This member is only applicable when calling the GetImageSeparations() method, only when Colorants used are only Process.

### set_vertical_resolution

```cpp
void datalogics_interface::PageImageParams::set_vertical_resolution(double dpi)
```

**Parameters**

- `dpi` (`double`)

**Returns:** `void`

The desired vertical resolution in pixels/inch of the output image.

Defaults to 300 dpi. Must not be negative. Horizontal and vertical resolution must be either both zero or both non-zero.
