Class SaveOptions
- Namespace
- DocWright
- Assembly
- DocWright.dll
Options controlling Save(WordDocument, Stream, string, SaveOptions?).
Deliberately separate from ConvertOptions: converting renders a document through layout to PDF and needs fonts, page setup and rendering controls, while saving round-trips the model in an editable format and needs none of them. Sharing one options bag would offer callers a pile of settings that do nothing on a save.
Grows additively, like the other option bags.
public sealed class SaveOptions
- Inheritance
-
SaveOptions
- Inherited Members
Constructors
Properties
- Diagnostics
Gets or sets the sink that receives write diagnostics, or null to discard them.
- Encryption
Gets or sets the settings used to encrypt the saved package, or null to save it unencrypted (the default).
Encryption wraps the package the writer produced; it does not change what the writer produces. Decrypting the result therefore yields bytes identical to the same save with this property left null — which is asserted by test, and is what lets the unencrypted path keep its byte-for-byte determinism guarantee while the encrypted one necessarily gives it up to a random salt.
Only the DOCX writer honours this. Saving to a flow format with encryption requested raises UnsupportedFeatureException rather than quietly writing an unprotected file.
- FormatSettings
Gets the format-specific settings, keyed by a namespaced string. Empty by default.
- StrictMode
Gets or sets a value indicating whether content the writer cannot represent aborts the save (true) instead of being reported and degraded (false, the default).