Best.Report.Pdf 26.7.6.1

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package Best.Report.Pdf --version 26.7.6.1
                    
NuGet\Install-Package Best.Report.Pdf -Version 26.7.6.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="Best.Report.Pdf" Version="26.7.6.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Best.Report.Pdf" Version="26.7.6.1" />
                    
Directory.Packages.props
<PackageReference Include="Best.Report.Pdf" />
                    
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 Best.Report.Pdf --version 26.7.6.1
                    
#r "nuget: Best.Report.Pdf, 26.7.6.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 Best.Report.Pdf@26.7.6.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=Best.Report.Pdf&version=26.7.6.1
                    
Install as a Cake Addin
#tool nuget:?package=Best.Report.Pdf&version=26.7.6.1
                    
Install as a Cake Tool

Best.Report.Pdf

基于 PDFsharp-MigraDoc 7.0 的 .NET 中文 PDF 报告生成库。

项目结构

Best.Report.Pdf/        # 类库
  Core/                 # 核心:IDocComponent, IHeaderFooter, PdfReport, DocPageSetup
  Components/           # 组件:DocText, DocTitle, DocParagraph, DocNote, DocInfoTable,
                        #       DocTable, DocMergedTable, DocImage, DocChartPlaceholder,
                        #       DocPageBreak
  Tables/               # 表格:ColumnDef, ColumnWidth, ITableBuilder,
                        #       SimpleTableBuilder, MinimalTableBuilder, MergedTableBuilder,
                        #       TableHelper
  Headers/              # 页眉页脚:SimpleHeader, SimpleFooter, HeaderFooterSection
  Styles/               # DefaultStyles
Best.Report.Pdf.Demo/   # 控制台 Demo(含 HarmonyFontResolver 参考实现)
docs/                   # 文档

快速开始

dotnet build
dotnet run --project Best.Report.Pdf.Demo

生成的 PDF 输出到桌面:

  • BET_Report_v2.pdf — 全边框表 + 三线表对比
  • BET_GrainSize_v2.pdf — 合并单元格表格
  • LongTable_Test.pdf — 长表分页表头测试

核心 API 速览

// 字体初始化(使用者自行实现 IFontResolver)
GlobalFontSettings.FontResolver = new YourFontResolver();
DefaultStyles.DefaultFontName = "YourFont";

// 创建报告
new PdfReport()
    .WithPageSetup(new DocPageSetup { Format = PageFormat.A4 })
    .WithHeader(new SimpleHeader("页眉"))
    .WithFooter(new SimpleFooter(companyInfo: "公司信息"))
    .AddComponents(
        new DocTitle("标题"),
        new DocInfoTable(infoItems, columns: 2),
        new DocTable(new SimpleTableBuilder<Data>("结果", columns, rows, formatter)),
        new DocNote("注释")
    )
    .Build("output.pdf");

文档

  • 架构设计 — 设计理念、抽象层、页面生成流程
  • 组件清单 — 每个组件的详细说明和代码示例
  • API 参考 — 全部公开 API 签名速查表
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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 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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated