易截截图软件、单文件、免安装、纯绿色、仅160KB

jsp中Word打印

在jsp中引用response.setContentType("application/msword");,打开的页面就是word样式。
1、实现word横打:
<style>
@page
 {mso-page-border-surround-header:no;
 mso-page-border-surround-footer:no;}
@page Section1
 {size:841.9pt 595.3pt;//纸张的大小
 mso-page-orientation:landscape;
 margin:89.85pt 72.0pt 89.85pt 72.0pt;
 mso-header-margin:42.55pt;//页眉
 mso-footer-margin:49.6pt;//页脚
 mso-paper-source:0;
 layout-grid:15.6pt;}
div.Section1
 {page:Section1;}
</style>
使用<div class="Section1"></div>即可实现
2、自定义纸张大小纵打
@page
 {mso-page-border-surround-header:no;
 mso-page-border-surround-footer:no;}
@page Section1
 {size: 21.5cm 14.00cm;
 margin-left:0.5cm;//左页边距
 margin-right:0.5cm;//右页边距
 margin-top:0.5cm;//上页边距
 margin-bottom:0.5cm//下页边距;
 mso-header-margin:0.5cm;
 mso-footer-margin:0.5cm;
 layout-grid:0.5pt;}
div.Section1
 {page:Section1;}
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/zhangjunfangkaixin/archive/2009/07/16/4353551.aspx


相关文档:

Jsp 引用 css 样式文件无效的问题解决

修改了css 样式文件后,重新浏览该jsp页面,发现新修改的样式没有生效。总以为是项目缓存所引起的,于是清理所有项目,重新构建项目。不行。执行server 的 publish 还是不行。用window 的搜索功能发现除了 WebContent 目录有该 css 文件外,.metadata\.plugins\org.eclipse.wst.server.core\tmp1\webapps\ 目录下也存在该 c ......

如何解决 jsp 中url传值的中文乱码问题

在jsp中,如果在url中传递中文时会出现乱码,在网上关于这一问题的解决方法五花八门,但都不是很奏效!其实解决方法非常简单: 第一步:编码(以传递的参数为str为例) 在传递数据前将str进行编码Java.net.URLEncoder.encode(str) 第二步:解码 在获取数据端将得到的数据进行解码 new String(str.getBytes("ISO8859_1")) ......

当jsp和servlet出现乱码问题后的解决方案

上网看了好多,就这一篇解决了我的问题,现转,我的项目用的是MVC架构,有统一的控制器,转向不同的Action,上网看了好多,大部分是说加入request.setCharacterEncoding("utf-8");但是经过我的试验,这只有在利用JSP处理表单传输数据时才可用,在我的东西中无法解决,后来发现还是用FilterChain好,呵呵,重点还是在request ......

<%@include 和

   相同点:
   如果被包含进去的文件里面有css文件的话,包含的页面会受到被包含文件的css样式的影响!
   不同点:
<%@ include
file="date.jsp" %>
<jsp:include
page="date.jsp" flush="true"/>
include
编译指令是在
JSP
程序 ......

JSP中获取当前绝对路径

错误: 
String realPath  =   " http:// "   +  request.getServerName()  +   " : "   +  request.getServerPort()  +  request.getContextPath();
String realPath  =   " http:// "   +  request.getSer ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号