What SumDoc can do with a document
A capability map of the document side by task: text and tables, formatting and headers/footers, fields and tables of contents, review, mail merge, printing, and protection — with the calls that do it.
Comparing editors by the number of buttons is pointless, and “we support DOCX” promises nothing. Below is a map by the tasks a document is opened for in the first place: what SumDoc does and, for developers, with which call. The list is taken from the processor itself, not from plans: the --help text lists 105 one-shot commands, and together with the 41 session commands that’s what the processor says about itself.
If all you need is a “can it or not” answer, read the first column of the tables. The second column is for whoever will be wiring it up.
Formats and calls
Section titled “Formats and calls”Which formats open and save, and what gets lost along the way, is stated on the overview page — which files it works with. Here are the calls that do it. DOCX is opened, edited, and saved by a session (mutate, save); the other formats are served by one-shot calls.
| Format | How it’s done |
|---|---|
| DOCM — DOCX with macros | The same session as DOCX; save-docx-as refuses to downgrade .docm to .docx. Macros: inspect-vba, list-vba, run-vba |
| DOC — Word 97–2003 | import-doc; the --preflight flag lists in advance what will be lost and writes nothing |
export-pdf, export-pdf-embedded |
|
| ODT | import-odt, export-odt; an editable copy — create-editable-odt-copy, mutate-editable-odt-copy |
| RTF | import-rtf, export-rtf |
| HTML | import-html, export-html |
| Plain text | import-txt, export-txt |
| EPUB | import-epub, export-epub |
| FB2 | import-fb2, export-fb2 |
| XODT — flat ODT | import-xodt, export-xodt |
| A whole file or a folder | convert-doc; convert-doc-batch with the extension specified and, when needed, walking nested folders |
| Viewing without an editor: DOCX to a single HTML file | render |
| Archival PDF/A-1b | preflight-pdfa-1b checks readiness and honestly reports that export is still closed; validate-pdfa-1b runs the check through an external program that you specify yourself |
While the document is open
Section titled “While the document is open”A session does this: you open the file, work, save. For developers, the details are in request and response objects.
| Task | How it’s done |
|---|---|
| Text editing: insertion, deletion, line breaks, merging paragraphs | mutate with the edit kind |
| Selection and its position | set-selection |
| Undo and redo | undo, redo |
| The document’s semantic model, layout, pages | model, compose, paginate |
| Comments, tracked changes, styles | the review and style projections |
| Trial edit: apply on a copy of the session, show the person “before → after”, then apply by number | propose, commit-proposal |
| Macros of the open document: inspect, draw up a run plan, execute on a snapshot and show the difference, record the trust decision, commit the edits | vba-inspect, vba-plan, vba-preview, vba-trust, vba-commit, vba-document-event |
| Save and checkpoint | save, save-checkpoint |
| A snapshot to a separate file without clearing the unsaved flag | snapshot-checkpoint |
Document formatting
Section titled “Document formatting”| Task | How it’s done |
|---|---|
| Headers and footers: create, link to the previous section, unlink, edit, remove | header-footer-action-docx |
| Sections: page orientation, margins, paper size | section-page-setup-action-docx |
| A watermark with a choice of text, font, and size, plus other formatting | design-tools-docx |
| Tables: copying and pasting cell content, working with a range of rows and columns | table-docx |
| Lists and checking them | lists-proof-docx |
| Images, shapes, and text boxes: inserting, replacing an image, editing text inside a shape, size, style, and alignment | nine calls, including insert-image-object, insert-shape-object, replace-image-media, resize-drawing-object, distribute-drawing-objects |
Fields, tables of contents, indexes
Section titled “Fields, tables of contents, indexes”| Task | How it’s done |
|---|---|
| Table of contents: update or remove | update-toc-docx, remove-toc-docx |
| List of figures by caption | update-table-of-figures-docx |
| Bibliography and citation style | apply-bibliography-command-docx, set-bibliography-style-docx |
| Index and table of authorities | apply-index-authorities-command-docx |
| Fields: hyperlinks, codes and results, locking | field-tools-docx |
Collaborative work on a contract
Section titled “Collaborative work on a contract”There are two kinds of work here. Sequential: compare versions, merge edits, discuss in comments, accept or reject tracked changes. And simultaneous — in the browser, several people can edit a document at once: other people’s input is visible as they type, with the author’s name and color, each person has their own undo, and the one who opened the document first writes to the file (how it works). For developers: on the session side these are four commands for the collaborative editing manager — apply-concurrent-text-transaction, note-operation-order, note-operation-baseline, note-tracked-revision-range; your own wrapper doesn’t need them.
| Task | How it’s done |
|---|---|
| Compare two versions and get a document with tracked changes | review-compare-combine-docx --mode compare |
| Merge edits from several reviewers | review-compare-combine-docx --mode combine |
| Comments: add, reply, resolve; accept or reject an edit | review-docx with --insert-comment, --reply-comment, --resolve-comment, --accept-change, --reject-change |
| Tracked-changes recording state | track-revisions-state |
| Spell check | proofing-docx |
| Mail merge from a CSV recipient list | mail-merge-business-docx |
Printing and output
Section titled “Printing and output”| Task | How it’s done |
|---|---|
| Printing with a choice of pages, odd or even, order, and how tracked changes are shown | print-docx |
| Checking the print set and device profiles | validate-print-bundle, validate-print-devices |
| Exporting to PDF, including with embedded fonts | export-pdf, export-pdf-embedded |
| Viewing without an editor: DOCX to a single self-contained HTML file | render |
| The other formats — DOCM, ODT, RTF, HTML, plain text, EPUB, FB2, plus partial import of DOC (Word 97–2003) | what you can do with which file |
File security
Section titled “File security”| Task | How it’s done |
|---|---|
Inspect a macro project without running it: inspect-vba says whether there’s a project and shows the printable strings from it; list-vba parses the project for real — modules, procedures, and the source text when needed |
inspect-vba, list-vba |
Run a macro behind a guard: every entry point requires explicit permission (--allow), without it there’s a refusal, and that’s the default state; external objects are allowed by name (--grant); the user’s file isn’t overwritten, changed paragraphs go to a copy (--out) — and only if the paragraph count matched; the moment of the run and the answers to dialogs are set in advance (--now, --answer). open-vba raises a document event the same way — open, new, close |
run-vba, open-vba |
| Find out what protects the document | inspect-protection |
| Check readiness for archival PDF/A-1b | preflight-pdfa-1b |
What is preserved as is
Section titled “What is preserved as is”The parts of the file that the editor doesn’t parse are carried over to the saved file unchanged; what it does parse is saved by the rules of the format. Verified on real documents:
- content controls of every kind — text, checkbox, drop-down list, combo box, date, picture, repeating section — and protected forms: the allowed ranges are respected, a wrong password puts the document into read-only mode;
inspect-protectionshows what the file is protected with; - right-to-left writing;
- embedded OLE objects — preserved whole and never executed;
- footnotes and endnotes;
- document properties and settings;
- embedded HTML fragments (
altChunk) — as an opaque block, without conversion.
Where the boundaries stand is in Readiness and boundaries.
For developers: a full description of every session call with its parameters is in the reference; further on the document side — how to get the document structure, hit testing by coordinate, and integration recipes. What changed from version to version — version history. For spreadsheets, the same thing is collected in the capability map next to Excel.