Syncfusion ASP.NET Core – Legal Case File Compilation Demo

Sample date Updated on May 27, 2026
dotnet encryption merge-documents word-library word-to-pdf

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.


Project Structure

+-- 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

Getting Started

Prerequisites

  • .NET 7.0 SDK or later
  • Visual Studio 2022 or VS Code
  • A valid Syncfusion License Key (or use the free Community License)

1. Clone the Repository

git clone https://github.com/SyncfusionExamples/DocIO-Case-File-Compilation
cd Case-File-Compilation

2. Install Dependencies

Restore all NuGet packages:

dotnet restore

3. Add Syncfusion License Key

In your Program.cs, register your Syncfusion license:

Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("YOUR_LICENSE_KEY");

4. Run the Application

dotnet run

Open your browser and navigate to:

https://localhost:5001

How to Use

Basic Workflow

  1. 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
  2. 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
  3. 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
  4. 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)
  5. Generate Case File

    • Click "Generate Case File" button
    • Download automatically starts
    • File name format: CompiledCaseFile_YYYYMMDD_HHMMSS.docx/pdf

Use Cases

  • 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

Resources


Try It Out

Clone the repository, run the sample, and discover how Syncfusion DocIO can revolutionize legal document workflows in your practice.

Customization

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.


Security Highlights

  • 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.


Support

For technical support and questions:


Up arrow