Docorix.Reporting 1.0.0

dotnet add package Docorix.Reporting --version 1.0.0
                    
NuGet\Install-Package Docorix.Reporting -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Docorix.Reporting" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Docorix.Reporting" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Docorix.Reporting" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Docorix.Reporting --version 1.0.0
                    
#r "nuget: Docorix.Reporting, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Docorix.Reporting@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Docorix.Reporting&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Docorix.Reporting&version=1.0.0
                    
Install as a Cake Tool

<div align="center">

⚡ Docorix — Enterprise Document Aggregator

The Unified Document Engine for .NET Applications

NuGet Package .NET Target License


<p align="center"> <b>Generate</b> • <b>Convert</b> • <b>PDF Operations</b> • <b>Excel & Word</b> • <b>Digital Signatures ⭐</b> • <b>OCR Intelligence</b> • <b>Barcodes & QR</b> • <b>AI Document RAG</b> </p>

</div>


🚀 What is Docorix?

Docorix is an enterprise-grade document aggregation and processing library designed for modern .NET 8.0 and .NET 10.0 applications. Just as payment aggregators (like Stripe or PayPal) abstract multiple payment gateways behind a single API, or storage aggregators abstract cloud providers behind a unified storage interface, Docorix abstracts all document generation, multi-format conversion, PDF manipulation, barcode & QR code generation, OCR data extraction, digital signing, and AI document intelligence behind a clean, single-entry-point API.

In enterprise software architecture, managing documents often leads to severe dependency bloat — requiring separate, disconnected packages for rendering PDFs, exporting Excel spreadsheets, creating Word contracts, rendering vector barcodes, parsing OCR scanned invoices, and applying PKCS12 digital signatures. Docorix solves this by consolidating all document capabilities into a single, all-in-one C# aggregator library (Docorix).

🌟 Key Architectural Pillars

  • Unified Single Entry Point (docorix.GenerateAsync): Generate any document format (PDF, Word, Excel, CSV, HTML, XML) using a single, unified call. Docorix automatically auto-detects whether the input is a file path on disk, raw template content string, or file stream.
  • Bring-Your-Own-Template Engine: Supports templates in .xml, .html, .liquid, .cshtml, .tpl, .docx, .xlsx, and .csv with full support for dynamic multi-row table loops ({% for item in Items %} / @foreach) and conditionals ({% if %}).
  • Enterprise Security & PKCS12 Digital Signing ⭐: Sign PDF documents using PFX digital certificates, visual signature stamps, password encryption, permission restrictions, and signature verification.
  • Intelligent OCR & AI RAG Integration: Extract strongly-typed JSON domain objects from scanned invoices, identity cards (Passports, PAN, Licenses), and candidate resumes. Run AI models for PDF summarization, context Q&A (RAG), translation, and classification.

📦 Single Package Installation

Install the single, all-in-one Docorix package:

dotnet add package Docorix

⚡ Dependency Injection Setup

Register Docorix in Program.cs:

using Docorix.Core.Extensions;

var builder = WebApplication.CreateBuilder(args);

// Register Docorix Aggregator Services
builder.Services.AddDocorix();

var app = builder.Build();

🧭 Quick Navigation

