applybaiyulanfund.cs

来自「PDF文件格式解析库源代码」· CS 代码 · 共 39 行

CS
39
字号
using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using AnotherPDFLib.Forms;
using AnotherPDFLib.XFA;

namespace AnotherPDFLibTest
{
    public partial class ApplyBaiYuLanFund
    {
        public static XdpDocument CreateDocument()
        {
            XdpDocument xdp = new XdpDocument();
            xdp.Form.Name = "ApplyBaiYuLanFund";
            xdp.Form.Locale = "zh_CN";
            xdp.Form.Layout = Layout.Flow;

            Page page = Page.A4;
            page.Name = "A4Page";
            page.Margin = 30;
            PageNumber pageNum = new PageNumber("- {0} -", new Font("宋体", 9));
            pageNum.Alignment = Alignment.BottomCenter;
            pageNum.X = page.Size.Width / 2;
            pageNum.Y = page.ContentArea.Bottom;
            page.PageArea.Add(pageNum.BuildXfaNode());
            xdp.Form.PageSet.Add(page);

            Form cover = Cover.CreateForm(page);
            Form fillinginstruction = FillingInstruction.CreateForm(page);

            xdp.Form.Controls.AddRange(new Control[]{
                cover,fillinginstruction
            });
            return xdp;
        }
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?