对应的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