Docx2OC 16.1.0

dotnet tool install --global Docx2OC --version 16.1.0
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local Docx2OC --version 16.1.0
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Docx2OC&version=16.1.0
                    
nuke :add-package Docx2OC --version 16.1.0
                    

docx2oc

A command-line tool to export Word documents (.docx) to the OpenContracts format.

Installation

dotnet tool install --global Docx2OC

Build from Source

cd tools/docx2oc
dotnet build

Usage

# Export with default output filename (input.oc)
docx2oc contract.docx

# Export with custom output filename
docx2oc contract.docx export.json

Output Format

The output is a JSON file in the OpenContracts format, containing:

  • title: Document title from core properties
  • content: Complete extracted text (body, headers, footers, footnotes, endnotes)
  • description: Document description/subject if available
  • pageCount: Estimated page count
  • pawlsFileContent: PAWLS-format page layout with token positions
  • labelledText: Structural annotations (SECTION, PARAGRAPH, TABLE)
  • relationships: Hierarchical relationships between annotations

Example Output

{
  "title": "Sample Contract",
  "content": "This is the document content...",
  "pageCount": 5,
  "pawlsFileContent": [
    {
      "page": { "width": 612, "height": 792, "index": 0 },
      "tokens": [
        { "x": 72, "y": 72, "width": 30, "height": 12, "text": "This" }
      ]
    }
  ],
  "labelledText": [
    {
      "id": "section-0",
      "annotationLabel": "SECTION",
      "structural": true
    }
  ]
}

OpenContracts Compatibility

This tool produces output compatible with the OpenContracts document analysis platform. The format includes:

  • Complete text extraction from all document parts
  • PAWLS-compatible token positions for NLP/ML pipelines
  • Structural annotations for document understanding

Environment Variables

  • DOCX2OC_DEBUG=1: Show detailed error information including stack traces
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
16.1.0 0 11/16/2026
16.0.0 54 11/13/2026
15.1.0 101 11/5/2026
15.0.0 110 11/1/2026
14.3.0 105 10/29/2026
14.2.0 107 10/26/2026
14.1.0 111 10/21/2026
14.0.0 106 10/19/2026
13.0.0 89 10/12/2026
12.6.5 122 9/29/2026
12.6.4 103 9/28/2026
12.6.3 114 9/27/2026
12.6.2 120 9/16/2026
12.6.1 111 9/16/2026
12.6.0 117 9/15/2026
12.5.0 109 9/12/2026
12.4.1 116 9/11/2026
12.4.0 157 9/8/2026
12.3.0 148 9/8/2026
12.2.0 148 9/7/2026
Loading failed