word打印问题 如何设置纸张范围(C#)
我是在CS文件中写HTML,并把HTML存为doc文件,如下:
System.Text.StringBuilder strBody = new System.Text.StringBuilder("");
strBody.Append("<html xmlns:o='urn:schemas-microsoft-com:office:office' xmlns:w='urn:schemas-microsoft-com:office:word'' 'xmlns='http://www.w3.org/TR/REC-html40'>");
//...
Response.AppendHeader("Content-Type", "application/msword");
Response.AppendHeader ("Content-disposition","attachment; filename=myword.doc");
Response.Write(strBody);
Response.End();
想问一下如何设置纸张范围,相当于打印页面 margin-top: 10px; margin-bottom: 0px;
是不是就是"@page Section1 { size:595.3pt 841.9pt; margin:18.0pt 90.0pt 0cm 90.0pt;..."
但是我写了好像没用的
补充:.NET技术 , ASP.NET