如:
本来的
<td width=\"15\" align=\"left\" fontname=\"宋体\" fontsize=\"9\" fontcolor=\"Black\" b=\"false\" i=\"false\" u=\"false\" bgcolor=\"White\" Circle=\"NFILL\">0</td>");
已经可以改成
<td width=\"15\" >0</td>");
但这里面的width=\"15\"
我想在打印中设成百分比那个RemotePrint里面要改哪里
本来的
<td width=\"15\" align=\"left\" fontname=\"宋体\" fontsize=\"9\" fontcolor=\"Black\" b=\"false\" i=\"false\" u=\"false\" bgcolor=\"White\" Circle=\"NFILL\">0</td>");
已经可以改成
<td width=\"15\" >0</td>");
但这里面的width=\"15\"
我想在打印中设成百分比那个RemotePrint里面要改哪里
解决方案 »
- Repeater绑定10条数据字段是图片和标题,显示时第一行显示图片和标题.后面的只显示标题
- C#导出数据到Excel过程中遇到的异常来自 HRESULT:0x800A03EC
- 一个关于多条件查询的问题 0_0_0_0_0_0_0_0_2.aspx
- GrideView 的编辑模板嵌入DropDownList,怎么在RowDataBound事件中找不到控件?
- 使用AspNetpager分页后自定义控件的信息没有了
- 如何登陆到其他系统中
- 组建.net学习社区,大家顶一下啊~~~~
- 未预编译文件错误,求教高手
- 求一个日期时间的正则表达式。谢谢!
- 请问大家如何捕捉异常信息
- |M| 幕白兄 关于打印控件加多一个valign方法
- 怎么获取当前页面的名称 比如index.aspx (在线等..)
而程序里面的getData.aspx是生成一个xml文件
把xml文件发送给RemotePrint他就根据这个xml里面的东西画出打印的页面
我想添加一个valing做找不到相应的属性
private void DrawTR(int x, int y, XmlNode tr, Pen pen, Graphics g)
{
int height = int.Parse(tr.Attributes["height"].InnerText);
int width;
//g.DrawLine(pen, x, y, x, y + height);//画左端线条
foreach(XmlNode td in tr)
{
string swidth = td.Attributes["width"].InnerText;
if (swidth.Substring(swidth.Length - 1, 1) == "%")
{
swidth = swidth.Substring(0, swidth.Length - 1); width = Convert.ToInt32(Convert.ToInt32(swidth) * this.GrphicWidth / 100); //g.DrawString("宽度:"+this.GrphicWidth, new Font("宋体", 12), new SolidBrush(Color.Green),new RectangleF(0,0,100,100));
}
else
{
width = int.Parse(td.Attributes["width"].InnerText);
}
DrawTD(x, y, width, height, td, g);
//g.DrawLine(pen, x + width, y, x + width, y + height);//右线
//g.DrawLine(pen, x, y + height, x + width, y + height);//底线
x += width;
}
}
{
Graphics g = e.Graphics;
bool HasMorePages = false;
PrintElement printElement = null;
foreach(XmlNode node in doc["root"]["reporttable"].ChildNodes)
{
printElement = Parser.CreateElement(node,this.printDocument1.DefaultPageSettings.Bounds.Width);//调用解析器生成相应的对象
try
{
HasMorePages = printElement.Draw(g);//是否需要分页
}
catch(Exception ex)
{
this.label1.Text = ex.Message;
}
} //在页底中间输出页码
// Font font = new Font("黑体", 12.0f);
// Brush brush = new SolidBrush(Color.Black);
// g.DrawString("第" + Pages.ToString() + " 页",
// font,brush,e.MarginBounds.Width / 2 + e.MarginBounds.Left - 30,
// e.PageBounds.Height - 60); if(HasMorePages)
{
Pages++;
}
e.HasMorePages = HasMorePages; }
{
PrintElement printElement = null;
switch(element.Name)
{
case "text":
printElement = new Text(element);
break;
case "table":
printElement = new Table(element, iWidth);
break;
default:
printElement = new PrintElement();
break;
}
return printElement;
}
public Table(XmlNode Table,int iwdth)
{
table = Table;
this.GrphicWidth = iwdth;
}
--------------------------------------
Response.Write("<tr height=\"20\">");
Response.Write("<td width='20%'> 单日成人票</td>");
Response.Write("<td width='50%' >0</td>");
Response.Write("<td width=\"15\" >1</td>");
Response.Write("<td width=\"15\" >2</td>");
Response.Write("<td width=\"15\" >3</td>");
Response.Write("<td width=\"15\" >4</td>");
Response.Write("<td width=\"95\" >5</td>");
我这样已经可以正确了上面的“说明”
是要我注意什么
谢谢