Dev Center
Table of contents

Thanks for Downloading Dynamic Web TWAIN 30-Day Trial!

Your download will start shortly. If your download does not begin, click here to retry.

PDF Compressor (Beta)

Starting from version 18.3

PDF Compressor is a new PDF compression technology which may help reduce the resulting file size when saving images as a PDF file. This technology is based on Dynamsoft’s proprietary color clustering algorithms. Color clustering uses operates using the RGB value of each pixel in the image to cluster similarly colored pixels.

This feature is only available for color or gray-scale images and requires a PDF Compressor module license.

How to achieve high-quality compression

Select sharp simple images

For best file fidelity post compression, please images that have the following attributes:

  • High contrast,
  • Less color variety,
  • Concentrated distribution of similar colors,
  • With low complexity graphics,

Things to keep in mind

  • If the contrast between the text in the picture and the background is not high, and the weight of the text is not heavy, text may be incomplete or thin after compression.
  • If the source image contains complex graphics, the quality of the resulting compressed graphics may deteriorate.

Sample Demo

To preview this feature, please see this demo. Please contact us if you have any feedback or suggestions.

How to enable this feature in your code

Code snippet

DWTObject.Addon.PDF.Write.Setup({
  docCompressor: {
    enabled: true, //Enable PDF Compressor
  },
});
//Save PDF file to local disk
DWTObject.SaveAllAsPDF(
  "testmrc.pdf", //File Name
  function () {
    console.log("successful.");
  },
  function (errorCode, errorString) {
    console.log(errorString);
  }
);

Is this page helpful?

YesYes NoNo

In this article:

latest version

    • Latest Version (18.5.1)
    • Version 18.4
    • Version 18.3
    • Version 18.1
    • Version 18.0
    • Version 17.3
    • Version 17.2.1
    • Version 17.1.1
    • Version 17.0
    • Version 16.2
    • Version 16.1.1
    Change +