生成 PDF 文檔的 C# 組件 Report.NET
Report.NET 是一個功能強大且易用的用來生成 PDF 文檔的 C# 組件。
- entirely written in C# for the Microsoft .NET framework
- very compact code (Hello World: 6 lines)
- supported graphic objects: text, lines, rectangles, jpeg images
- easy alignment and transformation of graphic objects
- ASP.NET can generate dynamic PDF pages
- XML Documentation (Comment Web Pages)
示例代碼:
using Root.Reports; using System; namespace ReportSamples { /// <summary>Hello World (PDF Version)</summary> class HelloWorld { //----------------------------------------------------------------------------------------------------x /// <summary>Starts the "Hello World" sample.</summary> public static void Main() { Report report = new Report(new PdfFormatter()); FontDef fd = new FontDef(report, "Helvetica"); FontProp fp = new FontPropMM(fd, 25); Page page = new Page(report); page.AddCenteredMM(80, new RepString(fp, "Hello World!")); RT.ViewPDF(report, "HelloWorld.pdf"); } } }
本文由用戶 fmms 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!