Table of Contents

Namespace DocWright.Core

Namespaces

DocWright.Core.Diagnostics
DocWright.Core.Document
DocWright.Core.Formats
DocWright.Core.Imaging
DocWright.Core.Metafiles
DocWright.Core.Primitives
DocWright.Core.Rendering
DocWright.Core.Text

Classes

DocWrightException

The base type for every exception DocWright throws deliberately. Catching this type catches all library-defined failures while letting unexpected runtime faults surface.

DocumentEncryptedException

Thrown when a document is encrypted and DocWright cannot open it: no password was supplied, or the encryption scheme is one DocWright does not implement.

This is deliberately distinct from InvalidDocumentException. An encrypted package is not malformed — it is well-formed and unreadable for a reason the caller can act on, and telling the two apart is the difference between "supply a password" and "this file is corrupt".

The message never contains password, key or salt material.

DocumentIntegrityException

Thrown when decryption succeeded — the password verified — but the integrity check over the decrypted payload failed, meaning the ciphertext was altered or truncated after it was written.

Reported separately from InvalidPasswordException on purpose: a wrong password is a user error and a failed HMAC is a damaged or tampered file, and collapsing them sends the caller looking in the wrong place.

FontResolutionException

Thrown when a required font cannot be located or loaded and no fallback in the configured chain resolves.

InvalidDocumentException

Thrown when an input document is structurally invalid (not a valid package, missing required parts, malformed XML) and no meaningful degraded output exists.

InvalidPasswordException

Thrown when a password was supplied for an encrypted document and it did not verify.

Distinct from DocumentEncryptedException (no usable password at all) and from DocumentIntegrityException (the password was right and the ciphertext is damaged), because a caller retries on one and not on the others.

The message never contains the password that failed.

OutputConformanceException

Thrown when output was requested at a conformance level the conversion cannot satisfy as configured — for example PDF/A, which requires a creation timestamp DocWright will never invent.

Deliberately distinct from UnsupportedFeatureException: nothing here is unimplemented and nothing about the input is wrong. The caller asked for a guarantee and supplied options that contradict it, which is a different fix.

ResourceLimitExceededException

Thrown when a conversion exceeds a configured ResourceLimits cap.

ResourceLimits

Caps that protect a conversion against hostile or degenerate input (zip bombs, runaway page counts, excessive image payloads, pathological nesting). A null limit means "unlimited". Exceeding a limit raises ResourceLimitExceededException regardless of strict mode.

UnsupportedFeatureException

Thrown when the document uses a feature DocWright does not support. In the default lenient mode unsupported features are reported through IConversionDiagnostics and rendering degrades gracefully; this exception is thrown only when strict mode is enabled, or when no degraded behavior exists at all.