Repository navigation
v0.53.0
0.53.0 (2026-09-02)
Added
-
Core:
DocxEditor.ReplaceTextcan match a regular expression, not just literal keys.
A new overload takes aRegexand a replacement template, with aStreamform beside it, and
applies across the body, headers, footers, footnotes and endnotes exactly as the literal overload
does. Anything whose shape is known but whose text is not - dates, reference numbers, whitespace -
now has an entry point.The replacement is a TEMPLATE, not a literal.
$1and friends expand to captured groups the
wayRegex.Replaceexpands them, so a literal$must be written$$.The pattern must carry a match timeout, and one without is refused with an
ArgumentException
rather than accepted. A catastrophically backtracking expression has no upper bound on its running
time, and a hang is worse than a failure because the caller cannot catch it. Construct it as
new Regex(text, RegexOptions.None, TimeSpan.FromSeconds(1)).Formatting behaves exactly as it already did for literal keys: where a match spans several
runs, the replacement is written into the run holding its first character and inherits that run's
formatting. Zero-width matches are skipped, because one consumes no characters.Nothing existing changed. The literal overload is untouched, and both now share one
implementation of the run-splicing step rather than two that could drift. -
Extensions:
IPdfEditormirrorsExtractWordsandExtractImagesfrom core 0.52.0, with
theirStreamforms - four members, so the PDF word-position and image extraction added last
release is now reachable through dependency injection.Two things a caller gets wrong without being told, and which the interface documentation now
states: coordinates are measured from the page's bottom-left, so a word near the top of A4 has
aBottomnear 842 rather than near 0; andPdfImage.Pngis null when the pixels could not be
re-encoded, which is a normal outcome rather than an error.