Mixed raster content (MRC) is a way to compress images with mixed content. For more information, see the MRC Wikipedia article(opens in a new tab).

Nutrient .NET SDK (formerly GdPicture.NET) uses advanced MRC compression techniques to reduce the size of structured documents that mix text, graphics, and images, without losing quality.

Our MRC compression engine is based on MRC hyper-compression techniques, and it can both reduce the size of images and improve rendering quality. Using image segmentation, it compresses areas with the optimum algorithm based on their characteristics.

For more information on hyper-compression, check out our demo video below.

Alternative minimal pipeline

If you want a concise MRC optimization flow, enable MRC and process the document in a few lines:

using GdPicture14;
LicenseManager licence = new LicenseManager();
licence.RegisterKEY("");
GdPicturePDFReducer PDFReducer = new GdPicturePDFReducer();
PDFReducer.PDFReducerConfiguration.EnableMRC = true;
PDFReducer.ProcessDocument(@"input_image_based.pdf", @"output.pdf");

Use this for quick compression, and use the full workflow below when you need to tune metadata and advanced reducer settings.

Using MRC compression

To compress a PDF document using MRC compression, follow these steps:

  1. Create a GdPicturePDFReducer object.
  2. Configure the metadata of the resulting PDF document with the following properties of the PDFReducerConfiguration object:
Property nameDescription
AuthorSpecifies the author of the resulting PDF document.
ProducerSpecifies the producer of the resulting PDF document.
ProducerNameSpecifies the name of the producer of the resulting PDF document.
TitleSpecifies the title of the resulting PDF document.
  1. Enable MRC compression by setting the EnableMRC property of the PDFReducerConfiguration object to true.
  2. Optional: Configure the compression process with the properties of the PDFReducerConfiguration object. For more information, see the compression guide.
  3. Run the compression process with the ProcessDocument method. This method takes the path to the source and the output PDF files as its parameters.

The example below compresses a PDF document using MRC compression:

using GdPicturePDFReducer gdpicturePDFReducer = new GdPicturePDFReducer();
// Configure the metadata of the resulting PDF document.
gdpicturePDFReducer.PDFReducerConfiguration.Author = "Nutrient .NET PDF Reducer SDK";
gdpicturePDFReducer.PDFReducerConfiguration.Producer = "GdPicture.NET 14";
gdpicturePDFReducer.PDFReducerConfiguration.ProducerName = "Nutrient";
gdpicturePDFReducer.PDFReducerConfiguration.Title = "MRC Compression";
// Enable and configure MRC compression.
gdpicturePDFReducer.PDFReducerConfiguration.EnableMRC = true;
gdpicturePDFReducer.PDFReducerConfiguration.DownscaleResolutionMRC = 200;
gdpicturePDFReducer.PDFReducerConfiguration.OutputFormat = PDFReducerPDFVersion.PdfVersionRetainExisting;
gdpicturePDFReducer.PDFReducerConfiguration.RecompressImages = true;
// Run the compression process.
gdpicturePDFReducer.ProcessDocument(@"C:\temp\source.pdf", @"C:\temp\output.pdf");