📄 calendar.cs
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -