namespace ReportEngine { using iTextSharp.text; using iTextSharp.text.pdf; public class ReportCanvasOptions { public string FontPath { get; set; } = @"c:\\windows\\fonts\\mingliu.ttc,0"; private float _fFontSize = 12; public float FontSize { get { return _fFontSize; } set { _fFontSize = value; NormalFont = new Font(BaseFont, _fFontSize); } } public ReportCanvasOptions(Rectangle i_rPageSize, float i_fFontSize ) { BaseFont = BaseFont.CreateFont(FontPath, BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED); PageSize = i_rPageSize; FontSize = i_fFontSize; } public const float PAGE_MARGIN_DEFAULT = 30; public Rectangle PageSize { get; private set; } public float PageMarginLeft { get; set; } = PAGE_MARGIN_DEFAULT; public float PageMarginRight { get; set; } = PAGE_MARGIN_DEFAULT; public float PageMarginHeader { get; set; } = PAGE_MARGIN_DEFAULT; public float PageMarginFooter { get; set; } = PAGE_MARGIN_DEFAULT; public string UserEntercode { get; set; } public string OwnerEntercode { get; set; } /// /// 顯示頁碼 /// public bool IsShowPageNumber { get; set; } = true; public BaseFont BaseFont { get; private set; } public Font NormalFont { get; private set; } public string OutputPath { get; set; } } }