Angri450.Nong.Docx 3.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package Angri450.Nong.Docx --version 3.0.1
                    
NuGet\Install-Package Angri450.Nong.Docx -Version 3.0.1
                    
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="Angri450.Nong.Docx" Version="3.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Angri450.Nong.Docx" Version="3.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Angri450.Nong.Docx" />
                    
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 Angri450.Nong.Docx --version 3.0.1
                    
#r "nuget: Angri450.Nong.Docx, 3.0.1"
                    
#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 Angri450.Nong.Docx@3.0.1
                    
#: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=Angri450.Nong.Docx&version=3.0.1
                    
Install as a Cake Addin
#tool nuget:?package=Angri450.Nong.Docx&version=3.0.1
                    
Install as a Cake Tool

Angri450.Nong.Docx v2.0

OpenXML Word generation library — pure .NET, zero COM, single dependency. One-stop paper writing: generate, fill, diagnose.

Dependency

Angri450.Nong.Docx
└── DocumentFormat.OpenXml

That's it. No System.Drawing.Common, no ImageSharp, no COM. Cross-platform.

Core Capabilities

StyleBuilder.BuildFromJson — One-Click Formatting

StyleBuilder.BuildFromJson(sp.Styles, "formats/journal-paper.json");
var sectPr = StyleBuilder.LoadPageLayout("formats/journal-paper.json").Build();
// Swap format = swap JSON. Contest → journal → thesis in 3 seconds.

DocumentWriter — Chainable Content

var w = new DocumentWriter(body, doc);
w.Title("Title").EnglishTitle("English Title")
 .Abstract("Abstract...").Keywords("K1; K2")
 .TableOfContents("Contents")
 .Heading("Introduction", 1).Body("Text[1].")
 .Footnote("Note").Endnote("Endnote")
 .Table("Caption", 1, headers, rows).TableStyle(TableStyles.LightGridAccent1)
 .VariableTable("Variables", 1, variablePlanRows)
 .Figure("Caption", 1).BarChart("Chart", cats, vals)
 .Bookmark("_ref").CrossReference("_ref", "see Table 1")
 .Hyperlink("https://example.com", "Link")
 .BibHeading().References("Author. Title[J]. Journal, Year.");

DocxTemplate — Fill Templates

DocxTemplate.Fill("template.docx", "output.docx", new { Name = "Zhang", Score = 95 });
// {{tag}} replacement + @if/@foreach blocks + table row data binding

ImageEmbedder — Real Images

ImageEmbedder.EmbedImages(body, mainPart, new[] { "fig1.png", "fig2.png" });
// First 2 side-by-side in borderless table, rest stacked vertically
// ImageHeaderReader reads PNG/JPEG/GIF/BMP/TIFF dimensions — no external deps

WordPreview — Generate + Diagnose

var r = WordPreview.Preview("paper.docx");
// Text preview + 7-step diagnostics + OpenXmlValidator OOXML validation

SectionBuilder — Page Layout

var sectPr = new SectionBuilder().A4().Margins("3cm", "2.5cm", "2.5cm", "2cm").Build();

TableStyles — 90+ Built-in Designs

w.TableStyle(TableStyles.LightGridAccent1);
// Full set: LightShading, MediumGrid, Colorful, DarkList series...

Paper Analysis (16 Types)

var types = PaperTypeClassifier.Classify(text);           // Classify research design
var struct = PaperStructureExtractor.BuildPaperStructure(text); // Extract sections
var vars = VariablePlanGenerator.GenerateVariablePlan(text);    // Generate variable table
var refs = ReferenceAnalyzer.CheckReferenceRisks(text);         // Check references
var diag = PaperDiagnostics.DiagnosePaperQuality(text, ...);    // Quality diagnosis (A-E grade)

Diagnosis pipeline: evidence chain (10 items) → data requirements (9 items) → gap grade (A-E) → semantic diagnosis → 3-tier quality report.

Advanced Features

AdvancedFeatures.InsertComment(doc, "reviewer", "Fix this", para);  // Comments
AdvancedFeatures.AppendTrackedInsertion(para, "new text");           // Track changes
body.Append(AdvancedFeatures.InsertPlainTextControl("name"));         // Content controls
AdvancedFeatures.EmbedFont(doc, "font.ttf", "FontName");             // Font embedding
AdvancedFeatures.AppendDocument(target, "source.docx");               // Document merge
AdvancedFeatures.SetDocumentProperties(doc, title: "T", author: "A"); // Properties
AdvancedFeatures.ProtectDocument(doc, "readOnly");                   // Protection

Quick Start

dotnet add package Angri450.Nong.Docx
using DocumentFormat.OpenXml.Packaging;
using DocumentFormat.OpenXml.Wordprocessing;
using DocxCore;

using var doc = WordprocessingDocument.Create("paper.docx", WordprocessingDocumentType.Document);
var main = doc.AddMainDocumentPart();
main.Document = new Document(new Body());
var body = main.Document.Body!;

// Styles from JSON
var sp = main.AddNewPart<StyleDefinitionsPart>();
sp.Styles = new Styles();
StyleBuilder.BuildFromJson(sp.Styles, "formats/journal-paper.json");

// Page layout
var sectPr = StyleBuilder.LoadPageLayout("formats/journal-paper.json").Build();

var w = new DocumentWriter(body);
w.Title("Title").Abstract("Abstract...").Keywords("A; B; C")
 .Heading("Introduction", 1).Body("Text[1].")
 .BibHeading().References("Author. Title[J]. Journal, Year.");

// Images
ImageEmbedder.EmbedImages(body, main, new[] { "fig1.png", "fig2.png" });

body.Append(sectPr);
ElementOrder.RectifyTree(body);
main.Document.Save();

Format Templates

Template Body Heading Use Case
life-sciences-contest 宋体 10.5pt 黑体 14pt Contest (4-page limit)
journal-paper 宋体 10.5pt 黑体 18pt Journal (GB/T 7714)
course-paper 宋体 10.5pt 黑体 14pt Course paper
degree-thesis 宋体 12pt 黑体 16pt Degree thesis

Swap format = swap JSON. No code changes.

License

Apache-2.0. Built on Open XML SDK.

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 Angri450.Nong.Docx:

Package Downloads
Angri450.Nong.MultiModal

多模态文档处理库 — OCR、语音转文字、文字转语音。首个能力:PaddleOCR-VL-1.6 云端 API + 本地 PaddleOCR CPU 混合识别。

Angri450.Nong.Inspect

AI-generated content inspection toolkit. Reviews academic papers, official documents, letters, charts, and diagrams for formatting, structure, and content quality issues. Built on Angri450.Nong.Docx.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.1.0 50 6/2/2026
3.0.2 113 6/1/2026
3.0.1 64 6/1/2026
3.0.0 73 6/1/2026
2.0.0 60 5/30/2026
1.0.7 54 5/30/2026
1.0.6.1 57 5/30/2026
1.0.6 64 5/30/2026
1.0.5 82 5/25/2026
1.0.4 81 5/25/2026
1.0.3 84 5/25/2026
1.0.2 87 5/25/2026
1.0.1 94 5/24/2026
1.0.0 86 5/24/2026