OfdNet.Crypto
0.1.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package OfdNet.Crypto --version 0.1.0
NuGet\Install-Package OfdNet.Crypto -Version 0.1.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="OfdNet.Crypto" Version="0.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OfdNet.Crypto" Version="0.1.0" />
<PackageReference Include="OfdNet.Crypto" />
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 OfdNet.Crypto --version 0.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: OfdNet.Crypto, 0.1.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 OfdNet.Crypto@0.1.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=OfdNet.Crypto&version=0.1.0
#tool nuget:?package=OfdNet.Crypto&version=0.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
OfdNet
ofdrw 的 .NET 10 移植,提供 OFD 文档的读取、编辑、排版生成、 数字签名、加密、OFD-A 归档转换与文档合并。
本项目是社区移植,不是 ofdrw 官方发布,不代表上游背书。
安装
推荐直接安装元包,它会带上全部模块:
dotnet add package OfdNet
也可以按需安装单个模块:
dotnet add package OfdNet.Core # 数据模型
dotnet add package OfdNet.Pkg # 虚拟容器 / 打包解包
dotnet add package OfdNet.Reader # 读取、资源定位、关键字检索
dotnet add package OfdNet.Layout # 排版生成
dotnet add package OfdNet.Sign # 数字签名 / 签章
dotnet add package OfdNet.Crypto # 加密 / 解密
dotnet add package OfdNet.Gm # SM2 / SM3 / SES 国密结构
dotnet add package OfdNet.Font # 字体度量
dotnet add package OfdNet.Archive # OFD-A 检查与转换
dotnet add package OfdNet.Tool # 合并、页面删除等工具
目标框架:.NET 10。
快速开始
排版生成 OFD
using Ofd.Layout;
using Ofd.Layout.Element;
using var doc = new OFDDoc("out.ofd");
doc.Add(new Paragraph("Hello OFD", 5));
doc.Add(new Div(100, 40).SetBackgroundColor(230, 240, 255));
// Dispose / Close 时完成布局并打包
读取内容
using Ofd.Reader;
using var reader = new OFDReader("out.ofd");
int pages = reader.GetNumberOfPages();
var page = reader.GetPage(1);
关键字检索
using Ofd.Reader.Keyword;
var hits = KeywordExtractor.GetKeyWordPositionList(reader, "关键词");
OFD-A 检查与转换
using Ofd.Archive.Check;
using Ofd.Archive.Convert;
var violations = new OFDArchiveChecker().Check("in.ofd");
new OFDArchiveConverter().Convert("in.ofd", "out-ofda.ofd");
字体说明
- 随包提供 Noto Serif SC(SIL OFL 1.1),用于跨平台确定性排版;许可证随包附在
Assets/NotoSerif/OFL.txt。 - 不提供
FangSong_GB2312.ttf。该字体版权归 GreatWall Computer Co.,没有再分发许可; 需要时请自行获取已授权副本,文件缺失时字体会回退到系统宋体。 - 字体随文档嵌入时,请自行确认目标字体的再分发授权。
许可证与归属
- 本项目以 Apache License 2.0 发布,全文见包内
LICENSE。 - 上游归属、修改说明与第三方组件声明见包内
NOTICE、THIRD-PARTY-NOTICES.md。 - 依赖:BouncyCastle.Cryptography(MIT)、SkiaSharp(MIT)。
| Product | Versions 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.
-
net10.0
- BouncyCastle.Cryptography (>= 2.7.0)
- OfdNet.Core (>= 0.1.0)
- OfdNet.Gm (>= 0.1.0)
- OfdNet.Pkg (>= 0.1.0)
- OfdNet.Reader (>= 0.1.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on OfdNet.Crypto:
| Package | Downloads |
|---|---|
|
OfdNet.Archive
OFD-A 合规检查(23 条规则)与转换(23 个处理器)。 |
|
|
OfdNet
OfdNet 元包:一次安装 OFD 读取、编辑、排版、签章、加密、OFD-A 与合并全部模块。 |
GitHub repositories
This package is not used by any popular GitHub repositories.
Initial NuGet release (0.1.0).