Method Relayout
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
documentWordDocumentThe 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.
changedParagraphKeysIReadOnlyCollection<long>The
NodeIdvalues 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.diagnosticsIConversionDiagnosticsWhere 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
documentis null.- InvalidOperationException
VerifyAgainstFullLayout is on and the incremental layout differs from a full one.