Ejemplo n.º 1
0
        public Utility()
        {
            _docOperations     = new List <iTextSharpOperation>();
            DirectContent      = new DirectContent(this, ContentLayer.Content);
            DirectContentUnder = new DirectContent(this, ContentLayer.ContentUnder);

            // 解决中文字体
            string   fontPath    = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Fonts), MSYH);
            BaseFont baseFont    = BaseFont.CreateFont($"{fontPath},0", BaseFont.IDENTITY_H, BaseFont.EMBEDDED);
            Font     defaultFont = new Font(baseFont, 14);

            _font = defaultFont;

            SetPageSize("A4");
            SetPagePadding(0);
        }
Ejemplo n.º 2
0
 public DefaultPageEvent(DirectContent directContent)
 {
     _directContent = directContent;
 }