OfdSharp.Net.Rendering 0.1.0-alpha.1

This is a prerelease version of OfdSharp.Net.Rendering.
dotnet add package OfdSharp.Net.Rendering --version 0.1.0-alpha.1
                    
NuGet\Install-Package OfdSharp.Net.Rendering -Version 0.1.0-alpha.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="OfdSharp.Net.Rendering" Version="0.1.0-alpha.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OfdSharp.Net.Rendering" Version="0.1.0-alpha.1" />
                    
Directory.Packages.props
<PackageReference Include="OfdSharp.Net.Rendering" />
                    
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 OfdSharp.Net.Rendering --version 0.1.0-alpha.1
                    
#r "nuget: OfdSharp.Net.Rendering, 0.1.0-alpha.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 OfdSharp.Net.Rendering@0.1.0-alpha.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=OfdSharp.Net.Rendering&version=0.1.0-alpha.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=OfdSharp.Net.Rendering&version=0.1.0-alpha.1&prerelease
                    
Install as a Cake Tool

OfdSharp.Net

OfdSharp 是一个面向 .NET 8+ 的现代、高性能版式文档(OFD, GB/T 33190)处理基础库。


✨ 核心功能

  • 📖 文档读取与解析 (Reader):支持大文件按需分页加载、全文提取、结构化文本块解析、大纲与附件提取。
  • ✍️ 底层创建与写入 (Writer):支持文字、矢量路径、图像等图元的精准坐标写入与标准打包。
  • 📄 流式排版引擎 (Layout):支持段落、样式、表格、跨页图片、页眉页脚与自动分页,无需繁琐计算坐标。
  • 🔄 格式互转 (Converters)
    • OFD ↔ PDF 双向互转
    • OFD → SVG / HTML / 图片 (PNG/JPEG)
    • HTML/CSS → OFD 模版生成
  • 🔐 国密安全与签章 (Signatures):SM2 非对称加密签名验签、SM3 完整性杂凑校验与电子印章(SES)支持。

📦 安装

# 安装完整全功能主包
dotnet add package OfdSharp.Net

# 或按需引入独立轻量模块
dotnet add package OfdSharp.Net.Core
dotnet add package OfdSharp.Net.Reader
dotnet add package OfdSharp.Net.Writer
dotnet add package OfdSharp.Net.Layout
dotnet add package OfdSharp.Net.Converters
dotnet add package OfdSharp.Net.Signatures

⚡ 快速上手

using OfdSharp;

// 打开 OFD 文档并提取全文
using var doc = OfdDocument.Open("sample.ofd");
string fullText = doc.ExtractAllText();

// 一键导出为 PDF 或 SVG
await doc.SaveAsPdfAsync("sample.pdf");
await doc.SaveAsSvgAsync("sample.svg");

  • 📖 详细使用文档、架构设计与完整示例请访问 GitHub 仓库
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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 OfdSharp.Net.Rendering:

Package Downloads
OfdSharp.Net

OfdSharp is a modern, high-performance .NET SDK for Open Fixed-layout Document (OFD, GB/T 33190), supporting document creation, parsing, rendering, text/image extraction, and conversion.

OfdSharp.Net.Converters

High-performance bidirectional document format converters for OfdSharp, including PDF, SVG, Image (PNG/JPEG/WebP via SkiaSharp), and HTML conversion.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0-alpha.1 64 9/7/2026