Module Description Quick Link
🚀 Central API Unified docorix.GenerateAsync(...) entry point #1-central-unified-aggregator-idocorix
📄 Document Generator PDF, Word, Excel, CSV, HTML generation #2-document-generator-docorixgenerator
🔄 Converter Convert streams between Word, PDF, HTML, Excel #3-document-converter-docorixconverter
📑 PDF Operations Merge, Split, Watermark, Password Protect, Forms #4-pdf-operations-service-docorixpdf
📊 Excel Engine Spreadsheet creation, Templates, Formulas, Pivots #5-excel-service-docorixexcel
📝 Word Engine Document creation, Token replacement, Text extract #6-word-service-docorixword
🖼️ Image Processing Resize, Crop, Compress, Format convert, AI BG Remove #7-image-processing-service-docoriximage
🔍 OCR & Data Extraction OCR text & typed models from Passports, Invoices, Resumes #8-ocr--data-extraction-docorixocr
🏷️ Barcodes 1D/2D Barcodes (Code128, EAN13, PDF417, DataMatrix) #9-barcode-service-docorixbarcode
📱 QR Presets UPI Payment, WiFi, e-Invoice, TOTP Auth QR Codes #10-qr-code-service-docorixqrcode
🔏 Digital Signature ⭐ PKCS12 / PFX Certificate signing & verification #11-digital-signature-service--docorixsignature
📈 Reports Executive Sales, Inventory, and Financial reports #12-enterprise-report-service-docorixreport
🤖 AI Document RAG PDF Summarization, Q&A, Translation, Classification #13-ai-document-intelligence-docorixai
🔍 Document Comparer Highlight visual/structural diffs between documents #14-document-comparer-docorixcomparer
🌐 ASP.NET Core Controller ActionResult & Web API extensions #15-aspnet-core-integration-docorixaspnetcore

🎨 Multi-Format Template Matrix

Users supply custom templates in any format. Docorix automatically handles multi-row table loops ({% for %} / @foreach) and conditionals ({% if %}):

Template Extension Supported Target Formats Dynamic Table Loops Conditionals
.xml PDF, XML, HTML, Word, Excel {% for item in Items %} {% if Tax > 0 %}
.html PDF, HTML, Word, Image, Excel {% for %} / @foreach {% if %} / @if
.liquid / .tpl PDF, HTML, Word, Image, Excel, XML {% for item in Items %} {% if %}
.cshtml PDF, HTML, Word, Excel @foreach (var item in Model.Items) @if
.docx PDF, Word, HTML ✅ Row Cloning ✅ Yes
.xlsx / .csv Excel, CSV, PDF ✅ Row Cloning ✅ Yes

📖 Complete Method Reference & Code Examples

Below is the exhaustive API documentation for EVERY SINGLE METHOD in Docorix.


1. Central Unified Aggregator (IDocorix)

Single top-level entry point with automatic input detection (file path, raw string, stream) and multi-format parsing.

<details open> <summary><b>View Central Entry Point Methods</b></summary>

docorix.GenerateAsync(templateContentOrPath, model, outputFormat)

Generates a document from a custom template file path on disk or raw template content string.

// Example A: User passes XML template file path with dynamic table loop
using DocumentResult pdf1 = await docorix.GenerateAsync("templates/invoice.xml", invoiceModel, DocumentType.Pdf);

// Example B: User passes raw Liquid/HTML template string
string rawTemplate = "<h1>Invoice #{{InvoiceNumber}}</h1>{% for item in Items %}<p>{{item.Name}}</p>{% endfor %}";
using DocumentResult pdf2 = await docorix.GenerateAsync(rawTemplate, invoiceModel, DocumentType.Pdf);
docorix.GenerateAsync(templateStream, model, outputFormat)

Generates a document directly from a template Stream.

using Stream templateStream = File.OpenRead("templates/contract.html");
using DocumentResult pdf = await docorix.GenerateAsync(templateStream, contractModel, DocumentType.Pdf);

</details>


2. Document Generator (docorix.Generator)

Format-specific shortcuts for PDF, Word, Excel, CSV, and HTML generation.

<details> <summary><b>View Generator Methods</b></summary>

