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 |
|
||||||
ResampleWidthOrXResolution |
|
||||||
ResampleHeightOrYResolution |
|
||||||
ResampleLockAspectRatio |
|
Use the following to set options using SetProperty when Resample is pnResampleUnitsPercentage:
Method Parameter |
SetProperty Parameters |
||||||
---|---|---|---|---|---|---|---|
Resample |
|
||||||
ResampleWidthOrXResolution |
|
||||||
ResampleHeightOrYResolution |
|
||||||
ResampleLockAspectRatio |
|
Use the following to set options using SetProperty when Resample is pnResampleUnitsDPI:
Method Parameter |
SetProperty Parameters |
||||||
---|---|---|---|---|---|---|---|
Resample |
|
||||||
ResampleWidthOrXResolution |
|
||||||
ResampleHeightOrYResolution |
|
||||||
ResampleLockAspectRatio |
|
Supported Printers: TIFF Image Printer, PDF Image Printer, Raster Image Printer
See Also: SetResamplingOn SetImageCopyToOn SetImageCopyToOptions SetProperty pnResamplUnits