Graphics

<< Click to Display Table of Contents >>

Navigation:  GDI Print Directives >

Graphics

This property defines how different types of images should be processed before being inserted into the PDF document. Each image type can be downsampled or converted, and the values and specifications are identical for all three types of images. The three image types are specified with the terms:

Color
Indexed
MonoAndDrawings

Valid directives would therefore be, for example:

Graphics.Color.Downsample,1
Graphics.MonoAndDrawings.Convert,2

Downsample

Downsampling refers to the process of taking a relatively high resolution file and reducing the amount of pixels used in that image. This works fine for a file that will be only viewed on a computer monitor or posted on the Web, but will significantly reduce the image quality of a file that will be digitally printed. For more precise control of file-space-saving techniques, see Compression.

Name

Values

Description

Method

0 (None)

1 (Linear)

2 (Bilinear)

3 (Bicubic)

Specifies which method should be used for downsampling. If value is 0 (None), images of this type will not be downsampled. Default = 0 (None)

To

50-2399

These two properties define when an image should be downsampled. Default = 96

IfAbove

51-2400

If the original DPI of the image is equal to or above that of the value specified by the property IfAbove, the image will be downsampled to the DPI specified by the property To. Default = 128

 

Convert

Name

Values

Description

Method

0 (None)

1 (ToGrayscale)

2 (ToMonochrome)

3 (ToBlackAndWhite)

Specifies how images of this type should be converted. Value 0 (None) means that no images of this type will be converted. Default = 0 (None)

Dither

Boolean

Specifies whether images should be dithered during conversion. This has meaning only for methods ToMonochrome andToBlackAndWhite. Default = True

 

 

Examples

Downsampling a color image if over 100 dpi to 90 dpi. (On an actual test file consisting of a single 180 dpi image, this reduced the PDF file size from 1.3 MB to 27K)

//PDFX,Graphics.Color.Downsample.Method,Bilinear

//PDFX,Graphics.Color.Downsample.To,90

//PDFX,Graphics.Color.Downsample.IfAbove,100

 

Converting a color image to BlackAndWhite

//PDFX,Graphics.Color.Convert.Method,ToBlackAndWhite

//PDFX,Graphics.Color.Convert.Dither,true

 

Converting a color image to BlackAndWhite

//PDFX,Graphics.Color.Convert.Method,ToBlackAndWhite

//PDFX,Graphics.Color.Convert.Dither,true

 

Compatibility

In PDFXv3, "Downsample" and "Convert" were their own Properties, so the directives were, for example, "Downsample.Method,1" and "Convert.Dither,0."