Class Optimizer

Info

Represents Documentize.Optimizer plugin. Used to Optimize, Rotate, Resize, Compress PDF documents.

public static class Optimizer

Inheritance

objectOptimizer

Inherited Members

Examples

The example demonstrates how to Optimize PDF document.

// Create OptimizeOptions object to set instructions
var options = new OptimizeOptions();
// Add input file path
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
// Set output file path
options.AddOutput(new FileDataSource("path_to_result_pdf_file.pdf"));
// Perform the process
Optimizer.Process(options);

The example demonstrates how to Rotate PDF document.

// Create RotateOptions object to set instructions
var options = new RotateOptions();
// Set new Rotation
options.Rotation = Rotation.On90;
// Add input file path
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
// Set output file path
options.AddOutput(new FileDataSource("path_to_result_pdf_file.pdf"));
// Perform the process
Optimizer.Process(options);

The example demonstrates how to Resize PDF document.

// Create ResizeOptions object to set instructions
var options = new ResizeOptions();
// Set new PageSize
options.PageSize = PageSize.A3;
// Add input file path
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
// Set output file path
options.AddOutput(new FileDataSource("path_to_result_pdf_file.pdf"));
// Perform the process
Optimizer.Process(options);

The example demonstrates how to Compress PDF document.

// Create CompressOptions object to set instructions
var options = new CompressOptions();
// Add input file path
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
// Set output file path
options.AddOutput(new FileDataSource("path_to_result_pdf_file.pdf"));
// Perform the process
Optimizer.Process(options);

Methods

Process(OptimizeOptions)

Starts the Documentize.Optimizer processing with the specified parameters.

public static ResultContainer Process(OptimizeOptions options)

Parameters

  • options OptimizeOptions: An options object containg instructions for the Documentize.OptimizeOptions.

Returns

ResultContainer : An ResultContainer object containg the result of the operation.

Process(RotateOptions)

Starts the Documentize.Optimizer processing with the specified parameters.

public static ResultContainer Process(RotateOptions options)

Parameters

  • options RotateOptions: An options object containg instructions for the Documentize.RotateOptions.

Returns

ResultContainer : An ResultContainer object containg the result of the operation.

Process(ResizeOptions)

Starts the Documentize.Optimizer processing with the specified parameters.

public static ResultContainer Process(ResizeOptions options)

Parameters

  • options ResizeOptions: An options object containg instructions for the Documentize.ResizeOptions.

Returns

ResultContainer : An ResultContainer object containg the result of the operation.

Process(CompressOptions)

Starts the Documentize.Optimizer processing with the specified parameters.

public static ResultContainer Process(CompressOptions options)

Parameters

  • options CompressOptions: An options object containg instructions for the Documentize.CompressOptions.

Returns

ResultContainer : An ResultContainer object containg the result of the operation.

Namespace: Documentize Assembly: Documentize.dll

 English