Foxit PDF SDK
com.foxit.sdk.common.PrintDeviceSettingData Class Reference

Public Member Functions

 PrintDeviceSettingData (int device_width, int device_height, RectF device_margin, int orientation, int resolution, int copies)
 Constructor, with parameters. More...
 
 PrintDeviceSettingData ()
 Constructor and set the default value. More...
 
 PrintDeviceSettingData (PrintDeviceSettingData settings)
 Constructor, with another print device setting data object. More...
 
synchronized void delete ()
 Clean up related resources immediately. More...
 
int getCopies ()
 Get the number of copies to be printed. More...
 
int getDevice_height ()
 Get the height of the device in pixels. More...
 
RectF getDevice_margin ()
 Get the page margins of the device. More...
 
int getDevice_width ()
 Get the width of the device in pixels. More...
 
int getOrientation ()
 Get orientation flag. More...
 
int getResolution ()
 Get the resolution of the device in pixels per inch. More...
 
void set (int device_width, int device_height, RectF device_margin, int orientation, int resolution, int copies)
 Set value. More...
 
void setCopies (int value)
 Set the number of copies to be printed. More...
 
void setDevice_height (int value)
 Set the height of the device in pixels. More...
 
void setDevice_margin (RectF value)
 Set the page margins of the device. More...
 
void setDevice_width (int value)
 Set the width of the device in pixels. More...
 
void setOrientation (int value)
 Set orientation flag. More...
 
void setResolution (int value)
 Set the resolution of the device in pixels per inch. More...
 

Static Public Attributes

static final int e_Landscape = 1
 Landscape orientation for printing.
 
static final int e_Portrait = 0
 Portrait orientation for printing.
 

Detailed Description

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

See also
Renderer

Constructor & Destructor Documentation

◆ PrintDeviceSettingData() [1/3]

com.foxit.sdk.common.PrintDeviceSettingData.PrintDeviceSettingData ( int  device_width,
int  device_height,
RectF  device_margin,
int  orientation,
int  resolution,
int  copies 
)

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. This parameter only has an effect on PostScrip files.

◆ PrintDeviceSettingData() [2/3]

com.foxit.sdk.common.PrintDeviceSettingData.PrintDeviceSettingData ( )

Constructor and set the default value.

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

◆ PrintDeviceSettingData() [3/3]

com.foxit.sdk.common.PrintDeviceSettingData.PrintDeviceSettingData ( PrintDeviceSettingData  settings)

Constructor, with another print device setting data object.

Parameters
[in]settingsAnother print device settings object.

Member Function Documentation

◆ delete()

synchronized void com.foxit.sdk.common.PrintDeviceSettingData.delete ( )

Clean up related resources immediately.

Returns
None.
Note
Once this function is called, current object cannot be used anymore.

◆ getCopies()

com.foxit.sdk.common.PrintDeviceSettingData.getCopies ( )

Get the number of copies to be printed.

Returns
The number of copies to be printed. This parameter only has an effect on PostScrip files.

◆ getDevice_height()

com.foxit.sdk.common.PrintDeviceSettingData.getDevice_height ( )

Get the height of the device in pixels.

Returns
The height of the device in pixels.

◆ getDevice_margin()

com.foxit.sdk.common.PrintDeviceSettingData.getDevice_margin ( )

Get 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.
Returns
The page margins of the device.

◆ getDevice_width()

com.foxit.sdk.common.PrintDeviceSettingData.getDevice_width ( )

Get the width of the device in pixels.

Returns
The width of the device in pixels.

◆ getOrientation()

com.foxit.sdk.common.PrintDeviceSettingData.getOrientation ( )

Get orientation flag.

Returns
Orientation flag. Please refer to values starting from OrientationFlag::e_Portrait and this should be one of these values.

◆ getResolution()

com.foxit.sdk.common.PrintDeviceSettingData.getResolution ( )

Get the resolution of the device in pixels per inch.

Returns
The resolution of the device in pixels per inch.

◆ set()

void com.foxit.sdk.common.PrintDeviceSettingData.set ( int  device_width,
int  device_height,
RectF  device_margin,
int  orientation,
int  resolution,
int  copies 
)

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. This parameter only has an effect on PostScrip files.
Returns
None.

◆ setCopies()

com.foxit.sdk.common.PrintDeviceSettingData.setCopies ( int  value)

Set the number of copies to be printed.

Parameters
[in]valueThe number of copies to be printed. This parameter only has an effect on PostScrip files.
Returns
None.

◆ setDevice_height()

com.foxit.sdk.common.PrintDeviceSettingData.setDevice_height ( int  value)

Set the height of the device in pixels.

Parameters
[in]valueThe height of the device in pixels.
Returns
None.

◆ setDevice_margin()

com.foxit.sdk.common.PrintDeviceSettingData.setDevice_margin ( RectF  value)

Set 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.
Parameters
[in]valueThe page margins of the device.
Returns
None.

◆ setDevice_width()

com.foxit.sdk.common.PrintDeviceSettingData.setDevice_width ( int  value)

Set the width of the device in pixels.

Parameters
[in]valueThe width of the device in pixels.
Returns
None.

◆ setOrientation()

com.foxit.sdk.common.PrintDeviceSettingData.setOrientation ( int  value)

Set orientation flag.

Parameters
[in]valueOrientation flag. Please refer to values starting from OrientationFlag::e_Portrait and this should be one of these values.
Returns
None.

◆ setResolution()

com.foxit.sdk.common.PrintDeviceSettingData.setResolution ( int  value)

Set the resolution of the device in pixels per inch.

Parameters
[in]valueThe resolution of the device in pixels per inch.
Returns
None.