Skip to Content

How can I control image smoothing?

Estimated Reading Time: 1 Minutes

In APDFL, smoothing options can be set via global values with the function PDPrefSetAntialiasLevel or by setting flags on (some) rendering calls.

PDPrefSetAntialiasLevel

PDPrefSetAntialiasLevel() accepts the antialiasPixelLevel paramater which is an OR of the following flags:

  • kPDPrefAASmoothText=1
  • kPDPrefAASmoothLineArt=2
  • kPDPrefAASmoothImage=16 (decimal)

The global smoothing preference setting will be used by the following APIs:

  • PDPageDrawContentsToWindow()
  • PDPageDrawContentsToWindowEx()
  • PDPageDrawContentsToWindowEx()
  • PDDrawCosObjToWindow()
PDPageDrawContentsToMemory

When using PDPageDrawContentsToMemory*, the API supports a smoothFlags paramater - a bit field of PDPageDrawSmoothFlags. The most commonly used are:

  • kPDPageDrawSmoothText
  • kPDPageDrawSmoothLineArt
  • kPDPageDrawSmoothImage
.NET and Java interfaces 

The DrawFlags and PageImageParams classes support a smoothFlags property - an OR of the smoothFlags enum. See the DocToImages, DrawToBitmap and RasterizePage samples.

How can I control image smoothing?
  • COMMENT