This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /guides/dotnet/optimization/pdf-optimization.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. Optimizing PDFs | Nutrient .NET SDK

PDF optimization reduces file size while preserving document readability and layout. This helps when you store large archives, share documents over the network, or publish PDFs for download.

This guide shows how to:

  • Initialize the SDK
  • Create a PDF reducer
  • Process an input PDF into an optimized output PDF

Prepare the project

Register the SDK license before running optimization. For setup details, refer to the getting started with .NET SDK guide.

using GdPicture14;
LicenseManager licence = new LicenseManager();
licence.RegisterKEY(""); // Set your license key

Create the PDF reducer

Instantiate GdPicturePDFReducer:

GdPicturePDFReducer PDFReducer = new GdPicturePDFReducer();

Optimize the PDF

Process the input file and write the optimized output:

PDFReducer.ProcessDocument(@"input_large.pdf", @"output.pdf");

ProcessDocument analyzes the source file and applies supported reduction steps to lower file size.

Conclusion

This workflow creates a smaller PDF from a larger source document by running PDF reduction on the input file.