cyhbsoft 发表于 2017-7-11 08:52:53

把文档中的字颜色设置成白色打印的时候还是打印成黑色了

如题:把文档中的字颜色设置成白色打印的时候还是打印成黑色了

gw0506 发表于 2017-7-11 15:47:52


System.Drawing.Printing.PrintDocument pd = new System.Drawing.Printing.PrintDocument();
pd.DefaultPageSettings.Color = true;
textControl1.Print(pd);

http://gcdn.gcpowertools.com.cn/forum.php?mod=viewthread&tid=16038&highlight=%B4%F2%D3%A1

cyhbsoft 发表于 2017-7-11 20:35:43

本来是要来做续打的,用另外一种方式实现了

gw0506 发表于 2017-7-12 14:15:05

那就是搞定了吧。那就好~

cyhbsoft 发表于 2017-7-12 20:00:01

现在还有个问题,怎么用代码设置段落的首行缩进?

Richard.Ma 发表于 2017-7-13 11:05:52

cyhbsoft 发表于 2017-7-12 20:00
现在还有个问题,怎么用代码设置段落的首行缩进?

TXTextControl.ParagraphFormat.HangingIndent 设置为负值试试

cyhbsoft 发表于 2017-7-19 09:22:29

设置了没用,直接报错

Richard.Ma 发表于 2017-7-19 16:56:51

抱歉,这个缩进应该用另一个属性 ParagraphFormat .LeftIndent 将这个设置为正值即可解决问题

Richard.Ma 发表于 2017-7-19 17:11:09

cyhbsoft 发表于 2017-7-19 09:22
设置了没用,直接报错

这个问题在于设置这个为负值时首先要设置LeftIndent

如下设置即可解决问题
LeftIndent = 300;
HangingIndent = -300;
页: [1]
查看完整版本: 把文档中的字颜色设置成白色打印的时候还是打印成黑色了