PDFRasterizer.NET 4.0 is now available. Supports .NET Core. Renders pixel-perfectly.

Reduce PDF size

PDFKit5 includes support for non-desctructive PDF compresssion. Invoking the compression tool is as simple as follows:

using (FileStream input = new FileStream(inputPath, FileMode.Open, FileAccess.Read))
{
   using (FileStream output = new FileStream(outputPath, FileMode.Create, FileAccess.Write))
   {
      Document.Rewrite(input, output, ReduceOptions.All);
   }
}				

The compression algorithm can be fine tuned using the ReduceOptions enum by enabling any of the following optional steps:

  • RemoveIdenticalObjects: a generic algorithm that replaces identical PDF objects with references to a single instance
  • RewriteContentStreams: try to rewrite content streams to optimize size
  • RecompressContentStreams: recompress content streams using options that result in maximal compression ratio
  • CompressDocument : compresses object and cross reference streams
Download PDFKit.NET 5.0
We will send you a download link

  • This field is for validation purposes and should be left unchanged.
Why do we ask your email address?
We send tips that speed up your evaluation
We let you know about bug fixes
You can always unsubscribe with one click
We never share your address with a 3rd party
Thank you for your download

We have sent an email with a download link.