Editor Plugin

The Editor plugin adds a full‑featured, live‑editing experience for .docx files to a Doconut‑powered ASP.NET Core application. When the plugin is registered it contributes an editable .docx viewer (available only when the licence grants LicenseCapability.Editor) and a set of server‑side services that drive the editor UI, token‑based security, and optional persistence for web‑farm scenarios.

SurfaceDescription
EditorPluginRegisters the editable .docx viewer. The viewer is enabled only when the current licence includes the Editor capability.
DocumentEditorServer‑side API for opening a document in edit mode (OpenForEditAsync), exporting the edited document (ExportAsync), and closing the session (Close).
Editor widget (opt‑in)Self‑service widget that lets an untrusted client upload a .docx and start editing without any host‑side code. Enabled with options.AddEditorWidget(...).
Editor persistence (opt‑in)Persists live editor sessions to a shared, encrypt‑at‑rest FileShare directory so any node in a web farm can rehydrate the session. Enabled with AddDoconutEditorPersistence.
DistributedDocumentAccessStoreToken‑grant store backed by IDistributedCache. When a web farm registers the persistence store, every node sees the same token grants.
HTTP edit‑channel endpoints (added by UseDoconut())• POST ?edit=open – self‑service upload endpoint (widget only).
• GET ?token=<token>&geometry=<geometry> – fetch page geometry for the editor.
• POST ?token=<token>&edit=1&scale=<scale> – send edit operations.
• POST ?token=<token>&save=<save> – request a save.
• POST ?token=<token>&undo=1 / ?redo=1 – undo / redo.
• GET ?token=<token>&properties=1 – retrieve document properties.
Client‑side bundleseditor/editor.js (full editor UI) and editor/doconutEditor.js (self‑service widget). Both are served under the ResourcesPath (/doconut-res by default).

Install the package

Install the Editor plugin at the release this documentation describes:

bash
dotnet add package Doconut.NET8.Editor --version 26.11.0

Keep Doconut.NET8.Editor at the same version as Doconut.NET8.

The plugin's license file, Doconut.Viewer.Editor.lic, goes in the same folder as Doconut.Viewer.lic; it is read together with the viewer license.

Platforms. The plugin runs wherever Doconut.NET8 runs: Windows, and glibc-based Linux on x64 (not Alpine or other musl-based distributions). On Linux, install the font configuration library before the first document opens:

bash
apt-get update && apt-get install -y libfontconfig1

On RHEL, Fedora and similar distributions the package is fontconfig. Without it, opening a document fails with The system library libfontconfig1 is missing. Install it (Debian/Ubuntu: apt-get install -y libfontconfig1) and see the Linux section of the Doconut documentation.

Register the plugin

Like every Doconut plugin, Editor registers with AddPlugin inside AddDoconut:

csharp
builder.Services.AddDoconut(options =>
{
    options.LicensePath = "Doconut.Viewer.lic";
    options.AddPlugin<Doconut.Plugins.Editor.EditorPlugin>();
});

Licensing & watermark

The Editor plugin needs a license that grants the Editor capability. Without one, AddDoconut() throws an InvalidOperationException at startup, before the app serves a request:

text
The Editor plugin is registered via AddPlugin but no active license grants Editor. Remove the AddPlugin<...>() call or install a license that includes Editor (a temporary license includes every capability).

It throws for no license, a legacy TRIAL file, a license without Editor, and a paid license used outside its version window. Temporary Demo/NFR licenses are accepted. See License Setup for how licenses are loaded.

License stateStartupOutput
Paid license granting Editor, within its version windowStartsWithout the evaluation watermark
Temporary Demo/NFR licenseStartsWith the evaluation watermark
No license, a legacy TRIAL file, a license without Editor, or a paid license outside its version windowAddDoconut() throws—

Use from C#

Opening a document for editing

The editor works with a session token that ties the browser’s edit channel to the server‑side DocumentEditor. Keep the token and never log it.

1. Via the viewer (EditMode = true)

csharp
using Doconut;

// `viewer` is resolved from DI (see “Register the plugin”).
var token = await viewer.OpenDocumentAsync(
    stream,
    new FileInfo("contract.docx"),
    config: null,
    options: new DocOptions { EditMode = true },
    ct: ct);

2. Directly from DocumentEditor (path)

csharp
using Doconut;

var editor = app.Services.GetRequiredService<DocumentEditor>();
var token = await editor.OpenForEditAsync(
    "contract.docx",
    ct: ct);

3. Directly from DocumentEditor (stream, password)

csharp
using Doconut;

var editor = app.Services.GetRequiredService<DocumentEditor>();
var token = await editor.OpenForEditAsync(
    stream,
    "protected.docx",
    options: new DocOptions { EditMode = true, Password = "s3cr3t" },
    ct: ct);

Handling errors

csharp
using Doconut;

var editor = app.Services.GetRequiredService<DocumentEditor>();

try
{
    var token = await editor.OpenForEditAsync("contract.docx", ct: ct);
    // …use the token…
}
catch (ArgumentException ex) when (ex.Message.Contains("File path"))
{
    // Invalid path supplied.
}
catch (InvalidOperationException ex) when (ex.Message.Contains("license"))
{
    // Licence does not grant Editor.
}
catch (DoconutException ex)
{
    // Other Doconut‑reported failure.
    // ex.ToString() includes the full inner‑exception chain.
}

Working with token grants (optional)

csharp
using Doconut.Security;

var accessStore = app.Services.GetRequiredService<IDocumentAccessStore>();

var grant = new DocumentAccessGrant(
    SessionId: "session-123",
    UserId:    "user-456",
    ExpiresAtUtc: DateTimeOffset.UtcNow.AddMinutes(30));

await accessStore.GrantAsync(token, grant, ct);
// Later:
await accessStore.RevokeAsync(token, ct);

The stateful-session model

The Editor plugin is the only Doconut component that keeps live state on the server.
Every editing request (?edit, ?undo, ?redo, ?save, ?properties) works against a single in‑memory session identified by a token. The session holds the document, the undo/redo stacks, and internal registries for paragraphs and shapes.

