Foxit PDF SDK
foxit::common::PostScriptDeviceSettingData Class Reference

Inherits Object.

Public Types

enum  OrientationFlag { e_Portrait = 0, e_Landscape = 1 }
 Enumeration for specifying the orientation of the printer. More...
 

Public Member Functions

 PostScriptDeviceSettingData (int device_width, int device_height, RectF device_margin, OrientationFlag orientation, int resolution, uint32 copies)
 Constructor, with parameters. More...
 
 PostScriptDeviceSettingData ()
 Constructor and set the default value. More...
 
 PostScriptDeviceSettingData (const PostScriptDeviceSettingData &settings)
 Constructor, with another PostScrip device setting data object. More...
 
PostScriptDeviceSettingDataoperator= (const PostScriptDeviceSettingData &settings)
 Assign operator. More...
 
void Set (int device_width, int device_height, RectF device_margin, OrientationFlag orientation, int resolution, uint32 copies)
 Set value. More...
 

Public Attributes

uint32 copies
 The number of copies to be printed.
 
int device_height
 The height of the device in pixels.
 
RectF device_margin
 The page margins of the device. More...
 
int device_width
 The width of the device in pixels.
 
OrientationFlag orientation
 Orientation flag. Please refer to values starting from OrientationFlag::e_Portrait and this should be one of these values.
 
int resolution
 The resolution of the device in pixels per inch.
 

Detailed Description

This class represents setting data for PostScrip device. This would be used in class Renderer.

See also
Renderer

Member Enumeration Documentation

◆ OrientationFlag

Enumeration for specifying the orientation of the printer.

Values of this enumeration should be used alone.

Enumerator
e_Portrait 

Portrait orientation for printing.

e_Landscape 

Landscape orientation for printing.

Constructor & Destructor Documentation

◆ PostScriptDeviceSettingData() [1/3]

foxit::common::PostScriptDeviceSettingData::PostScriptDeviceSettingData ( int  device_width,
int  device_height,
RectF  device_margin,
OrientationFlag  orientation,
int  resolution,
uint32  copies 
)
inlineexplicit

Constructor, with parameters.

Parameters
[in]device_widthThe width of the device in pixels.
[in]device_heightThe height of the device in pixels.
[in]device_marginThe page margins of the device. it does not represent a rectangle. It just defines the left margin, bottom margin, right margin and top margin of the device.
[in]orientationOrientation flag. Please refer to values starting from OrientationFlag::e_Portrait and this should be one of these values.
[in]resolutionThe resolution of the device in pixels per inch.
[in]copiesThe number of copies to be printed.

◆ PostScriptDeviceSettingData() [2/3]

foxit::common::PostScriptDeviceSettingData::PostScriptDeviceSettingData ( )
inline

Constructor and set the default value.

By default, the pixel value of an A4 paper is set to 300 dpi (dots per inch).

◆ PostScriptDeviceSettingData() [3/3]

foxit::common::PostScriptDeviceSettingData::PostScriptDeviceSettingData ( const PostScriptDeviceSettingData settings)
inline

Constructor, with another PostScrip device setting data object.

Parameters
[in]settingsAnother PostScrip device settings object.

Member Function Documentation

◆ operator=()

PostScriptDeviceSettingData& foxit::common::PostScriptDeviceSettingData::operator= ( const PostScriptDeviceSettingData settings)
inline

Assign operator.

Parameters
[in]settingsAnother PostScrip device setting data object, whose value would be assigned to current object.
Returns
Reference to current object itself.

◆ Set()

void foxit::common::PostScriptDeviceSettingData::Set ( int  device_width,
int  device_height,
RectF  device_margin,
OrientationFlag  orientation,
int  resolution,
uint32  copies 
)
inline

Set value.

Parameters
[in]device_widthThe width of the device in pixels.
[in]device_heightThe height of the device in pixels.
[in]device_marginThe page margins of the device. it does not represent a rectangle. It just defines the left margin, bottom margin, right margin and top margin of the device.
[in]orientationOrientation flag. Please refer to values starting from OrientationFlag::e_Portrait and this should be one of these values.
[in]resolutionThe resolution of the device in pixels per inch.
[in]copiesThe number of copies to be printed.
Returns
None.

Member Data Documentation

◆ device_margin

RectF foxit::common::PostScriptDeviceSettingData::device_margin

The page margins of the device.

Note
This value does not represent a rectangle. It just defines the left margin, bottom margin, right margin and top margin of the device. The value should not be negative.