You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.5 KiB
53 lines
1.5 KiB
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; }
|
|
|
|
/// <summary>
|
|
/// 顯示頁碼
|
|
/// </summary>
|
|
public bool IsShowPageNumber { get; set; } = true;
|
|
|
|
public BaseFont BaseFont { get; private set; }
|
|
|
|
public Font NormalFont { get; private set; }
|
|
|
|
public string OutputPath { get; set; }
|
|
|
|
}
|
|
}
|