docorix.Generator.GeneratePdfAsync(templateContentOrPath, model)
using DocumentResult pdf = await docorix.Generator.GeneratePdfAsync("templates/invoice.xml", invoiceModel);
docorix.Generator.GeneratePdfAsync(templateStream, model)
using DocumentResult pdf = await docorix.Generator.GeneratePdfAsync(templateStream, invoiceModel);
docorix.Generator.GenerateWordAsync(templateContentOrPath, model)
using DocumentResult docx = await docorix.Generator.GenerateWordAsync("templates/contract.html", contractModel);
docorix.Generator.GenerateWordAsync(templateStream, model)
using DocumentResult docx = await docorix.Generator.GenerateWordAsync(templateStream, contractModel);
docorix.Generator.GenerateHtmlAsync(templateContentOrPath, model)
using DocumentResult html = await docorix.Generator.GenerateHtmlAsync("templates/invoice.html", invoiceModel);
docorix.Generator.GenerateHtmlAsync(templateStream, model)
using DocumentResult html = await docorix.Generator.GenerateHtmlAsync(templateStream, invoiceModel);
docorix.Generator.GenerateExcelAsync(templateContentOrPath, model, sheetName)
using DocumentResult excel = await docorix.Generator.GenerateExcelAsync("templates/report_template.xlsx", reportModel, "Q1 Sales");
docorix.Generator.GenerateExcelAsync<T>(data, sheetName)
var salesList = new List<SalesModel> { new SalesModel { Region = "North", Amount = 15000m } };
using DocumentResult excel = await docorix.Generator.GenerateExcelAsync(salesList, "Sales Sheet");
docorix.Generator.GenerateCsvAsync<T>(data)
using DocumentResult csv = await docorix.Generator.GenerateCsvAsync(salesList);
await csv.SaveToFileAsync("Export.csv");

</details>


3. Document Converter (docorix.Converter)

<details> <summary><b>View Converter Methods</b></summary>

docorix.Converter.ConvertAsync(inputStream, sourceType, targetType)
using Stream wordStream = File.OpenRead("Contract.docx");
using DocumentResult pdfResult = await docorix.Converter.ConvertAsync(wordStream, DocumentType.Word, DocumentType.Pdf);
docorix.Converter.ConvertAsync(inputBytes, sourceType, targetType)
byte[] docxBytes = File.ReadAllBytes("Contract.docx");
using DocumentResult pdfResult = await docorix.Converter.ConvertAsync(docxBytes, DocumentType.Word, DocumentType.Pdf);

</details>


4. PDF Operations Service (docorix.Pdf)

<details> <summary><b>View PDF Operations Methods (15 Methods)</b></summary>

docorix.Pdf.MergeAsync(pdfStreams)
using DocumentResult mergedPdf = await docorix.Pdf.MergeAsync(new[] { pdf1Stream, pdf2Stream });
docorix.Pdf.SplitAsync(pdfStream, options)
IList<DocumentResult> parts = await docorix.Pdf.SplitAsync(pdfStream, new SplitOptions { PagesPerSplit = 10 });
docorix.Pdf.RotateAsync(pdfStream, angleDegrees, pageRange)
using DocumentResult rotated = await docorix.Pdf.RotateAsync(pdfStream, 90, PageRange.Range(1, 5));
docorix.Pdf.ExtractPagesAsync(pdfStream, pageRange)
using DocumentResult extracted = await docorix.Pdf.ExtractPagesAsync(pdfStream, PageRange.Pages(1, 3, 7));
docorix.Pdf.DeletePagesAsync(pdfStream, pageRange)
using DocumentResult deleted = await docorix.Pdf.DeletePagesAsync(pdfStream, PageRange.Single(2));
docorix.Pdf.ReorderPagesAsync(pdfStream, newPageOrder)
using DocumentResult reordered = await docorix.Pdf.ReorderPagesAsync(pdfStream, new[] { 3, 1, 2 });
docorix.Pdf.CompressAsync(pdfStream, compressionLevel)
using DocumentResult compressed = await docorix.Pdf.CompressAsync(pdfStream, DocumentCompressionLevel.Maximum);
docorix.Pdf.WatermarkAsync(pdfStream, options)
using DocumentResult watermarked = await docorix.Pdf.WatermarkAsync(pdfStream, new WatermarkOptions { Text = "CONFIDENTIAL" });
docorix.Pdf.ProtectAsync(pdfStream, userPassword, ownerPassword, permissions)
using DocumentResult protectedPdf = await docorix.Pdf.ProtectAsync(pdfStream, "UserPass123", "AdminPass123", PdfPermissions.Print);
docorix.Pdf.UnlockAsync(pdfStream, password)
using DocumentResult unlocked = await docorix.Pdf.UnlockAsync(protectedPdf.Stream, "UserPass123");
docorix.Pdf.RepairAsync(pdfStream)
using DocumentResult repaired = await docorix.Pdf.RepairAsync(corruptedPdfStream);
docorix.Pdf.FillFormAsync(pdfFormStream, fieldValues)
var fields = new Dictionary<string, string> { { "CustomerName", "Jane Doe" } };
using DocumentResult filled = await docorix.Pdf.FillFormAsync(pdfFormStream, fields);
docorix.Pdf.ReadMetadataAsync(pdfStream)
DocumentMetadata meta = await docorix.Pdf.ReadMetadataAsync(pdfStream);
docorix.Pdf.UpdateMetadataAsync(pdfStream, metadata)
meta.Title = "Updated Title";
using DocumentResult updated = await docorix.Pdf.UpdateMetadataAsync(pdfStream, meta);
docorix.Pdf.GenerateThumbnailAsync(pdfStream, pageNumber, width, height)
using DocumentResult preview = await docorix.Pdf.GenerateThumbnailAsync(pdfStream, 1, 300, 400);

