PdfOptimizationPlan Class

The changes PdfOptimizer plans for a document. Inspect the PdfOptimizationPlan.Actions, disable the ones to leave out (PdfOptimizationAction.IsEnabled), and apply the plan with PdfOptimizer.Apply.

public sealed class PdfOptimizationPlan

Properties

NameDescription
ActionsGets the changes, in the order they are made.
DocumentGets the document the plan was created for.
HasSignaturesGets a value indicating whether the document has signed signature fields.
InvalidatesSignaturesGets a value indicating whether applying the plan invalidates signatures: the document is signed, and an action is enabled.
OptionsGets the options the plan was created with.

Gets the changes, in the order they are made.

public IReadOnlyList<PdfOptimizationAction> Actions { get; }

Gets the document the plan was created for.

public PdfDocument Document { get; }

Property value

PdfDocument

Gets a value indicating whether the document has signed signature fields.

public bool HasSignatures { get; }

Property value

bool

InvalidatesSignatures

PdfOptimizationPlan.cs

Gets a value indicating whether applying the plan invalidates signatures: the document is signed, and an action is enabled.

public bool InvalidatesSignatures { get; }

Property value

bool

Gets the options the plan was created with.

public PdfOptimizationOptions Options { get; }

Methods

NameDescription
ToJson(bool)Writes the plan as JSON: hasSignatures, invalidatesSignatures and the actions, with their kind, description, page index, object number, resource name and state.

Writes the plan as JSON: hasSignatures, invalidatesSignatures and the actions, with their kind, description, page index, object number, resource name and state.

public string ToJson(bool indented = false)

Parameters

indented bool
true to indent the JSON.

Returns

string The JSON text.