New to Telerik Document ProcessingStart a free 30-day trial

Optimizing and Reducing the Size of PDF Files with RadPdfProcessing

Updated on Jun 9, 2026

Environment

VersionProductAuthor
2024.2.426RadPdfProcessingDesislava Yordanova

Description

When you handle PDF files, you often need to optimize and reduce their size without compromising the content quality. This requires applying better compression to stream objects and adjusting image quality settings. This article shows how to:

  • Compress the content inside a PDF document
  • Fine-tune the settings to lower the image quality in a PDF for size optimization
  • Optimize the font embedding in RadPdfProcessing

Solution

To optimize and reduce the size of existing PDF files with RadPdfProcessing, follow these steps:

  1. Adjust Image Quality: Set the ImageQuality to a lower setting to reduce the size of images within the PDF. Lower image quality results in smaller file sizes.

    csharp
    pdfFormatProvider.ExportSettings.ImageQuality = ImageQuality.Low;

    For more information on setting image quality, see the ImageQuality documentation.

  2. Apply Image Compression: Specify the types of ImageCompression to use. FlateDecode is recommended for effective compression.

    csharp
    pdfFormatProvider.ExportSettings.ImageCompression = new ImageFilterTypes[] { ImageFilterTypes.FlateDecode };

    For more information on image compression settings, see the ImageCompression documentation.

  3. Enable Stream Compression: Stream compression reduces the size of non-image content in the same way as image compression.

    csharp
    pdfFormatProvider.ExportSettings.StreamCompression = new StreamFilterTypes[] { StreamFilterTypes.FlateDecode };

    For more information on stream compression, see the StreamCompression documentation.

  4. Optimize Font Embedding: Starting with Q2 2024, you can use FontEmbeddingType.Subset to export only the necessary parts of TrueType Fonts (TTF). This reduces the PDF file size.

    csharp
    pdfFormatProvider.ExportSettings.FontEmbeddingType = FontEmbeddingType.Subset;

    For more information on font embedding types, see the FontEmbeddingType documentation.

Notes

  • Reduce the size of PDF files carefully. Lowering image quality and applying aggressive compression can affect the visual fidelity of the document.
  • Always test the output PDF to ensure the optimizations meet your requirements.

See Also