Table of Contents

Method Relayout

Namespace
DocWright.Layout
Assembly
DocWright.Layout.dll

Relayout(WordDocument, IReadOnlyCollection<long>?, IConversionDiagnostics?)

Lays a document out again after it changed, reusing what did not change, and says which pages are new.

public LayoutUpdate Relayout(WordDocument document, IReadOnlyCollection<long>? changedParagraphKeys = null, IConversionDiagnostics? diagnostics = null)

Parameters

document WordDocument

The document, as it now is. It must be the one the session laid out before for reuse to pay; any document is laid out correctly.

changedParagraphKeys IReadOnlyCollection<long>

The NodeId values of the paragraphs the caller changed (DocumentEdit.ChangedParagraphKeys), or null. A hint only: the session finds what changed by comparing, so the result does not depend on it.

diagnostics IConversionDiagnostics

Where to report, or null. Diagnostics come from what was measured again; a paragraph whose measurement was reused reports nothing a second time.

Returns

LayoutUpdate

The update.

Exceptions

ArgumentNullException

document is null.

InvalidOperationException

VerifyAgainstFullLayout is on and the incremental layout differs from a full one.