Please enable JavaScript to view this site.

TIFF Image Printer

Description

Sets any resampling options in the IPNSession object. The resample feature allows you to scale the output image to:

a particular width and height in pixels

a percentage of the original size, ranging from 1% - 500%

a new image resolution (DPI), ranging from 50 DPI - 3600 DPI

To set a single resampling option use the SetProperty call with the appropriate arguments. See the Remarks below for a list of arguments.

See the Resample Page to New Size section for a more detailed explanation.

Syntax

expression.SetResamplingOptions(Resample, ResampleWidthOrXResolution,

                                ResampleHeightOrYResolution, ResampleLockAspectRatio)

where expression is an IPNSession object.

Parameters

pnResampleUnits Resample

A pnResampleUnits constant for resampling using pixels, percentage or resolution.

Integer ResampleWidthOrXResolution

Enter in the new image width in pixels, as a percentage of the original page size, or the new x resolution (dots per inch).

Integer ResampleHeightOrYResolution

Enter in the new image height in pixels, as a percentage of the original page size, or the new y resolution (dots per inch). If ResampleLockAspectRatio is True, you can pass 0 for the height and it will be calculated automatically to prevent distortion.

Boolean ResampleLockAspectRatio

Pass True to constrain the image height and width so the image does not get distorted when resampling.

Remarks

Use the following to set options using SetProperty when Resample is pnResampleUnitsPixels:

Method Parameter

SetProperty Parameters

Resample

SectionName:

Processing

PropertyName:

Resample Units

varValue:

VT_I4, must be 0

ResampleWidthOrXResolution

SectionName:

Processing

PropertyName:

Resample Pixels Width

varValue:

VT_I4

Range between 0 - 4294967295

ResampleHeightOrYResolution

SectionName:

Processing

PropertyName:

Resample Pixels Height

varValue:

VT_I4

Range between 0 - 4294967295

ResampleLockAspectRatio

SectionName:

Processing

PropertyName:

Resample Lock Aspect Ratio

varValue:

VT_BOOL

 

Use the following to set options using SetProperty when Resample is pnResampleUnitsPercentage:

Method Parameter

SetProperty Parameters

Resample

SectionName:

Processing

PropertyName:

Resample Units

varValue:

VT_UI4, must be 1

ResampleWidthOrXResolution

SectionName:

Processing

PropertyName:

Resample Width Percentage

varValue:

VT_UI4

Range between 1 - 500

ResampleHeightOrYResolution

SectionName:

Processing

PropertyName:

Resample Height Percentage

varValue:

VT_UI4

Range between 1 - 500

ResampleLockAspectRatio

SectionName:

Processing

PropertyName:

Resample Lock Aspect Ratio

varValue:

VT_BOOL

 

Use the following to set options using SetProperty when Resample is pnResampleUnitsDPI:

Method Parameter

SetProperty Parameters

Resample

SectionName:

Processing

PropertyName:

Resample Units

varValue:

VT_UI4, must be 2

ResampleWidthOrXResolution

SectionName:

Processing

PropertyName:

Resample X DPI

varValue:

VT_UI4

Range between 50 - 3600

ResampleHeightOrYResolution

SectionName:

Processing

PropertyName:

Resample Y DPI

varValue:

VT_UI4

Range between 50 - 3600

ResampleLockAspectRatio

SectionName:

Processing

PropertyName:

Resample Lock Aspect Ratio

varValue:

VT_BOOL

Supported Printers: TIFF Image Printer, PDF Image Printer, Raster Image Printer

See Also: SetResamplingOn SetImageCopyToOn SetImageCopyToOptions SetProperty pnResamplUnits