PageImageParams Class Documentation

class PageImageParams

Namespace:datalogics_interface

Detailed 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.

Constructor & Destructor Documentation

PageImageParams

PageImageParams()

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

~PageImageParams()

Member Function Documentation

get_black_point_compensation

bool get_black_point_compensation()

Returns:

bool

The BlackPointCompensation setting.

Default is true if not explicitly set.

get_bypass_copy_perm

bool get_bypass_copy_perm()

Returns:

bool

true if this option is turned on.

The BypassCopyPerm allows to bypass copy permitions.

get_calibrate_device_spaces_when_printing

bool get_calibrate_device_spaces_when_printing()

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

double get_horizontal_resolution()

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

ColorProfile get_icc_profile()

Returns:

ColorProfile

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

std::string get_icc_profile_custom_path()

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_page_draw_flags

DrawFlags get_page_draw_flags()

Returns:

DrawFlags

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

int get_pixel_height()

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

int get_pixel_width()

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

RenderIntent get_render_intent()

Returns:

RenderIntent

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

The default is relative colorimetric.

get_smoothing

SmoothFlags get_smoothing()

Returns:

SmoothFlags

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

bool get_thin_line_heuristics()

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

bool get_use_device_n_for_image_separations()

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

double get_vertical_resolution()

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.

set_black_point_compensation

void 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

void set_bypass_copy_perm(bool value)

Parameters

value: bool

the bypass copy perm

Returns:

void

set_calibrate_device_spaces_when_printing

void set_calibrate_device_spaces_when_printing(bool value)

Parameters

value: bool

the calibrate device spaces when printing

Returns:

void

set_horizontal_resolution

void 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

void set_icc_profile(ColorProfile profile)

Parameters

profile: ColorProfile

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

void 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

void set_image_color_space(ColorSpace & cs)

Parameters

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

void set_page_draw_flags(DrawFlags flags)

Parameters

flags: DrawFlags

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

void 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

void 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

void set_render_intent(RenderIntent intent)

Parameters

intent: RenderIntent

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

void set_smoothing(SmoothFlags flags)

Parameters

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

void 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

void 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

void 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.