using iTextSharp.text;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using iTextSharp.text.pdf;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
           // File.Create("d:\\a.pdf");
            Document document = new Document();
            BaseFont bf = BaseFont.CreateFont(@"C:\Windows\Fonts\MSYH.TTC,0", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);
            iTextSharp.text.Font f = new Font(bf,9);
            PdfWriter.GetInstance(document, new FileStream("d:\\a.pdf", FileMode.Create));
            document.Open();
            iTextSharp.text.Paragraph paragraph = new iTextSharp.text.Paragraph("Hello World你好sss",f);
            document.Add(paragraph);
            document.Close(); 
        }
    }
}

 

相关文章:

  • 2021-08-07
  • 2022-12-23
  • 2022-12-23
  • 2021-12-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-18
猜你喜欢
  • 2021-12-25
  • 2021-11-17
  • 2021-12-23
  • 2021-08-14
  • 2021-11-03
相关资源
相似解决方案