PageImageParams Class Documentation
class PageImageParamsNamespace: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(const PageImageParams & other)Parameters
other: const PageImageParams &
Copy constructor.
PageImageParams
PageImageParams(PageImageParams && )Parameters
~PageImageParams
~PageImageParams()Member Function Documentation
get_black_point_compensation
bool get_black_point_compensation()Returns:
boolThe BlackPointCompensation setting.
Default is true if not explicitly set.
get_bypass_copy_perm
bool get_bypass_copy_perm()Returns:
booltrue 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:
booltrue 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:
doubleThe 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:
ColorProfileGets 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::stringGets 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
std::unique_ptr< ColorSpace > get_image_color_space()Returns:
std::unique_ptr< ColorSpace >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
DrawFlags get_page_draw_flags()Returns:
DrawFlagsThe 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:
intThe 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:
intThe 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:
RenderIntentThe 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:
SmoothFlagsThe 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:
booltrue 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:
booltrue 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:
doubleThe 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=
PageImageParams & operator=(const PageImageParams & other)Parameters
other: const PageImageParams &
Returns:
PageImageParams &Copy assignment.
operator=
PageImageParams & operator=(PageImageParams && )Parameters
Returns:
PageImageParams &set_black_point_compensation
void set_black_point_compensation(bool value)Parameters
value: bool
Returns:
voidThe BlackPointCompensation setting.
Default is true if not explicitly set.
set_bypass_copy_perm
void set_bypass_copy_perm(bool value)Parameters
value: boolthe bypass copy perm
Returns:
voidset_calibrate_device_spaces_when_printing
void set_calibrate_device_spaces_when_printing(bool value)Parameters
value: boolthe calibrate device spaces when printing
Returns:
voidset_horizontal_resolution
void set_horizontal_resolution(double dpi)Parameters
dpi: double
Returns:
voidThe 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: ColorProfilethe ICC Profile of the colorspace to be used for rendering to a known value
Returns:
voidSets 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:
voidSets 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
cs: ColorSpace &
Returns:
voidThe 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:
voidThe 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:
voidThe 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:
voidThe 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:
voidThe 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
flags: SmoothFlags
Returns:
voidThe 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:
voidSet 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: booltrue to render with DeviceN when only Process colorants are provided to GetImageSeparations(); false to render with DeviceCMYK in that case.
Returns:
voidSets 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:
voidThe 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.