Spire.pdf Spire.Doc Spire.Xls最新版Crack

对应的dll版本如图

生成pdf代码

cs 复制代码
using Spire.Pdf;
using Spire.Pdf.Graphics;
using System.Drawing;

PdfDocument pdfDocumnet =new PdfDocument();
for (int i = 1; i < 30; i++)
{

    PdfPageBase page = pdfDocumnet.Pages.Add(PdfPageSize.A4);
    PdfTrueTypeFont font = new PdfTrueTypeFont(new Font("宋体", 12), true);
    PdfPen pen = new PdfPen(Color.Black);
    string text = $"第{i.ToString()}页";
    page.Canvas.DrawString(text, font, pen, 100, 50);
}
pdfDocumnet.SaveToFile("pdf.pdf");

启动调试,打开生成的pdf

相关推荐
hez20103 小时前
TypedSql:在 C# 类型系统上实现一个 SQL 查询引擎
c#·.net·.net core·compiler
世洋Blog4 小时前
利用<<左移运算符优雅的设计游戏能力的任意组合和判断
游戏·unity·c#
曹牧5 小时前
C#中,#region和#endregion
开发语言·c#
czhc11400756635 小时前
c# 1121 构造方法
java·javascript·c#
在路上看风景7 小时前
2.3 C#装箱和拆箱
开发语言·c#
葛小白19 小时前
C#进阶14:C#全局路径规划算法_RRTstar
c#·路径规划·rrtstar算法
Tiger_shl10 小时前
SqlConnection、SqlCommand 和 SqlDataAdapter
开发语言·数据库·c#
yi碗汤园13 小时前
Visual Studio常用的快捷键
开发语言·ide·c#·编辑器·visual studio
MM_MS14 小时前
C#小案例-->汽车租聘系统计价功能
c#·汽车·简单工厂模式·抽象工厂模式·visual studio