打印时,为双面打印,每一面打印一个表格。 我现在只能画出一个,第二个打死都不显示。
求简单代码-------非规则表格,用那种循环画线是不行的。
15 个解决方案
#1
双面打印是要设置打印机的。
#2
首先要确定你是怎么打印的
用的是panel.GreateGraph吗
用的是panel.GreateGraph吗
#3
我的意思是,,使用e.Graphics.DrawLine来画表格,2个独立的表格。每个表格单独一页。那么在预览的时候会是显示2 页吗?
#4
参考你在打印word的时候是怎么双面打印的
画的时候就要把高度画成2倍页面的高度
然后把第二个表格画在第二页的位置
打印的时候设置一下双面打印
预览的时候保证是都显示出来的,不可能让用户到显示器背面去看背面打印的表格是什么东东吧...
画的时候就要把高度画成2倍页面的高度
然后把第二个表格画在第二页的位置
打印的时候设置一下双面打印
预览的时候保证是都显示出来的,不可能让用户到显示器背面去看背面打印的表格是什么东东吧...
#5
画的时候就要把高度画成2倍页面的高度
然后把第二个表格画在第二页的位置
就是这2步我做不好,能给个简单的代码吗?
然后把第二个表格画在第二页的位置
就是这2步我做不好,能给个简单的代码吗?
#6
你画一个是怎么画的,画2个有什么区别吗?
画布高度设置一下,变成原来的2倍
画的坐标改一下,画第二页的时候y轴坐标全部加上1页的高度,不就得了
画布高度设置一下,变成原来的2倍
画的坐标改一下,画第二页的时候y轴坐标全部加上1页的高度,不就得了
#7
Font f = new Font("宋体",16);
Brush b = new SolidBrush(Color.Black);
e.Graphics.DrawString("制 动 效 能 证 明 书",f,b,new PointF(270,40));
f = new Font("宋体",10);
string str = string.Format("{0}",DateTime.Today.ToLongDateString());
e.Graphics.DrawString(str,f,b,new PointF(360,70));
e.Graphics.DrawString("江岸车辆段",f,b,new PointF(95,90));
e.Graphics.DrawString("宜昌东作业场",f,b,new PointF(240,90));
e.Graphics.DrawString("检车员:",f,b,new PointF(400,90));
e.Graphics.DrawString("司机签名:",f,b,new PointF(600,90));
Pen p = new Pen(Color.Black,1);
int a = 110;
for(int i = 0;i < 26;i++)
{
e.Graphics.DrawLine(p,70,a,740,a);
a += 30;
}
e.Graphics.DrawLine(p,70,110,70,860);//表格2边的竖线
e.Graphics.DrawLine(p,740,110,740,860);
e.Graphics.DrawString("车次",f,b,new PointF(95,120));
e.Graphics.DrawLine(p,140,110,140,140);
e.Graphics.DrawString("机车类型号码",f,b,new PointF(260,120));
e.Graphics.DrawLine(p,250,110,250,230);
e.Graphics.DrawLine(p,355,110,355,230);
e.Graphics.DrawString("牵引重量",f,b,new PointF(550,120));
e.Graphics.DrawLine(p,545,110,545,140);
e.Graphics.DrawLine(p,620,110,620,230);
e.Graphics.DrawString("编组",f,b,new PointF(150,150));
e.Graphics.DrawString("有效制动机辆数",f,b,new PointF(125,180));
e.Graphics.DrawString("截断塞门关闭辆数",f,b,new PointF(120,210));
e.Graphics.DrawString("无自动制动机辆数",f,b,new PointF(410,150));
e.Graphics.DrawString("换算高摩合成闸瓦总压力(KN)",f,b,new PointF(385,180));
e.Graphics.DrawString("每百吨平均高摩合成闸瓦压力(KN)",f,b,new PointF(375,210));
e.Graphics.DrawString("列车漏泄每分钟 Kpa",f,b,new PointF(350,240));
//想在这里分开
e.Graphics.DrawLine(p,500,260,500,860);//下部表格中间竖线
e.Graphics.DrawLine(p,600,260,600,860);
e.Graphics.DrawString("车辆类型",f,b,new PointF(GetPoint(500,70,4),270));
e.Graphics.DrawString("辆数",f,b,new PointF(GetPoint(600,500,2),270));
e.Graphics.DrawString("闸瓦压力(KN)",f,b,new PointF(GetPoint(740,600,6),270));
int m = GetPoint(500,70,8);
e.Graphics.DrawString("21T轴重货车空车",f,b,new PointF(m,300));
//e.Graphics.DrawString("3",f,b,new PointF(GetPoint(600,500,4),235));
e.Graphics.DrawString("21T轴重货车重车",f,b,new PointF(m,330));
e.Graphics.DrawString("23T轴重货车空车",f,b,new PointF(m,360));
e.Graphics.DrawString("23T轴重货车重车",f,b,new PointF(m,390));
e.Graphics.DrawString("25T轴重货车空车",f,b,new PointF(m,420));
e.Graphics.DrawString("25T轴重货车重车",f,b,new PointF(m,450));
e.Graphics.DrawString("快速货物班列(18T轴重)空车",f,b,new PointF(GetPoint(500,70,13),480));
e.Graphics.DrawString("快速货物班列(18T轴重)空车",f,b,new PointF(GetPoint(500,70,13),510));
e.Graphics.DrawString("普通客车(120Km/h踏面制动)",f,b,new PointF(GetPoint(500,70,13),540));
e.Graphics.DrawString("新型客车(120Km/h盘型制动自重40-45T)",f,b,new PointF(GetPoint(500,70,20),570));
e.Graphics.DrawString("新型客车(120Km/h盘型制动自重40-45T)",f,b,new PointF(GetPoint(500,70,20),600));
e.Graphics.DrawString("新型客车(120Km/h盘型制动自重40-45T)",f,b,new PointF(GetPoint(500,70,20),630));
e.Graphics.DrawString("新型客车(120Km/h盘型制动自重40-45T)",f,b,new PointF(GetPoint(500,70,20),660));
e.Graphics.DrawString("新型客车(双层)",f,b,new PointF(GetPoint(500,70,7),690));
e.Graphics.DrawString("新型客车(140Km/h盘型制动自重40-45T)",f,b,new PointF(GetPoint(500,70,20),720));
e.Graphics.DrawString("新型客车(140Km/h盘型制动自重40-45T)",f,b,new PointF(GetPoint(500,70,20),750));
e.Graphics.DrawString("新型客车(140Km/h盘型制动自重40-45T)",f,b,new PointF(GetPoint(500,70,20),780));
e.Graphics.DrawString("新型客车(140Km/h盘型制动自重40-45T)",f,b,new PointF(GetPoint(500,70,20),810));
e.Graphics.DrawString("特快货物班列(160Km/h)",f,b,new PointF(GetPoint(500,70,10),840));
这是个初步代码,,本来用的是A4的纸张大小,准备改成A5然后把表格分成2个。但是始终在预览窗口不显示。打印还没测试。
Brush b = new SolidBrush(Color.Black);
e.Graphics.DrawString("制 动 效 能 证 明 书",f,b,new PointF(270,40));
f = new Font("宋体",10);
string str = string.Format("{0}",DateTime.Today.ToLongDateString());
e.Graphics.DrawString(str,f,b,new PointF(360,70));
e.Graphics.DrawString("江岸车辆段",f,b,new PointF(95,90));
e.Graphics.DrawString("宜昌东作业场",f,b,new PointF(240,90));
e.Graphics.DrawString("检车员:",f,b,new PointF(400,90));
e.Graphics.DrawString("司机签名:",f,b,new PointF(600,90));
Pen p = new Pen(Color.Black,1);
int a = 110;
for(int i = 0;i < 26;i++)
{
e.Graphics.DrawLine(p,70,a,740,a);
a += 30;
}
e.Graphics.DrawLine(p,70,110,70,860);//表格2边的竖线
e.Graphics.DrawLine(p,740,110,740,860);
e.Graphics.DrawString("车次",f,b,new PointF(95,120));
e.Graphics.DrawLine(p,140,110,140,140);
e.Graphics.DrawString("机车类型号码",f,b,new PointF(260,120));
e.Graphics.DrawLine(p,250,110,250,230);
e.Graphics.DrawLine(p,355,110,355,230);
e.Graphics.DrawString("牵引重量",f,b,new PointF(550,120));
e.Graphics.DrawLine(p,545,110,545,140);
e.Graphics.DrawLine(p,620,110,620,230);
e.Graphics.DrawString("编组",f,b,new PointF(150,150));
e.Graphics.DrawString("有效制动机辆数",f,b,new PointF(125,180));
e.Graphics.DrawString("截断塞门关闭辆数",f,b,new PointF(120,210));
e.Graphics.DrawString("无自动制动机辆数",f,b,new PointF(410,150));
e.Graphics.DrawString("换算高摩合成闸瓦总压力(KN)",f,b,new PointF(385,180));
e.Graphics.DrawString("每百吨平均高摩合成闸瓦压力(KN)",f,b,new PointF(375,210));
e.Graphics.DrawString("列车漏泄每分钟 Kpa",f,b,new PointF(350,240));
//想在这里分开
e.Graphics.DrawLine(p,500,260,500,860);//下部表格中间竖线
e.Graphics.DrawLine(p,600,260,600,860);
e.Graphics.DrawString("车辆类型",f,b,new PointF(GetPoint(500,70,4),270));
e.Graphics.DrawString("辆数",f,b,new PointF(GetPoint(600,500,2),270));
e.Graphics.DrawString("闸瓦压力(KN)",f,b,new PointF(GetPoint(740,600,6),270));
int m = GetPoint(500,70,8);
e.Graphics.DrawString("21T轴重货车空车",f,b,new PointF(m,300));
//e.Graphics.DrawString("3",f,b,new PointF(GetPoint(600,500,4),235));
e.Graphics.DrawString("21T轴重货车重车",f,b,new PointF(m,330));
e.Graphics.DrawString("23T轴重货车空车",f,b,new PointF(m,360));
e.Graphics.DrawString("23T轴重货车重车",f,b,new PointF(m,390));
e.Graphics.DrawString("25T轴重货车空车",f,b,new PointF(m,420));
e.Graphics.DrawString("25T轴重货车重车",f,b,new PointF(m,450));
e.Graphics.DrawString("快速货物班列(18T轴重)空车",f,b,new PointF(GetPoint(500,70,13),480));
e.Graphics.DrawString("快速货物班列(18T轴重)空车",f,b,new PointF(GetPoint(500,70,13),510));
e.Graphics.DrawString("普通客车(120Km/h踏面制动)",f,b,new PointF(GetPoint(500,70,13),540));
e.Graphics.DrawString("新型客车(120Km/h盘型制动自重40-45T)",f,b,new PointF(GetPoint(500,70,20),570));
e.Graphics.DrawString("新型客车(120Km/h盘型制动自重40-45T)",f,b,new PointF(GetPoint(500,70,20),600));
e.Graphics.DrawString("新型客车(120Km/h盘型制动自重40-45T)",f,b,new PointF(GetPoint(500,70,20),630));
e.Graphics.DrawString("新型客车(120Km/h盘型制动自重40-45T)",f,b,new PointF(GetPoint(500,70,20),660));
e.Graphics.DrawString("新型客车(双层)",f,b,new PointF(GetPoint(500,70,7),690));
e.Graphics.DrawString("新型客车(140Km/h盘型制动自重40-45T)",f,b,new PointF(GetPoint(500,70,20),720));
e.Graphics.DrawString("新型客车(140Km/h盘型制动自重40-45T)",f,b,new PointF(GetPoint(500,70,20),750));
e.Graphics.DrawString("新型客车(140Km/h盘型制动自重40-45T)",f,b,new PointF(GetPoint(500,70,20),780));
e.Graphics.DrawString("新型客车(140Km/h盘型制动自重40-45T)",f,b,new PointF(GetPoint(500,70,20),810));
e.Graphics.DrawString("特快货物班列(160Km/h)",f,b,new PointF(GetPoint(500,70,10),840));
这是个初步代码,,本来用的是A4的纸张大小,准备改成A5然后把表格分成2个。但是始终在预览窗口不显示。打印还没测试。
#8
你没给e.Graphics定义大小啊
一开始是0x0的画布,你网上画东西,能看见才怪
本来是A4的,A4的时候能显示?
把之前的代码稍微改改就行了,不要全部推翻重来
一开始是0x0的画布,你网上画东西,能看见才怪
本来是A4的,A4的时候能显示?
把之前的代码稍微改改就行了,不要全部推翻重来
#9
在这里面定义大小似乎没效果,在别处定义了一个。有效果的。
如果不定义大小采用默认的话,A4确实能显示还能打印出来呢。呵呵。
要不,帮我弄个简单的代码,我慢点修改吧?
如果不定义大小采用默认的话,A4确实能显示还能打印出来呢。呵呵。
要不,帮我弄个简单的代码,我慢点修改吧?
#10
我今晚通宵夜班,明天来拿代码啊,兄弟,给我弄个代码出来啊,呵呵。A5大小的。双面打印,2个表格。呵呵~
#11
双面打印和单面打印没有很大的区别,要根据页面的大小来控制绘图的位置就可以了。
#12
页面大小的问题我一直在纠结,,又是像素,又是英寸,又是毫米。
能帮我弄段代码吗?
#14
你确定设置多页打印??
#15
2个表格,每一个表格打印在一面。
#1
双面打印是要设置打印机的。
#2
首先要确定你是怎么打印的
用的是panel.GreateGraph吗
用的是panel.GreateGraph吗
#3
我的意思是,,使用e.Graphics.DrawLine来画表格,2个独立的表格。每个表格单独一页。那么在预览的时候会是显示2 页吗?
#4
参考你在打印word的时候是怎么双面打印的
画的时候就要把高度画成2倍页面的高度
然后把第二个表格画在第二页的位置
打印的时候设置一下双面打印
预览的时候保证是都显示出来的,不可能让用户到显示器背面去看背面打印的表格是什么东东吧...
画的时候就要把高度画成2倍页面的高度
然后把第二个表格画在第二页的位置
打印的时候设置一下双面打印
预览的时候保证是都显示出来的,不可能让用户到显示器背面去看背面打印的表格是什么东东吧...
#5
画的时候就要把高度画成2倍页面的高度
然后把第二个表格画在第二页的位置
就是这2步我做不好,能给个简单的代码吗?
然后把第二个表格画在第二页的位置
就是这2步我做不好,能给个简单的代码吗?
#6
你画一个是怎么画的,画2个有什么区别吗?
画布高度设置一下,变成原来的2倍
画的坐标改一下,画第二页的时候y轴坐标全部加上1页的高度,不就得了
画布高度设置一下,变成原来的2倍
画的坐标改一下,画第二页的时候y轴坐标全部加上1页的高度,不就得了
#7
Font f = new Font("宋体",16);
Brush b = new SolidBrush(Color.Black);
e.Graphics.DrawString("制 动 效 能 证 明 书",f,b,new PointF(270,40));
f = new Font("宋体",10);
string str = string.Format("{0}",DateTime.Today.ToLongDateString());
e.Graphics.DrawString(str,f,b,new PointF(360,70));
e.Graphics.DrawString("江岸车辆段",f,b,new PointF(95,90));
e.Graphics.DrawString("宜昌东作业场",f,b,new PointF(240,90));
e.Graphics.DrawString("检车员:",f,b,new PointF(400,90));
e.Graphics.DrawString("司机签名:",f,b,new PointF(600,90));
Pen p = new Pen(Color.Black,1);
int a = 110;
for(int i = 0;i < 26;i++)
{
e.Graphics.DrawLine(p,70,a,740,a);
a += 30;
}
e.Graphics.DrawLine(p,70,110,70,860);//表格2边的竖线
e.Graphics.DrawLine(p,740,110,740,860);
e.Graphics.DrawString("车次",f,b,new PointF(95,120));
e.Graphics.DrawLine(p,140,110,140,140);
e.Graphics.DrawString("机车类型号码",f,b,new PointF(260,120));
e.Graphics.DrawLine(p,250,110,250,230);
e.Graphics.DrawLine(p,355,110,355,230);
e.Graphics.DrawString("牵引重量",f,b,new PointF(550,120));
e.Graphics.DrawLine(p,545,110,545,140);
e.Graphics.DrawLine(p,620,110,620,230);
e.Graphics.DrawString("编组",f,b,new PointF(150,150));
e.Graphics.DrawString("有效制动机辆数",f,b,new PointF(125,180));
e.Graphics.DrawString("截断塞门关闭辆数",f,b,new PointF(120,210));
e.Graphics.DrawString("无自动制动机辆数",f,b,new PointF(410,150));
e.Graphics.DrawString("换算高摩合成闸瓦总压力(KN)",f,b,new PointF(385,180));
e.Graphics.DrawString("每百吨平均高摩合成闸瓦压力(KN)",f,b,new PointF(375,210));
e.Graphics.DrawString("列车漏泄每分钟 Kpa",f,b,new PointF(350,240));
//想在这里分开
e.Graphics.DrawLine(p,500,260,500,860);//下部表格中间竖线
e.Graphics.DrawLine(p,600,260,600,860);
e.Graphics.DrawString("车辆类型",f,b,new PointF(GetPoint(500,70,4),270));
e.Graphics.DrawString("辆数",f,b,new PointF(GetPoint(600,500,2),270));
e.Graphics.DrawString("闸瓦压力(KN)",f,b,new PointF(GetPoint(740,600,6),270));
int m = GetPoint(500,70,8);
e.Graphics.DrawString("21T轴重货车空车",f,b,new PointF(m,300));
//e.Graphics.DrawString("3",f,b,new PointF(GetPoint(600,500,4),235));
e.Graphics.DrawString("21T轴重货车重车",f,b,new PointF(m,330));
e.Graphics.DrawString("23T轴重货车空车",f,b,new PointF(m,360));
e.Graphics.DrawString("23T轴重货车重车",f,b,new PointF(m,390));
e.Graphics.DrawString("25T轴重货车空车",f,b,new PointF(m,420));
e.Graphics.DrawString("25T轴重货车重车",f,b,new PointF(m,450));
e.Graphics.DrawString("快速货物班列(18T轴重)空车",f,b,new PointF(GetPoint(500,70,13),480));
e.Graphics.DrawString("快速货物班列(18T轴重)空车",f,b,new PointF(GetPoint(500,70,13),510));
e.Graphics.DrawString("普通客车(120Km/h踏面制动)",f,b,new PointF(GetPoint(500,70,13),540));
e.Graphics.DrawString("新型客车(120Km/h盘型制动自重40-45T)",f,b,new PointF(GetPoint(500,70,20),570));
e.Graphics.DrawString("新型客车(120Km/h盘型制动自重40-45T)",f,b,new PointF(GetPoint(500,70,20),600));
e.Graphics.DrawString("新型客车(120Km/h盘型制动自重40-45T)",f,b,new PointF(GetPoint(500,70,20),630));
e.Graphics.DrawString("新型客车(120Km/h盘型制动自重40-45T)",f,b,new PointF(GetPoint(500,70,20),660));
e.Graphics.DrawString("新型客车(双层)",f,b,new PointF(GetPoint(500,70,7),690));
e.Graphics.DrawString("新型客车(140Km/h盘型制动自重40-45T)",f,b,new PointF(GetPoint(500,70,20),720));
e.Graphics.DrawString("新型客车(140Km/h盘型制动自重40-45T)",f,b,new PointF(GetPoint(500,70,20),750));
e.Graphics.DrawString("新型客车(140Km/h盘型制动自重40-45T)",f,b,new PointF(GetPoint(500,70,20),780));
e.Graphics.DrawString("新型客车(140Km/h盘型制动自重40-45T)",f,b,new PointF(GetPoint(500,70,20),810));
e.Graphics.DrawString("特快货物班列(160Km/h)",f,b,new PointF(GetPoint(500,70,10),840));
这是个初步代码,,本来用的是A4的纸张大小,准备改成A5然后把表格分成2个。但是始终在预览窗口不显示。打印还没测试。
Brush b = new SolidBrush(Color.Black);
e.Graphics.DrawString("制 动 效 能 证 明 书",f,b,new PointF(270,40));
f = new Font("宋体",10);
string str = string.Format("{0}",DateTime.Today.ToLongDateString());
e.Graphics.DrawString(str,f,b,new PointF(360,70));
e.Graphics.DrawString("江岸车辆段",f,b,new PointF(95,90));
e.Graphics.DrawString("宜昌东作业场",f,b,new PointF(240,90));
e.Graphics.DrawString("检车员:",f,b,new PointF(400,90));
e.Graphics.DrawString("司机签名:",f,b,new PointF(600,90));
Pen p = new Pen(Color.Black,1);
int a = 110;
for(int i = 0;i < 26;i++)
{
e.Graphics.DrawLine(p,70,a,740,a);
a += 30;
}
e.Graphics.DrawLine(p,70,110,70,860);//表格2边的竖线
e.Graphics.DrawLine(p,740,110,740,860);
e.Graphics.DrawString("车次",f,b,new PointF(95,120));
e.Graphics.DrawLine(p,140,110,140,140);
e.Graphics.DrawString("机车类型号码",f,b,new PointF(260,120));
e.Graphics.DrawLine(p,250,110,250,230);
e.Graphics.DrawLine(p,355,110,355,230);
e.Graphics.DrawString("牵引重量",f,b,new PointF(550,120));
e.Graphics.DrawLine(p,545,110,545,140);
e.Graphics.DrawLine(p,620,110,620,230);
e.Graphics.DrawString("编组",f,b,new PointF(150,150));
e.Graphics.DrawString("有效制动机辆数",f,b,new PointF(125,180));
e.Graphics.DrawString("截断塞门关闭辆数",f,b,new PointF(120,210));
e.Graphics.DrawString("无自动制动机辆数",f,b,new PointF(410,150));
e.Graphics.DrawString("换算高摩合成闸瓦总压力(KN)",f,b,new PointF(385,180));
e.Graphics.DrawString("每百吨平均高摩合成闸瓦压力(KN)",f,b,new PointF(375,210));
e.Graphics.DrawString("列车漏泄每分钟 Kpa",f,b,new PointF(350,240));
//想在这里分开
e.Graphics.DrawLine(p,500,260,500,860);//下部表格中间竖线
e.Graphics.DrawLine(p,600,260,600,860);
e.Graphics.DrawString("车辆类型",f,b,new PointF(GetPoint(500,70,4),270));
e.Graphics.DrawString("辆数",f,b,new PointF(GetPoint(600,500,2),270));
e.Graphics.DrawString("闸瓦压力(KN)",f,b,new PointF(GetPoint(740,600,6),270));
int m = GetPoint(500,70,8);
e.Graphics.DrawString("21T轴重货车空车",f,b,new PointF(m,300));
//e.Graphics.DrawString("3",f,b,new PointF(GetPoint(600,500,4),235));
e.Graphics.DrawString("21T轴重货车重车",f,b,new PointF(m,330));
e.Graphics.DrawString("23T轴重货车空车",f,b,new PointF(m,360));
e.Graphics.DrawString("23T轴重货车重车",f,b,new PointF(m,390));
e.Graphics.DrawString("25T轴重货车空车",f,b,new PointF(m,420));
e.Graphics.DrawString("25T轴重货车重车",f,b,new PointF(m,450));
e.Graphics.DrawString("快速货物班列(18T轴重)空车",f,b,new PointF(GetPoint(500,70,13),480));
e.Graphics.DrawString("快速货物班列(18T轴重)空车",f,b,new PointF(GetPoint(500,70,13),510));
e.Graphics.DrawString("普通客车(120Km/h踏面制动)",f,b,new PointF(GetPoint(500,70,13),540));
e.Graphics.DrawString("新型客车(120Km/h盘型制动自重40-45T)",f,b,new PointF(GetPoint(500,70,20),570));
e.Graphics.DrawString("新型客车(120Km/h盘型制动自重40-45T)",f,b,new PointF(GetPoint(500,70,20),600));
e.Graphics.DrawString("新型客车(120Km/h盘型制动自重40-45T)",f,b,new PointF(GetPoint(500,70,20),630));
e.Graphics.DrawString("新型客车(120Km/h盘型制动自重40-45T)",f,b,new PointF(GetPoint(500,70,20),660));
e.Graphics.DrawString("新型客车(双层)",f,b,new PointF(GetPoint(500,70,7),690));
e.Graphics.DrawString("新型客车(140Km/h盘型制动自重40-45T)",f,b,new PointF(GetPoint(500,70,20),720));
e.Graphics.DrawString("新型客车(140Km/h盘型制动自重40-45T)",f,b,new PointF(GetPoint(500,70,20),750));
e.Graphics.DrawString("新型客车(140Km/h盘型制动自重40-45T)",f,b,new PointF(GetPoint(500,70,20),780));
e.Graphics.DrawString("新型客车(140Km/h盘型制动自重40-45T)",f,b,new PointF(GetPoint(500,70,20),810));
e.Graphics.DrawString("特快货物班列(160Km/h)",f,b,new PointF(GetPoint(500,70,10),840));
这是个初步代码,,本来用的是A4的纸张大小,准备改成A5然后把表格分成2个。但是始终在预览窗口不显示。打印还没测试。
#8
你没给e.Graphics定义大小啊
一开始是0x0的画布,你网上画东西,能看见才怪
本来是A4的,A4的时候能显示?
把之前的代码稍微改改就行了,不要全部推翻重来
一开始是0x0的画布,你网上画东西,能看见才怪
本来是A4的,A4的时候能显示?
把之前的代码稍微改改就行了,不要全部推翻重来
#9
在这里面定义大小似乎没效果,在别处定义了一个。有效果的。
如果不定义大小采用默认的话,A4确实能显示还能打印出来呢。呵呵。
要不,帮我弄个简单的代码,我慢点修改吧?
如果不定义大小采用默认的话,A4确实能显示还能打印出来呢。呵呵。
要不,帮我弄个简单的代码,我慢点修改吧?
#10
我今晚通宵夜班,明天来拿代码啊,兄弟,给我弄个代码出来啊,呵呵。A5大小的。双面打印,2个表格。呵呵~
#11
双面打印和单面打印没有很大的区别,要根据页面的大小来控制绘图的位置就可以了。
#12
页面大小的问题我一直在纠结,,又是像素,又是英寸,又是毫米。
能帮我弄段代码吗?
#13
确实很麻烦,单位可以用
PrinterUnitConvert来转换,代码可以求助搜索引擎,如果这也不会用的话没人能帮到你了。
#14
你确定设置多页打印??
#15
2个表格,每一个表格打印在一面。