⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 calendar.cs

📁 PDF文件格式解析库源代码
💻 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 + -