</details>


5. Excel Service (docorix.Excel)

<details> <summary><b>View Excel Service Methods</b></summary>

docorix.Excel.CreateSpreadsheetAsync<T>(data, sheetName)
using DocumentResult excel = await docorix.Excel.CreateSpreadsheetAsync(salesList, "Sales");
docorix.Excel.GenerateExcelFromTemplateAsync(templateContentOrPath, model, sheetName)
using DocumentResult excel = await docorix.Excel.GenerateExcelFromTemplateAsync("templates/template.xlsx", reportModel);
docorix.Excel.GenerateExcelFromTemplateAsync(templateStream, model, sheetName)
using DocumentResult excel = await docorix.Excel.GenerateExcelFromTemplateAsync(templateStream, reportModel);
docorix.Excel.ReadSpreadsheetAsync<T>(excelStream, sheetName)
IEnumerable<SalesModel> rows = await docorix.Excel.ReadSpreadsheetAsync<SalesModel>(excelStream);
docorix.Excel.ApplyFormulasAndFormattingAsync(excelStream, cellFormulas)
var formulas = new Dictionary<string, string> { { "D10", "=SUM(D2:D9)" } };
using DocumentResult formatted = await docorix.Excel.ApplyFormulasAndFormattingAsync(excelStream, formulas);
docorix.Excel.CreatePivotSummaryAsync(excelStream, sourceSheet, targetSheet, rowField, dataField)
using DocumentResult pivot = await docorix.Excel.CreatePivotSummaryAsync(excelStream, "Data", "Summary", "Region", "Amount");

</details>


6. Word Service (docorix.Word)

<details> <summary><b>View Word Service Methods</b></summary>

docorix.Word.CreateDocumentAsync<T>(model, templateStream)
using DocumentResult docx = await docorix.Word.CreateDocumentAsync(contractModel);
docorix.Word.ReplaceTokensAsync(wordStream, replacements)
var tokens = new Dictionary<string, string> { { "Customer", "Globex Corp" } };
using DocumentResult replaced = await docorix.Word.ReplaceTokensAsync(docxStream, tokens);
docorix.Word.ExtractTextAsync(wordStream)
string text = await docorix.Word.ExtractTextAsync(docxStream);

</details>


7. Image Processing Service (docorix.Image)

<details> <summary><b>View Image Processing Methods</b></summary>

docorix.Image.ResizeAsync(imageStream, width, height, mode)
using DocumentResult resized = await docorix.Image.ResizeAsync(imgStream, 800, 600, ImageResizeMode.AspectFit);
docorix.Image.CropAsync(imageStream, cropRect)
using DocumentResult cropped = await docorix.Image.CropAsync(imgStream, new CropRectangle { X = 0, Y = 0, Width = 200, Height = 200 });
docorix.Image.RotateAsync(imageStream, angleDegrees)
using DocumentResult rotated = await docorix.Image.RotateAsync(imgStream, 90f);
docorix.Image.CompressAsync(imageStream, qualityPercent)
using DocumentResult compressed = await docorix.Image.CompressAsync(imgStream, 75);
docorix.Image.GenerateThumbnailAsync(imageStream, width, height)
using DocumentResult thumb = await docorix.Image.GenerateThumbnailAsync(imgStream, 150, 150);
docorix.Image.ConvertFormatAsync(imageStream, targetFormat)
using DocumentResult webp = await docorix.Image.ConvertFormatAsync(imgStream, ImageFormat.WebP);
docorix.Image.WatermarkAsync(imageStream, watermarkOptions)
using DocumentResult watermarked = await docorix.Image.WatermarkAsync(imgStream, new WatermarkOptions { Text = "PREVIEW" });
docorix.Image.RemoveBackgroundAsync(imageStream)
using DocumentResult transparentPng = await docorix.Image.RemoveBackgroundAsync(imgStream);

</details>


8. OCR & Data Extraction (docorix.Ocr)

<details> <summary><b>View OCR Methods</b></summary>

docorix.Ocr.ExtractTextAsync(documentStream, format, options)
OcrResult ocr = await docorix.Ocr.ExtractTextAsync(pdfStream, DocumentType.Pdf);
docorix.Ocr.ExtractInvoiceDataAsync(invoiceStream)
InvoiceData invoice = await docorix.Ocr.ExtractInvoiceDataAsync(invoiceStream);
docorix.Ocr.ExtractIdentityCardDataAsync(cardStream, cardType)
IdentityCardData passport = await docorix.Ocr.ExtractIdentityCardDataAsync(cardStream, IdentityCardType.Passport);
docorix.Ocr.ExtractResumeDataAsync(resumeStream)
ResumeData resume = await docorix.Ocr.ExtractResumeDataAsync(resumeStream);

</details>


9. Barcode Service (docorix.Barcode)

<details> <summary><b>View Barcode Methods</b></summary>

docorix.Barcode.GenerateBarcodeAsync(text, format, options)
using DocumentResult barcode = await docorix.Barcode.GenerateBarcodeAsync("PKG-99201", BarcodeFormat.Code128);

</details>


10. QR Code Service (docorix.QrCode)

<details> <summary><b>View QR Code Methods</b></summary>

docorix.QrCode.GenerateWebsiteQrAsync(url, styling)
using DocumentResult qr = await docorix.QrCode.GenerateWebsiteQrAsync("https://company.org");
docorix.QrCode.GeneratePaymentQrAsync(paymentInfo, styling)
using DocumentResult upiQr = await docorix.QrCode.GeneratePaymentQrAsync(new UpiPaymentRequest { PayeeVpa = "merchant@upi", Amount = 499m });
docorix.QrCode.GenerateWiFiQrAsync(wifiConfig, styling)
using DocumentResult wifiQr = await docorix.QrCode.GenerateWiFiQrAsync(new WiFiConfig { Ssid = "Guest_WiFi", Password = "Pass" });
docorix.QrCode.GenerateInvoiceQrAsync(invoice, styling)
using DocumentResult invoiceQr = await docorix.QrCode.GenerateInvoiceQrAsync(invoiceData);
docorix.QrCode.GenerateOtpQrAsync(secret, issuer, accountName, styling)
using DocumentResult otpQr = await docorix.QrCode.GenerateOtpQrAsync("SECRETKEY123", "Docorix", "user@company.com");
docorix.QrCode.GenerateCustomQrAsync(payload, styling)
using DocumentResult customQr = await docorix.QrCode.GenerateCustomQrAsync("CUSTOM_PAYLOAD");

</details>


11. Digital Signature Service ⭐⭐⭐⭐⭐ (docorix.Signature)

<details open> <summary><b>View Digital Signature Methods</b></summary>

