MRC PDF optimization
Image-heavy PDFs and scanned documents often have large file sizes. Mixed raster content (MRC) optimization reduces size by separating foreground content (for example, text) from background imagery and applying different compression strategies to each layer.
Use this workflow when you need to:
- Reduce storage footprint for scanned PDFs
- Improve upload and download times
- Keep text readability while compressing image data
Prepare the project
Register the SDK license before running optimization operations. For setup details, refer to the getting started with .NET SDK guide.
using GdPicture14;
LicenseManager licence = new LicenseManager();licence.RegisterKEY("");Configure MRC optimization
Create a GdPicturePDFReducer instance:
GdPicturePDFReducer PDFReducer = new GdPicturePDFReducer();Enable MRC in the reducer configuration:
PDFReducer.PDFReducerConfiguration.EnableMRC = true;Process the document
Run reduction on the input PDF and write the optimized output:
PDFReducer.ProcessDocument(@"input_image_based.pdf", @"output.pdf");Handle errors
ProcessDocument returns a GdPictureStatus value. Use that value in your error handling flow. For details, refer to the handling errors with .NET SDK guide.
Conclusion
This workflow applies MRC optimization to image-based PDFs to reduce file size while preserving readable output.