Session lifetime

  • The session lives in the server‑side document cache. Its sliding expiration is controlled by
    DocOptions.TimeOut (minutes, default 60).
  • Each successful request that carries the token refreshes the sliding timeout.
  • When the timeout expires the session is evicted; subsequent requests for that token return 404.
  • After eviction the host must reopen the document (see Use from C#).

Access lifetime

  • Token access is stored in an IDocumentAccessStore. By default this is an in‑memory store; when a web‑farm is used and AddDoconutEditorPersistence is registered, the store becomes a DistributedDocumentAccessStore that uses the application’s IDistributedCache.
  • The grant is valid for the same DocOptions.TimeOut minutes and is bound to the ASP.NET session that created it.
  • Each request that passes the security check slides the grant’s expiration.
  • When the grant expires (or the ASP.NET session ends) the middleware returns 403 with the body
    You Are Not Authorized To View This Page.

Concurrent‑session cap

OptionDefaultMeaning
DoconutOptions.MaxConcurrentEditorSessions200Maximum number of live editor sessions. 0 or negative disables the cap.
DoconutOptions.EditorEvictionIdleMinutes5When the cap is reached, the least‑recently‑used idle session is evicted only if it has been idle for at least this many minutes. 0 or less forces eviction of the LRU session regardless of idle time.

If every session is active, a new open request is rejected with 503 and the message

code
The editor is busy: too many documents are open. Try again in a few minutes.

Only editor sessions count toward the cap; normal viewer sessions are never evicted.

Web‑farm considerations

  • By default a live session resides on a single node, so sticky routing (session affinity) is required.
  • When the optional persistence layer is enabled, any node can rehydrate a session on a cache miss, eliminating the need for affinity. The rehydration still respects the token grant stored in the distributed IDocumentAccessStore.

Opt‑in farm persistence (op‑log)

Registering AddDoconutEditorPersistence makes editor sessions farm‑agnostic. The session is persisted to a shared, encrypt‑at‑rest, token‑bound directory so any node can rebuild it.

csharp
builder.Services.AddDoconut(o =>
{
    o.AddPlugin<Doconut.Plugins.Editor.EditorPlugin>();
    o.EditorSnapshotEveryOps = 50;          // snapshot cadence (undo window)
});

builder.Services.AddDoconutEditorPersistence(persistence =>
{
    persistence.RootPath = @"\\fileshare\doconut"; // shared FileShare folder
    persistence.FarmKey  = Convert.FromBase64String(
        builder.Configuration["Doconut:FarmKey"] ?? "");
});
PropertyTypeDefaultDescription
EditorPersistenceOptions.RootPathstring—Shared FileShare root; editor state lives under {RootPath}/editor/{token}.
EditorPersistenceOptions.FarmKeybyte[]—Farm‑wide encryption key (≥ 32 bytes, identical on every node).
EditorPersistenceOptions.TtlTimeSpan1 hourPersisted blobs older than this are treated as expired (checked lazily).
DoconutOptions.EditorSnapshotEveryOpsint50After this many mutations a snapshot is taken and the op‑log is truncated. 0 disables mid‑session snapshots.

How it works

  1. The original .docx is snapshotted when the session opens.
  2. Every mutation (edit, undo, redo) is appended to a per‑session op‑log.
  3. On a node that has never seen the token, the session is rebuilt by loading the latest snapshot and replaying the op‑log through the same apply/undo/redo pipeline, restoring both the document and the undo/redo stacks.
  4. After every EditorSnapshotEveryOps mutations a new snapshot is written and the log is truncated, limiting replay time and defining how far back undo survives a fail‑over.

The persisted blobs are encrypted at rest and token‑bound; a different token cannot read them. If the configuration is invalid, registration throws:

  • RootPath is required.
  • FarmKey must be at least 32 bytes and identical on every node.

What persistence does not cover

  • Document security – the token grant is still checked by the middleware before any rehydration occurs. In a farm the grant must be stored in the shared IDistributedCache (via DistributedDocumentAccessStore) so every node can validate the token.
  • Session affinity – while persistence removes the hard requirement for sticky routing, routing a request to the node that already holds the warm in‑memory session avoids the replay cost.

When the above pieces (shared cache, shared FarmKey, and the same DocOptions such as Password or DemoMaxPages) are in place, a web‑farm can serve editor sessions from any node without losing undo history or document state.

Edit vs. view — render fidelity

Viewing a .docx (read‑only)

  • When DocOptions.EditMode is false (the default) the document is handed to the built‑in Word viewer.
  • The viewer renders each page as a full‑resolution image (the same DPI used for any other format).
  • This path is independent of the Editor plugin – installing the Editor does not alter the quality of normal view renders.

Editing a .docx (live session)

  • Setting DocOptions.EditMode = true tells the middleware to use the editable viewer contributed by the EditorPlugin.
  • The editable viewer renders pages at a geometry‑aligned density that matches the interactive editing surface. This density is lower than the full‑resolution view render, because it must keep caret and overlay alignment fast.
  • The editor never changes how the built‑in viewer renders – opening a document for edit does not affect the fidelity of any subsequent view of that document (or any other document).

How to choose the mode

  • Only set EditMode = true on the code path that actually presents an editing UI.
  • For ordinary browsing or preview, omit the option or leave it at its default (false).
csharp
// Viewing – no EditMode flag (full‑resolution viewer)
var viewToken = await viewer.OpenDocumentAsync(
    stream,
    new FileInfo("contract.docx"),
    config: null,
    options: new DocOptions(),   // EditMode defaults to false
    ct: ct);

// Editing – enable the editor (lower‑density render)
var editToken = await viewer.OpenDocumentAsync(
    stream,
    new FileInfo("contract.docx"),
    config: null,
    options: new DocOptions { EditMode = true },
    ct: ct);

Note: DocOptions.ImageResolution is obsolete and does not control render priority for either view or edit paths. Render DPI is now governed by the format‑specific BaseConfig.ImageResolution property.

What the separation guarantees

AspectViewer (EditMode = false)Editor (EditMode = true)
Render sourceBuilt‑in Word viewerEditor‑provided viewer
Image densityFull‑resolution (max DPI)Geometry‑aligned (lower DPI)
License impactRequires only the base viewer licenceRequires the Editor capability
Effect on other sessionsNone – other users still see full fidelityNone – other users still see full fidelity

Because the two paths are completely isolated, you can safely enable the Editor plugin for editing scenarios without sacrificing the visual quality of normal document previews.

Export

Server‑side export

DocumentEditor.ExportAsync returns the document exactly as it exists in the live editor session.
Only docx and pdf are supported; any other format causes an ArgumentException.

csharp
using Microsoft.AspNetCore.Http;
using Doconut;

// Resolve the editor from the request’s service provider.
var editor = HttpContext.RequestServices.GetRequiredService<DocumentEditor>();

// `token` and `ct` are supplied by your calling code (e.g., from the request that opened the session).
byte[] docx = await editor.ExportAsync(token, "docx", ct);
byte[] pdf  = await editor.ExportAsync(token, "pdf", ct);

// Store the bytes wherever your application keeps documents.
File.WriteAllBytes("contract-edited.docx", docx);
File.WriteAllBytes("contract-edited.pdf", pdf);

Exceptions you may see

ExceptionReason
ArgumentExceptionThe format argument is not "docx" or "pdf".
ArgumentExceptionThe token argument is null or empty.
InvalidOperationExceptionEditor session not found. It may have expired. – the token is unknown or the session’s TTL has elapsed.
InvalidOperationExceptionThis session is not an editor session. – the token belongs to a view‑only session.
InvalidOperationExceptionThe license does not cover editing. – the current licence lacks the Editor capability.
DoconutExceptionAny other engine‑level failure; its Message (and inner messages) describe the problem.

When logging, exception.ToString() safely includes the full inner‑exception chain.


HTTP export endpoint

UseDoconut() adds a POST endpoint that returns the current document content:

code
POST ?token=<token>&save=docx   // returns the edited .docx
POST ?token=<token>&save=pdf    // returns the edited PDF
ConditionHTTP statusBody
Request method is not POST405(no body)
Token does not belong to an editor session400(no body)
Licence no longer grants Editor403{"error":"The license no longer covers editing."}
Unexpected server error (e.g., session lookup failure)500(error is logged, not exposed)

The response payload is the raw binary document for the requested format. This endpoint does not mark the document as “saved” in the embedded UI—it is equivalent to a manual “Save As” from the browser.


Export considerations

  • License – The Editor capability must be granted; otherwise every export call fails with the license does not cover editing error.
  • Demo mode – If the self‑service widget is configured with DemoMaxPages, an export is limited to those pages.
  • Session lifetime – Export works only while the editor session is alive (DocOptions.TimeOut sliding expiration). After expiration you must reopen the document.
  • Password‑protected files – When the original document was opened with a password, the exported docx retains that password; the pdf export is never password‑protected.

Use the server‑side ExportAsync when you need to store the edited file in your own repository, and the HTTP ?save= endpoint when a client‑side script wants to download the current state without involving additional backend logic. Both paths enforce the same licence and session checks.

Drop-in widget

Enable the widget

The Editor widget is off by default. Opt‑in by adding the widget options when you register Doconut:

csharp
builder.Services.AddDoconut(options =>
{
    options.LicensePath = "Doconut.Viewer.lic";
    options.AddPlugin<Doconut.Plugins.Editor.EditorPlugin>();
    // Turns on the self‑service ?edit=open endpoint.
    options.AddEditorWidget(widget =>
    {
        widget.MaxUploadMb = 25;          // default, can be changed
        // widget.DemoMaxPages = 0;       // leave off for full document access
    });
});

The call to AddPlugin<EditorPlugin>() is required; otherwise AddEditorWidget() throws at startup (see Register the plugin).

Self‑service widget (no host‑side code)

When the widget is enabled, a page can host the editor with a single script tag and a single init call. The widget presents a file picker, uploads the chosen .docx to ?edit=open, receives a live edit‑session token, and then mounts the full editor UI.

html
<div id="host" style="height: 100vh"></div>

<script type="module" src="/doconut-res/editor/doconutEditor.js"></script>
<script type="module">
  // No token → the widget shows the upload UI, then opens the session it gets back.
  Doconut.editor('#host', { basePath: '/doconut' });
</script>

Both <script> tags must be type="module"; a plain <script> would run before the module is loaded and would not find Doconut.

Mounting an already‑opened session

If your server has already opened a document for editing (e.g. via DocumentEditor.OpenForEditAsync), you can skip the upload UI and bind the widget directly to the token:

javascript
import { mountDoconutEditor } from '/doconut-res/editor/editor.js';

const editor = mountDoconutEditor(document.getElementById('host'), {
  token: '<session‑token‑from‑server>',
  base: '/doconut',          // the MiddlewarePath where UseDoconut() runs
});

The returned editor handle implements dispose() to unmount the UI.

Widget options

OptionTypeDefaultMeaning
basePathstringrequiredThe URL prefix where UseDoconut() is mapped (e.g. /doconut).
tokenstringnoneIf supplied, the widget attaches to that edit session and does not show the upload UI.
acceptstring'.docx'File‑input filter. The server only accepts .docx regardless of this value.
autosave{ delayMs?, save(document) }noneAfter the user stops editing for delayMs (default 3000 ms) the widget calls save with the current .docx as a Blob.
warnBeforeLeavingbooleantrueShows the browser’s “leave page?” dialog when there are unsaved changes.
showThumbnailsbooleantrueShows the page‑thumbnail pane on start. The Pages button toggles it.
onError(msg) => voidalertCalled when the upload fails (e.g. 400 / 413 responses).
onUnsaved({ unsaved }) => voidnoneNotified whenever the document gains or loses unsaved changes.

Autosave example

javascript
Doconut.editor('#host', {
  basePath: '/doconut',
  autosave: {
    delayMs: 3000,
    save: async (docx) => {
      const res = await fetch('/api/documents/42', {
        method: 'PUT',
        body: docx
      });
      if (!res.ok) throw new Error('The server did not store the document.');
    }
  }
});

Callbacks

CallbackWhenArgument
onErrorThe upload to ?edit=open fails.The error message string (e.g. "File is too large.").
onUnsavedThe document’s unsaved‑changes flag changes.`{ unsaved: true

A callback that throws is caught and logged; it never breaks the widget.

Imperative handle

When you call Doconut.editor (or mountDoconutEditor) the function returns a handle with a single method:

MethodBehaviour
dispose()Unmounts the editor UI and releases its DOM listeners. The server‑side session stays open until its TTL expires.

Demo / limited mode

For public showcases you can limit a self‑service session to the first N pages:

csharp
builder.Services.AddDoconut(options =>
{
    options.AddEditorWidget(w =>
    {
        w.DemoMaxPages = 1;   // only page 1 is exposed; the rest is hidden and watermarked
    });
});

DemoMaxPages affects only sessions opened through the self‑service ?edit=open endpoint. The editor UI still works on the visible pages, but metadata, page images, geometry and properties are clamped to the limit.

The ?edit=open endpoint

AspectDetails
EnablementOff by default; enabled by AddEditorWidget. When disabled the route returns 404 (no body).
MethodPOST only (405 otherwise).
Content typeMust be multipart/form-data (400 "Expected a multipart file upload.").
File requiredMissing file → 400 "No file uploaded.".
ExtensionOnly .docx accepted → 400 "The editor can only open .docx files.".
Size limitEnforced by MaxUploadMb; excess → 413 "File is too large.".
LicenseRequires the Editor capability; otherwise 403 (no body).
Editable viewerIf the document cannot be opened as an editable viewer → 403 "The editor is not available for this document.".
Password‑protectedReturns 400 "This document is password protected.".
SuccessJSON { "token": "<session‑token>", "pages": <int>, "width": <int>, "height": <int> }.
Error bodyJSON { "error": "<message>" }. The widget forwards the "error" value to onError.

Exporting from the widget

The editor UI provides Save (download .docx) and PDF (download .pdf) buttons. Those actions invoke the same server‑side endpoints used by DocumentEditor.ExportAsync. No additional code is required in your page.

Closing the session

When the user navigates away, the widget does not close the server‑side session; it expires according to the DocOptions.TimeOut sliding TTL (default 60 minutes) or can be closed explicitly from C#:

csharp
var editor = app.Services.GetRequiredService<DocumentEditor>();
// Frees the editing session. Changes not exported are lost.
editor.Close(token);

(See Use from C# for the full lifecycle.)


Build your own frontend

Overview

The Editor plugin exposes a REST‑style edit channel under the path where UseDoconut() is mounted (default /doconut).
All calls are same‑origin and require the session‑bound token obtained when a document is opened for edit (see Use from C#).
Your UI can drive the editor with plain fetch requests – no client‑side SDK is needed.

Getting a token

Open the document on the server with DocumentEditor.OpenForEditAsync (or the widget’s ?edit=open endpoint) and render the token into the page.
Do not log or persist the token; it is valid only for the browser session that opened it.

Minimal JavaScript client

html
<div id="editor">
  <canvas id="pageCanvas"></canvas>
  <button id="undoBtn">Undo</button>
  <button id="redoBtn">Redo</button>
  <button id="saveBtn">Save .docx</button>
</div>
javascript
// Base configuration – must match the middleware path.
const basePath = '/doconut';               // same as UseDoconut() path
const token = '<TOKEN_FROM_SERVER>';       // injected by the server

function url(params) {
  const q = new URLSearchParams({ token, ...params }).toString();
  return `${basePath}?${q}`;
}

async function fetchJson(path, init) {
  const resp = await fetch(url(path), init);
  if (!resp.ok) {
    if (resp.status === 422) {
      const err = await resp.json();
      throw new Error(err.detail);
    }
    const txt = await resp.text();
    throw new Error(`Error ${resp.status}: ${txt}`);
  }
  return resp.json();
}

async function loadGeometry(page = 1) {
  return await fetchJson({ geometry: page });
}

async function applyEdit(ops, scale = 1) {
  return await fetchJson(
    { edit: 1, scale },
    { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(ops) }
  );
}

async function undo()   { return await fetchJson({ undo: 1 },   { method: 'POST' }); }
async function redo()   { return await fetchJson({ redo: 1 },   { method: 'POST' }); }

async function save(fmt = 'docx') {
  const resp = await fetch(url({ save: fmt }), { method: 'POST' });
  if (!resp.ok) throw new Error(`Save ${fmt} failed: ${resp.status}`);
  const blob = await resp.blob();
  const a = document.createElement('a');
  a.href = URL.createObjectURL(blob);
  a.download = `edited.${fmt}`;
  a.click();
  URL.revokeObjectURL(a.href);
}

async function renderPage(page = 1) {
  const imgResp = await fetch(url({ page, v: Date.now() }));
  if (!imgResp.ok) throw new Error(`Page ${page} image failed: ${imgResp.status}`);
  const blob = await imgResp.blob();
  const img = new Image();
  img.onload = () => {
    const canvas = document.getElementById('pageCanvas');
    canvas.width = img.width;
    canvas.height = img.height;
    canvas.getContext('2d').drawImage(img, 0, 0);
  };
  img.src = URL.createObjectURL(blob);
}

// UI wiring
document.getElementById('undoBtn').addEventListener('click', async () => {
  try { await undo(); await renderPage(); } catch (e) { console.error(e); }
});
document.getElementById('redoBtn').addEventListener('click', async () => {
  try { await redo(); await renderPage(); } catch (e) { console.error(e); }
});
document.getElementById('saveBtn').addEventListener('click', async () => {
  try { await save('docx'); } catch (e) { console.error(e); }
});

// Initial load – fetch geometry, insert a sample text, render page 1.
(async () => {
  try {
    const geom = await loadGeometry(1);
    const editOps = [{
      type: 'insertText',
      opId: 1,
      at: { paragraphId: geom.paragraphs[0].paragraphId, offset: 0 },
      text: 'Hello '
    }];
    await applyEdit(editOps);
    await renderPage(1);
  } catch (e) {
    // Errors may be plain‑text “You Are Not Authorized To View This Page.” or JSON { "error": "..."}.
    console.error(e);
  }
})();

Key points to remember

  • Endpoints are built from DoconutOptions.MiddlewarePath; changing that path moves all URLs.
  • edit, undo, redo, save are POST‑only (405 otherwise). geometry, page, properties are GET.
  • 403 plain‑text You Are Not Authorized To View This Page. → session expired or wrong browser.
  • 403 JSON { "error": "The license no longer covers editing." } – see the Licensing & watermark section.
  • 404 → editing session not found (evicted or closed).
  • 422 JSON { "detail": "<reason>" } → edit batch rejected.
  • 500 returns a sanitized JSON error.
  • Render‑delta JSON from edit, undo, redo contains pages with inline‑rendered imageBase64. When the license does not grant editing, pages is null and the client must fetch page images separately (see Licensing & watermark).

Putting it together

  1. Server – open the document with DocumentEditor.OpenForEditAsync (or the widget) and embed the token in the page.
  2. Client – use the JavaScript helpers above to request geometry, apply edits, undo/redo, fetch page images, and save the edited file.
  3. UI – surface any JSON error or detail messages directly; for the plain‑text authorization error show a generic “Session expired – please reload” notice.

In production

Deployment checklist

TaskWhat to doWhy it matters
Add the licence filePlace Doconut.Viewer.lic (and, if you have a separate one, Doconut.Viewer.Editor.lic) in the wwwroot folder, or set DoconutOptions.LicensePath, LicenseContent or LicenseStream in AddDoconut.The Editor plugin will not start without a licence that grants LicenseCapability.Editor.
Enable ASP.NET sessionbuilder.Services.AddSession(); and app.UseSession(); (see Register the plugin).The token‑grant store ties a token to the ASP.NET session; without it every request is rejected with 403.
Register a distributed cache (only for a web farm)Ensure an IDistributedCache implementation is registered in the DI container before calling AddDoconutEditorPersistence.When a distributed cache is present, AddDoconutEditorPersistence replaces the default in‑memory MemoryDocumentAccessStore with DistributedDocumentAccessStore, which is required for token‑grant sharing across nodes.
Enable editor persistence (required for a farm, optional for a single node)csharp\nbuilder.Services.AddDoconutEditorPersistence(persistence =>\n{\n persistence.RootPath = @\"\\\\fileshare\\doconut\"; // shared folder\n persistence.FarmKey = Convert.FromBase64String(builder.Configuration[\"Doconut:FarmKey\"] ?? \"\");\n});\nPersists live editor sessions to a shared, encrypt‑at‑rest location so any node can rehydrate them. The same FarmKey (≥ 32 bytes) must be used on every node.
Tune editor‑related limitscsharp\nbuilder.Services.AddDoconut(options =>\n{\n // other registration (AddPlugin<EditorPlugin>(), etc.)\n options.MaxConcurrentEditorSessions = 200; // adjust to your memory budget\n options.EditorEvictionIdleMinutes = 5; // idle time before eviction\n options.EditorSnapshotEveryOps = 50; // snapshot cadence for persistence\n});\nControls how many live editing sessions can exist, when idle sessions are evicted, and how often snapshots are taken (affects undo window after a fail‑over).
Set document‑session timeoutcsharp\nvar docOptions = new Doconut.DocOptions { TimeOut = 60 }; // minutes\nDocOptions.TimeOut (default 60) is the sliding expiration for the document session and the token grant. Adjust if you need longer or shorter lifetimes.
Increase upload size if neededcsharp\nbuilder.Services.AddDoconut(options =>\n{\n options.AddEditorWidget(widget =>\n {\n widget.MaxUploadMb = 50; // default 25 MiB\n });\n});\n
If MaxUploadMb exceeds the server’s default request limit, raise it (e.g., via Kestrel’s Limits.MaxRequestBodySize).
Prevents the middleware from returning 413 before Doconut sees the request.
Keep UnsafeMode disabledDo not set DoconutOptions.UnsafeMode = true.The default (false) enforces the ASP.NET‑session security check; leaving it on protects tokens from being reused from another session.
Never log tokensDo not write the token string to logs, telemetry, or shared URLs.Tokens are the sole bearer of access to a live editing session; leaking them gives full edit rights.

Scaling and concurrency

  • Memory per session – Each live editor holds the full .docx plus its undo stack in server memory (roughly 2 × the document size).
  • Cap concurrent editors – MaxConcurrentEditorSessions limits only editing sessions (those opened with EditMode = true). Viewer sessions are never counted. Set the value to match the memory you can allocate.
  • Idle eviction – When the cap is reached, the least‑recently‑used session that has been idle for at least EditorEvictionIdleMinutes is closed automatically. Setting EditorEvictionIdleMinutes to 0 forces eviction regardless of activity (may discard a user’s work).
  • Snapshot cadence – EditorSnapshotEveryOps determines how many mutations are recorded before a full snapshot is written (when persistence is enabled). A lower value reduces replay time after a node fail‑over but adds I/O; a higher value increases the undo window but may make rehydration slower.

Web‑farm persistence

When you run behind a load balancer without sticky sessions, you must enable the editor persistence store:

  1. Shared folder – EditorPersistenceOptions.RootPath must point to a location reachable by every node (e.g., a Windows file share or NFS mount).
  2. Farm‑wide encryption key – EditorPersistenceOptions.FarmKey must be the same byte array on every node (≥ 32 bytes). Load it from a secret manager and pass it to AddDoconutEditorPersistence.
  3. Distributed token store – Register an IDistributedCache before calling AddDoconutEditorPersistence. This causes the plugin to replace the default MemoryDocumentAccessStore with DistributedDocumentAccessStore, synchronising token grants across the farm so a token issued on node A is recognised on node B.

If you run a single‑node deployment, omit the persistence registration; the default in‑memory store is sufficient and avoids any I/O.


License handling in production

  • Default location – The runtime looks for Doconut.Viewer.lic (and any plugin‑specific licences) in wwwroot.
  • Alternative sources – You can supply the licence via DoconutOptions.LicenseContent (raw XML) or LicenseStream. These take precedence over LicensePath. Use a secret store or environment variable to keep the licence out of source control.
  • Applying changes – The licence is read once at application start. After replacing a licence file you must restart the application to pick up the new licence.
  • Missing or insufficient licence – If the licence does not grant LicenseCapability.Editor, the host will fail to start (see Licensing & watermark). The startup error message is exactly the one quoted there.

Security and session considerations

  • Token binding – Tokens are bound to the ASP.NET session that opened them. Serve the site over HTTPS to protect the session cookie and the token from interception.
  • Session timeout – The ASP.NET session’s idle timeout (default 20 min) should be at least as long as DocOptions.TimeOut to avoid premature 403 responses. Adjust via the standard ASP.NET Core session options if needed.
  • Do not enable UnsafeMode – Leaving UnsafeMode at its default (false) ensures the middleware checks that the request’s ASP.NET session matches the token’s grant.
  • CORS – The widget does not support cross‑origin requests. Serve the editor page and the /doconut endpoints from the same origin, or place them behind a single reverse proxy.

Monitoring and diagnostics

  • Log unhandled exceptions – DoconutException includes a clean message chain; logging ex.ToString() is safe and provides full context.
  • Watch eviction warnings – When a session is evicted because the cap is reached, the middleware writes a warning that includes the closed token.
  • Track persistence health – If snapshots fail, the middleware throws a DoconutException. Verify that RootPath is reachable and that FarmKey is correctly configured on every node.
  • Health endpoint – The middleware’s base path (DoconutOptions.MiddlewarePath, default /doconut) returns version information when ShowDoconutInfo is true; enable it temporarily in production to confirm the service is up.

Following this checklist and tuning the options above will help you run the Doconut Editor plugin reliably in production, whether on a single server or a scaled web farm.

API reference

LicenseCapability

A capability a Doconut licence can grant. Editor, Converter, Dicom, DocumentTools, Signer, Redactor, Comparer, Forms, Protector, Compressor and Extractor are plugins you add to the viewer; Search and Annotation are built into the viewer. The viewer itself is not listed: it is the base licence every capability needs (IDoconutLicenseService.IsViewerLicensed).

text
Annotation
Comparer
Compressor
Converter
Dicom
DocumentTools
Editor
Extractor
Forms
Protector
Redactor
Search
Signer

DocOptions

Options that apply at the document-opening level, independent of format.

text
DocOptions()
bool EditMode { get; set; }
int ImageResolution { get; set; }
bool IsSecured { get; set; }
bool IsWebFarm { get; set; }
string Password { get; set; }
int TimeOut { get; set; }
string Watermark { get; set; }
string WebFarmPath { get; set; }
  • EditMode: Opt into a plugin-contributed editable viewer for this document (e.g. the Editor plugin's Word editor). Default false = normal view render, which always uses the built-in viewer for the format (so viewing quality/DPI is never affected by an installed editor plugin). Only set this on the code path that actually enters an editing UI.
  • ImageResolution: [Obsolete: Use the format-specific BaseConfig.ImageResolution property instead. This property is kept for compatibility and does not control render priority.] DPI resolution for page image rendering (25–300). Kept for compatibility; render DPI is controlled by the format-specific config.
  • IsSecured: Not read by the library and has no effect. Whether page requests for a token must come from the ASP.NET session that opened the document is controlled by DoconutOptions.UnsafeMode: false (the default) enforces it, true turns the check off.
  • IsWebFarm: Set to true when using web farm / cloud storage mode.
  • Password: Password for password-protected documents.
  • TimeOut: How many minutes the document session stays in cache (sliding expiration). Default: 60 minutes.
  • Watermark: Watermark text applied to every rendered page when the Doconut license is invalid. Format: "^TextColorFontSizeFontNameOpacityAngle" Example: "^Sample CopyRed24Verdana80-45"
  • WebFarmPath: Path on the web farm server for pre-rendered page images.

DoconutOptions

Configuration options for the Doconut middleware. Register via AddDoconut(options => ...) in Program.cs.

text
DoconutOptions()
DoconutOptions AddComparerWidget(Action<ComparerWidgetOptions> configure)
DoconutOptions AddCompressorWidget(Action<CompressorWidgetOptions> configure)
DoconutOptions AddConverterWidget(Action<ConverterWidgetOptions> configure)
DoconutOptions AddDocumentToolsWidget(Action<DocumentToolsWidgetOptions> configure)
DoconutOptions AddEditorWidget(Action<EditorWidgetOptions> configure)
DoconutOptions AddExtractorWidget(Action<ExtractorWidgetOptions> configure)
DoconutOptions AddFormsWidget(Action<FormsWidgetOptions> configure)
DoconutOptions AddPlugin<TPlugin>()
DoconutOptions AddProtectorWidget(Action<ProtectorWidgetOptions> configure)
DoconutOptions AddRedactorWidget(Action<RedactorWidgetOptions> configure)
DoconutOptions AddSignerWidget(Action<SignerWidgetOptions> configure)
DoconutOptions RegisterViewer(string extension, Func<IFormatViewer> factory, Func<BaseConfig> defaultConfig)
ComparerWidgetOptions ComparerWidget { get; }
CompressorWidgetOptions CompressorWidget { get; }
ConverterWidgetOptions ConverterWidget { get; }
DocumentToolsWidgetOptions DocumentToolsWidget { get; }
int EditorEvictionIdleMinutes { get; set; }
int EditorSnapshotEveryOps { get; set; }
EditorWidgetOptions EditorWidget { get; }
ExtractorWidgetOptions ExtractorWidget { get; }
FormsWidgetOptions FormsWidget { get; }
string LicenseContent { get; set; }
string LicensePath { get; set; }
Stream LicenseStream { get; set; }
int MaxConcurrentEditorSessions { get; set; }
string MiddlewarePath { get; set; }
DoconutPluginRegistry PluginRegistry { get; }
ProtectorWidgetOptions ProtectorWidget { get; }
RedactorWidgetOptions RedactorWidget { get; }
bool ResetLicense { get; set; }
string ResourcesPath { get; set; }
bool ShowDoconutInfo { get; set; }
SignerWidgetOptions SignerWidget { get; }
bool UnsafeMode { get; set; }
  • AddComparerWidget: Enables the opt-in Comparer widget (?compare=open|run|download).
  • AddCompressorWidget: Enables the opt-in Compressor widget (?compress=open|run|download).
  • AddConverterWidget: Enables the opt-in Converter widget (its ?convert=open|run|download endpoints and served JS). OFF by default — secure by default. Consistent Add<Plugin>Widget() convention across plugins. Requires the Converter plugin (AddPlugin<ConverterPlugin>()) and a license granting Converter.
  • AddDocumentToolsWidget: Enables the opt-in DocumentTools widget (?tools=open|run|download).
  • AddEditorWidget: Enables the opt-in Editor self-service widget — the ?edit=open self-upload endpoint that accepts a .docx and returns a live edit-session token. OFF by default (secure by default): it lets untrusted clients open live, memory-pinned editing sessions, so a host must opt in. Requires the Editor plugin (AddPlugin<EditorPlugin>()) and a license granting Editor.
  • AddExtractorWidget: Enables the opt-in Extractor widget (?extract=open|run|download).
  • AddFormsWidget: Enables the opt-in Forms widget (?forms=open|run|download).
  • AddPlugin: Registers a Doconut plugin (a viewer or a service). Returns the options, so calls can be chained.
  • AddProtectorWidget: Enables the opt-in Protector widget (?protect=open|run|download).
  • AddRedactorWidget: Enables the opt-in Redactor widget (?redact=open|run|download).
  • AddSignerWidget: Enables the opt-in Signer widget (?sign=open|run|download).
  • RegisterViewer: Registers a custom viewer for the given file extension, taking precedence over the built-in viewers. The optional supplies the config used when a document of this type is opened without an explicit config.
  • ComparerWidget: The opt-in Comparer widget options, or null when disabled (the default). Enable via AddComparerWidget. When null, the ?compare= endpoints are inert.
  • CompressorWidget: The opt-in Compressor widget options, or null when disabled (the default). Enable via AddCompressorWidget. When null, the ?compress= endpoints are inert.
  • ConverterWidget: The Converter widget config, or null when the widget is disabled (default). Enable via AddConverterWidget. When null, the ?convert= endpoints are inert.
  • DocumentToolsWidget: The opt-in DocumentTools widget options, or null when disabled (the default). Enable via AddDocumentToolsWidget. When null, the ?tools= endpoints are inert.
  • EditorEvictionIdleMinutes: When MaxConcurrentEditorSessions is reached, a new editing session closes the least recently used one only if that one has had no request for at least this many minutes. When every session is in use, the new open is refused (The editor is busy: too many documents are open. Try again in a few minutes., a 503 from the widget) instead of discarding another user's work. Default 5. 0 or less: the least recently used session is always closed, as before.
  • EditorSnapshotEveryOps: When opt-in editor persistence is enabled (AddDoconutEditorPersistence), snapshot the live document every N recorded mutations (and drop the log up to that point). Bounds both replay time on a rehydration AND how far back undo survives a failover (the "recent window" is the mutations since the last snapshot). Default 50. Set to 0 (or negative) to never mid-session snapshot (replay always runs from the original — larger window, longer replay). No effect when persistence is disabled.
  • EditorWidget: The opt-in Editor self-service widget options, or null when the widget is disabled (default). Enable via AddEditorWidget. When null, the self-upload ?edit=open endpoint is inert (returns 404). The token-bound edit channel (?geometry/?edit/?save/…) is independent of this flag and stays available to any host that opens a document with EditMode.
  • ExtractorWidget: The opt-in Extractor widget options, or null when disabled (the default). Enable via AddExtractorWidget. When null, the ?extract= endpoints are inert.
  • FormsWidget: The opt-in Forms widget options, or null when disabled (the default). Enable via AddFormsWidget. When null, the ?forms= endpoints are inert.
  • LicenseContent: Optional raw XML content of the Doconut license. Use this when the license is stored somewhere other than a file on disk (database, environment variable, secret manager). Takes precedence over LicensePath.
  • LicensePath: Optional path to the Doconut license file. The per-plugin license files in the same folder (Doconut.Viewer.<Capability>.lic) are read with it. A relative path is resolved against the current directory; a path that does not exist loads no license and does not fall back to the search below. If omitted, Doconut searches {CurrentDirectory}/wwwroot, then {AppContext.BaseDirectory}/wwwroot - and nowhere else - for Doconut.lic, then Doconut.Viewer.lic and the plugin licenses; when nothing is found the library runs in evaluation mode (watermarked).
  • LicenseStream: Optional stream containing the Doconut license. Read once at startup. Takes precedence over LicenseContent and LicensePath.
  • MaxConcurrentEditorSessions: Maximum number of concurrent LIVE editor sessions (documents opened with EditMode). When a new editor session would exceed this, the least-recently-used idle editor session is evicted (and disposed) on top of the normal sliding TTL — a self-service widget lets untrusted clients open sessions and walk away, and each editor session pins a live document + undo stacks. Only editor sessions are counted; normal viewer sessions are never counted or evicted by this cap. Default 200. Set to 0 (or negative) for no cap — TTL-only, the pre-widget behavior.
  • MiddlewarePath: URL path prefix for the Doconut page-image endpoint. Default: "/doconut".
  • PluginRegistry: Records viewer and service contributions from plugins registered via AddPlugin{TPlugin}. Consumed by the viewer factory during request dispatch.
  • ProtectorWidget: The opt-in Protector widget options, or null when disabled (the default). Enable via AddProtectorWidget. When null, the ?protect= endpoints are inert.
  • RedactorWidget: The opt-in Redactor widget options, or null when disabled (the default). Enable via AddRedactorWidget. When null, the ?redact= endpoints are inert.
  • ResetLicense: Kept for compatibility; not read. The license is loaded once, when AddDoconut() builds the services: after replacing a license file, restart the application.
  • ResourcesPath: URL path prefix for embedded JS/CSS/image resources. Default: "/doconut-res".
  • ShowDoconutInfo: When true, the middleware writes version information when hit without a token. Default: false.
  • SignerWidget: The opt-in Signer widget options, or null when disabled (the default). Enable via AddSignerWidget. When null, the ?sign= endpoints are inert.
  • UnsafeMode: When true, the middleware skips the ASP.NET Session security check. Leave false in production (default).

DocumentEditor

Server-side access to an editor session: open a Word document for editing, and get the edited document back so the host can store it wherever it keeps its documents. The browser works with the same session through its token.

text
void Close(string token)
Task<byte[]> ExportAsync(string token, string format, CancellationToken ct)
Task<string> OpenForEditAsync(Stream document, string fileName, DocOptions options, CancellationToken ct)
Task<string> OpenForEditAsync(string filePath, DocOptions options, CancellationToken ct)
  • Close: Closes the editor session and frees what it holds. Unsaved changes are lost.
  • ExportAsync: The edited document, as docx or pdf, in the state the session has now.
  • OpenForEditAsync: Opens a document from a stream for editing and returns its session token. The file name gives the format.
  • OpenForEditAsync: Opens the document at for editing and returns its session token.

EditorPersistenceOptions

Options for AddDoconutEditorPersistence. When registered, live editor sessions are persisted to a shared FileShare directory (encrypt-at-rest, token-bound) so any farm node can rehydrate them without session affinity. Omit for single-node deployments (the default disabled store, zero I/O). The snapshot cadence is set separately via EditorSnapshotEveryOps in AddDoconut.

text
EditorPersistenceOptions()
byte[] FarmKey { get; set; }
string RootPath { get; set; }
TimeSpan Ttl { get; set; }
  • FarmKey: Farm shared key (>= 32 bytes) — MUST be identical on every node. Encryption/MAC subkeys are derived from it.
  • RootPath: Shared FileShare root. Editor state lives under {RootPath}/editor/{token}.
  • Ttl: Persisted editor state older than this is treated as expired (lazy, checked on read). Default 1 hour.

EditorWidgetOptions

Options for the opt-in Editor self-service widget (see AddEditorWidget).

text
EditorWidgetOptions()
int DemoMaxPages { get; set; }
int MaxUploadMb { get; set; }
  • DemoMaxPages: Demo / limited mode: cap a self-service (?edit=open) session to its first N pages for a public showcase, so the widget demonstrates editing without exposing the whole document. The session's metadata, page-image, and geometry requests are clamped to this many pages (editing on the visible page still works; render output is watermarked under a demo/temporary license). Default 0 = off (no page cap). Only affects sessions opened through the self-service endpoint.
  • MaxUploadMb: Maximum upload size in megabytes. Default 25.

EditorPlugin

The Doconut Editor plugin: contributes the editable .docx viewer, gated by the Editor capability.

text
EditorPlugin()
void Register(IDoconutPluginBuilder builder)
string Name { get; }
LicenseCapability RequiredCapability { get; }

DoconutExtensions

text
IServiceCollection AddDoconutEditorPersistence(IServiceCollection services, Action<EditorPersistenceOptions> configure)
  • AddDoconutEditorPersistence: Enables opt-in EDITOR persistence: live editor sessions are persisted to a shared, encrypt-at-rest, token-bound FileShare directory so any farm node can rehydrate them (op-log + snapshot-window). Overrides the default disabled store. Single-node deployments omit this. Call AFTER AddDoconut(...) — this registration wins by last-registration. The snapshot cadence is set via EditorSnapshotEveryOps in AddDoconut.

DoconutPluginRegistry

text
bool TryGetEditableViewer(string extension, ref LicenseCapability requiredCapability, ref Func<IFormatViewer> factory)
  • TryGetEditableViewer: Looks up an editable viewer contribution by file extension (case-insensitive; leading dot optional). Same contract as TryGetViewer but over the separate editable-viewer channel.

Viewer

text
bool IsEditorEnabled { get; }
  • IsEditorEnabled: true when the active licence grants the Editor plugin; false when it does not, or when no licence service is available.

Troubleshooting

Common symptoms and fixes

What you seeCauseFix
Startup: AddEditorWidget() was called but the Editor plugin is not registered. Add options.AddPlugin<Doconut.Plugins.Editor.EditorPlugin>() (the widget needs it), or remove the AddEditorWidget() call.The widget is enabled without its plugin.csharp\nbuilder.Services.AddDoconut(options =>\n{\n options.AddPlugin<Doconut.Plugins.Editor.EditorPlugin>();\n // …other options\n});\n
Startup: The Editor plugin is registered via AddPlugin but no active license grants Editor. …No licence, a legacy TRIAL file, or missing Doconut.Viewer.Editor.lic.Place the licence files (Doconut.Viewer.lic and Doconut.Viewer.Editor.lic) in the wwwroot folder. See the Licensing & watermark section.
The page shows nothing; the console says Doconut is not definedUseDoconutResources() is missing, or a script tag is not type="module".csharp\napp.UseDoconutResources(); // before app.Map()\n
Alert: Upload failed (404).AddEditorWidget is missing, or the request does not reach UseDoconut().Ensure options.AddEditorWidget(...) is called (see Register the plugin) and that the middleware is mounted at the correct base path.
Alert: Editing is not available: this server is not licensed for the Editor.The licence no longer grants the Editor capability (e.g., a temporary licence expired).Install or renew a licence that includes LicenseCapability.Editor.
Alert: Upload failed (413).The file exceeds the server’s request‑body limit.Increase the request‑body limit in the host (e.g., KestrelServerOptions.Limits.MaxRequestBodySize).
Alert: File is too large.The uploaded file exceeds EditorWidgetOptions.MaxUploadMb.Raise the limit: csharp\nbuilder.Services.AddDoconut(options =>\n{\n options.AddEditorWidget(widget =>\n {\n widget.MaxUploadMb = 50; // or any value you need\n });\n});\n
Alert: The editor can only open .docx files.A non‑.docx file was uploaded to the editor widget.Convert the file to .docx before uploading.
Alert: The editor is not available for this document.The file could not be opened as an editable viewer.Verify that AddPlugin<Doconut.Plugins.Editor.EditorPlugin>() is registered and that the document is a supported editable format (.docx).
Alert: This document is password protected.The widget does not accept a password.Open the document from server code using DocumentEditor and set DocOptions.Password.
Alert: another message such as The server could not complete this request. Please try again.The document is damaged or the server threw an unexpected exception.Inspect the host logs; the exception details (including any DoconutException) are logged there.
Inside the editor, right after the upload: open failed: 500UseSession() is missing, so document security returns ASP.NET Session is required for Doconut document security.csharp\nbuilder.Services.AddDistributedMemoryCache();\nbuilder.Services.AddSession();\napp.UseSession(); // before app.Map()\n
Session Expired – Your editing session has ended. Please reopen the document to continue.Session closed (404): 60 min idle, eviction due to MaxConcurrentEditorSessions, or a node without persistence handled the request.Re‑open the document. On a web farm, enable editor persistence (AddDoconutEditorPersistence) so any node can rehydrate the session.
Alert at upload: The editor is busy: too many documents are open. Try again in a few minutes.All slots under DoconutOptions.MaxConcurrentEditorSessions are in use (503).Wait and retry, or increase MaxConcurrentEditorSessions if memory permits.
Session Expired – Access to this document has ended. Open it again to keep editing.Document security refused the token (403): token lifetime (DocOptions.TimeOut) elapsed, ASP.NET session timed out, or request hit a node that does not share the token‑grant store.Re‑open the document. On a farm, ensure the IDocumentAccessStore is shared (e.g., DistributedDocumentAccessStore) or enable session affinity.
Inside the editor: The license no longer covers editing.A temporary licence expired while the document was open.Renew the licence.
Inside the editor: a reason such as A table can have at most 1000 rows and 63 columns.The editor rejected the edit (422).Follow the message; the edit is not applied.
Inside the editor: edit failed: 413The edit payload exceeds 8 000 000 characters (usually a large image).Reduce the image size before inserting.
Inside the editor: edit failed or Save failed: save failed: 500The server threw an exception while processing the request.Check the host log for Doconut editor request {Path} failed.
Inside the editor: Copy failed — the browser blocked clipboard access. or Paste blocked — allow clipboard access, or press Ctrl+V.Browser security blocked clipboard operations.Grant clipboard permission in the browser or use the keyboard shortcuts.
Every page shows Purchase at Doconut.com; saved files show TRIALA temporary licence is in effect.Install a paid licence that includes the Editor capability (Doconut.Viewer.Editor.lic).
The edited document is not on the serverSave in the widget only downloads to the browser.Use server‑side autosave or call DocumentEditor.ExportAsync (see Use from C#).

Was this page helpful?