docorix.Signature.SignPdfAsync(pdfStream, signatureOptions)

Digitally signs a PDF with a PKCS12/PFX certificate and visual signature stamp.

using DocumentResult signedPdf = await docorix.Signature.SignPdfAsync(unsignedPdfStream, new SignatureOptions
{
    CertificateBytes = File.ReadAllBytes("cert.pfx"),
    CertificatePassword = "Password123",
    SignerName = "VP of Engineering",
    Reason = "Official Approval",
    Location = "New York, NY",
    AddVisualStamp = true
});
docorix.Signature.VerifyPdfSignatureAsync(signedPdfStream)

Validates digital signature authenticity and document integrity.

SignatureVerificationResult verify = await docorix.Signature.VerifyPdfSignatureAsync(signedPdfStream);
Console.WriteLine($"Signature Valid: {verify.IsValid}, Signer: {verify.SignerName}");

</details>


12. Enterprise Report Service (docorix.Report)

<details> <summary><b>View Report Methods</b></summary>

docorix.Report.GenerateSalesReportAsync<T>(salesData, format)
using DocumentResult report = await docorix.Report.GenerateSalesReportAsync(salesList, DocumentType.Pdf);
docorix.Report.GenerateInventoryReportAsync<T>(inventoryData, format)
using DocumentResult report = await docorix.Report.GenerateInventoryReportAsync(inventoryList, DocumentType.Pdf);
docorix.Report.GenerateFinancialReportAsync<T>(financialData, format)
using DocumentResult report = await docorix.Report.GenerateFinancialReportAsync(financialList, DocumentType.Pdf);

</details>


13. AI Document Intelligence (docorix.Ai)

<details> <summary><b>View AI Methods</b></summary>

docorix.Ai.SummarizePdfAsync(pdfStream, maxLengthWords)
string summary = await docorix.Ai.SummarizePdfAsync(pdfStream, maxLengthWords: 150);
docorix.Ai.TranslatePdfAsync(pdfStream, targetLanguage)
using DocumentResult translated = await docorix.Ai.TranslatePdfAsync(pdfStream, "Spanish");
docorix.Ai.AskQuestionAsync(pdfStream, question)
string answer = await docorix.Ai.AskQuestionAsync(pdfStream, "What is the penalty for late payment?");
docorix.Ai.ClassifyDocumentAsync(documentStream)
string classification = await docorix.Ai.ClassifyDocumentAsync(docStream);

</details>


14. Document Comparer (docorix.Comparer)

<details> <summary><b>View Document Comparer Methods</b></summary>

docorix.Comparer.CompareAsync(originalStream, modifiedStream, format, detailLevel)
using DocumentResult diff = await docorix.Comparer.CompareAsync(doc1Stream, doc2Stream, DocumentType.Word);
await diff.SaveToFileAsync("DiffReport.md");

</details>


15. ASP.NET Core Integration (Docorix.AspNetCore)

<details open> <summary><b>View ASP.NET Core Integration</b></summary>

this.DocorixFile(documentResult, inline)

Controller Action Result extension method for Web API file responses.

[HttpGet("download-invoice")]
public async Task<IActionResult> DownloadInvoice()
{
    DocumentResult pdf = await docorix.GenerateAsync("templates/invoice.xml", invoiceModel, DocumentType.Pdf);
    return this.DocorixFile(pdf, inline: false);
}

</details>


🧪 Unit Testing

Run the full xUnit test suite:

dotnet test

All 8 test suites pass with 0 Warnings and 0 Errors.


📄 License

Docorix commercial package is released under the MIT License. Copyright © 2026 BrothersTechJodhpur (Mohit Rao).

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.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Docorix.Reporting:

Package Downloads
Docorix.Core

Package Description

Docorix

Docorix is an enterprise-grade document aggregator for .NET. Abstracts PDF operations, Excel, Word, Barcodes, QR codes, OCR extraction, PKCS12 digital signing, image processing, business reports, and AI document intelligence into a single unified API.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 143 8/7/2026