This repository contains a complete showcase sample demonstrating how to build an Automated Legal Case File Compilation System using Syncfusion DocIO and Syncfusion PDF libraries in an ASP.NET Core MVC application. The sample illustrates how legal professionals can streamline case preparation by merging multiple legal documents into a single, professionally formatted case file with automatic table of contents, bookmarks, and security features.
├── Controllers/
│ └── HomeController.cs
├── Models/
│ └── ErrorViewModel.cs
├── Views/
│ ├── Home/
│ │ ├── Index.cshtml
│ │ └── Privacy.cshtml
│ └── Shared/
├── wwwroot/
│ └── Data/
│ ├── Contract.docx
│ ├── Demand_Letter.docx
│ ├── Complaint.docx
│ └── Motion_for_Summary_Judgment.docx
└── README.md
- .NET 7.0 SDK or later
- Visual Studio 2022 or VS Code
- A valid Syncfusion License Key (or use the free Community License)
git clone https://github.com/SyncfusionExamples/DocIO-Case-File-Compilation
cd Case-File-CompilationRestore all NuGet packages:
dotnet restoreIn your Program.cs, register your Syncfusion license:
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("YOUR_LICENSE_KEY");dotnet runOpen your browser and navigate to:
https://localhost:5001
-
Select Destination Document (Optional)
- Upload an existing case file(.docx, .doc, .rtf, .html, .md, .txt) to merge documents into
- Or leave empty to create a new compiled document automatically
- Drag & drop supported
-
Choose Source Documents
- Option A: Default Files – Use pre-loaded case files (Contract, Demand Letter, Complaint, Motion)
- Option B: Custom Upload – Upload your own documents (single or multiple)
- Reorder documents using ▲ ▼ arrow buttons
-
Configure Merge Settings
- Select import formatting behavior from dropdown (6 options)
- Enable Table of Contents (optional)
- Set lower and upper heading levels (e.g., 1-3 includes Heading 1, 2, and 3)
- Enable Bookmarks to add navigation markers for each document
-
Choose Output Format
- Word (.docx) – Select for editable documents
- Enable security: Encryption OR Protection
- Enter password if security enabled
- PDF (.pdf) – Select for final distribution
- Enable security: User/Owner passwords
- Configure permissions (print, copy, edit)
- Word (.docx) – Select for editable documents
-
Generate Case File
- Click "Generate Case File" button
- Download automatically starts
- File name format:
CompiledCaseFile_YYYYMMDD_HHMMSS.docx/pdf
- Case File Compilation – Merge contracts, correspondence, pleadings, and evidence into comprehensive case files
- Discovery Document Bundles – Compile discovery documents with automatic indexing and bookmarks
- Court Filing Preparation – Create formatted submissions with TOC for court filings
- Due Diligence Reports – Compile transaction documents with table of contents
- Contract Management – Merge master agreements with amendments and exhibits
- Syncfusion DocIO Getting Started
- Importing Word Documents
- Table of Contents
- Bookmarks
- Word Document Security
- Word to PDF Conversion
- PDF Security
Clone the repository, run the sample, and discover how Syncfusion DocIO can revolutionize legal document workflows in your practice.
This sample application is provided as a reference implementation and can be freely customized to suit your specific legal practice requirements.
You can modify the document templates, merge logic, security settings, and output formats based on your use case. If you have any questions, need clarification, or require assistance while customizing this sample, please feel free to contact our Syncfusion Support Team for guidance.
- Password protection for Word and PDF outputs
- Configurable permissions (print, copy, edit)
- In-memory processing (no server-side storage)
- Suitable for handling sensitive legal documents
This is a commercial product and requires a paid license for possession or use. Syncfusion® licensed software, including this component, is subject to the terms and conditions of Syncfusion®. To acquire a license, visit https://www.syncfusion.com/account/downloads.
Are you already a Syncfusion user? You can download the product setup here. If you're not yet a Syncfusion user, you can download a 30-day free trial.
For technical support and questions: