Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
The Aspose.Pdf.LowCode.Optimizer plugin applies optimization operations to PDF documents. Use CompressOptions to reduce file size, OptimizeOptions for resource optimization, ResizeOptions for page resizing, and RotateOptions for page rotation.
// For complete examples and data files, visit https://github.com/aspose-pdf/Aspose.PDF-for-.NET
private static void CompressPdfWithOptimizerPlugin()
{
// The path to the documents directory
var dataDir = RunExamples.GetDataDir_AsposePdf_Pages();
// Create PDF Optimizer plugin
var plugin = new Aspose.Pdf.LowCode.Optimizer();
// Add input and output files
var options = new Aspose.Pdf.LowCode.CompressOptions();
options.AddInput(new Aspose.Pdf.LowCode.FileDataSource(dataDir + "OptimizeDocument.pdf"));
options.AddOutput(new Aspose.Pdf.LowCode.FileDataSource(dataDir + "CompressPdfWithOptimizer_out.pdf"));
// Compress the file
var result = plugin.Process(options);
// Get the path of the optimized PDF document
var outputPath = result.ResultCollection[0].ToFile();
}
Process returns one optimized PDF result for each input and output pair.
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.