我用Spire.Doc这个控件,打印二维码标签,设置完边距、大小、位置等参数后,将文件保存,通过word打印出来很正常,但是在代码中直接执行如下打印代码,打出来的是和直接打开word打印的不一样:
private void button3_Click(object sender, EventArgs e)
{
Document doc = new Document();
doc.LoadFromFile(@"Image.doc"); //直接打开image.doc文档打印是正常的,这个是设置好格式保存下来的文件
PrintDialog dialog = new PrintDialog();
dialog.AllowPrintToFile = true;
dialog.AllowCurrentPage = true;
dialog.AllowSomePages = true;
dialog.UseEXDialog = true;
doc.PrintDialog = dialog;
PrintDocument printDoc = doc.PrintDocument;
printDoc.Print();
}
可能是什么原因?
private void button3_Click(object sender, EventArgs e)
{
Document doc = new Document();
doc.LoadFromFile(@"Image.doc"); //直接打开image.doc文档打印是正常的,这个是设置好格式保存下来的文件
PrintDialog dialog = new PrintDialog();
dialog.AllowPrintToFile = true;
dialog.AllowCurrentPage = true;
dialog.AllowSomePages = true;
dialog.UseEXDialog = true;
doc.PrintDialog = dialog;
PrintDocument printDoc = doc.PrintDocument;
printDoc.Print();
}
可能是什么原因?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货