How to configure image downsampling during export to PDF

Question

How to configure image downsampling during export to PDF?

Answer

Basically, image downsampling reduces the size of the image in pixels while preserving its physical size in inches. This allows making the output PDF file smaller with minimal changes to how the images look in the document.

The easiest way to configure downsampling would be to use the IPDFExportParams::Resolution and IPDFExportParams::ResolutionType properties (see the Developer's Guide article for details).

in case it is necessary to have different settings based on the color type of an image (black-and-white, grayscale, or color), the following API should be used:

  • the IPDFExportParams::PictureCompressionParams property to access picture compression parameters (see the Developer's Guide article for details);
  • the IPDFPictureCompressionParams::BwPictureResolutionParams, IPDFPictureCompressionParams::GrayPictureResolutionParams and IPDFPictureCompressionParams::ColorPictureResolutionParams properties to access specific resolution settings for each image color type (see the Developer's Guide article for details);
  • the IPictureResolutionParams::Type and IPictureResolutionParams::Value properties to set the resolution (see the Developer's Guide article for details).

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.