IText学习手册——使用Chunk输出内容

Chunk是IText中输出内容的最小单位

/// <summary>
        /// 使用Chunk输出内容
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button9_Click(object sender, EventArgs e)
        {
            Document doc = new Document();
            PdfWriter.GetInstance(doc, File.Open(path, FileMode.Create));
            doc.Open();

            //在pdf文档中使用chunk输出内容
            doc.Add(new Chunk("This is Chunk"));

            doc.Close();

        }

显示效果:

image

posted @ 2014-02-26 13:48  争世不悔  阅读(800)  评论(0编辑  收藏  举报