calendar.cs
来自「PDF文件格式解析库源代码」· CS 代码 · 共 41 行
CS
41 行
using System;
using System.Collections.Generic;
using System.Text;
using AnotherPDFLib;
using AnotherPDFLib.PdfTexts;
using AnotherPDFLib.PdfGraphics;
namespace AnotherPDFLibTest
{
public class Calendar
{
public MonthForm[] MonthForms = new MonthForm[13];
public Calendar(int year)
{
for (int month = 1; month <= 12; month++)
{
MonthForms[month] = new MonthForm(year, month);
}
}
public PdfDocument Render()
{
PdfDocument pdfdoc = new PdfDocument(PaperSize.A4);
pdfdoc.AddFontResource(StandardFont.Helvetica);
pdfdoc.AddFontResource(StandardFont.HelveticaItalic);
pdfdoc.AddFontResource(StandardFont.TimesItalic);
pdfdoc.AddFontResource(StandardFont.CourierBold);
for (int month = 1; month <= 12; month++)
{
PdfPage page = pdfdoc.NewPage();
MonthForms[month].Render(page.Content, 100, 750);
}
return pdfdoc;
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?