using (Document pdfDocument = new Document(@"E:\中国移动td-lte终端总体技术规范.pdf"))
{
using (FileStream imageStream = new FileStream(@"E:\SetDefaultFontName.png", FileMode.Create))
{
Resolution resolution = new Resolution(300);
PngDevice pngDevice = new PngDevice(resolution);
RenderingOptions ro = new RenderingOptions();
ro.DefaultFontName = "SimSun";
pngDevice.RenderingOptions = ro;
pngDevice.Process(pdfDocument.Pages[1], imageStream);
}
}
If I remove “pngDevice.RenderingOptions”, everything is OK. Bellow is the sample file.
中国移动td-lte终端总体技术规范.pdf (93.1 KB)