惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
C
Check Point Blog
GbyAI
GbyAI
Jina AI
Jina AI
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - 司徒正美
Hacker News - Newest:
Hacker News - Newest: "LLM"
V2EX - 技术
V2EX - 技术
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
F
Full Disclosure
S
Secure Thoughts
WordPress大学
WordPress大学
博客园 - Franky
N
News and Events Feed by Topic
雷峰网
雷峰网
www.infosecurity-magazine.com
www.infosecurity-magazine.com
H
Hacker News: Front Page
N
Netflix TechBlog - Medium
Forbes - Security
Forbes - Security
TaoSecurity Blog
TaoSecurity Blog
C
CERT Recently Published Vulnerability Notes
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Vercel News
Vercel News
T
The Blog of Author Tim Ferriss
MyScale Blog
MyScale Blog
Security Latest
Security Latest
Attack and Defense Labs
Attack and Defense Labs
The Register - Security
The Register - Security
Spread Privacy
Spread Privacy
H
Help Net Security
宝玉的分享
宝玉的分享
L
LangChain Blog
MongoDB | Blog
MongoDB | Blog
I
Intezer
Schneier on Security
Schneier on Security
Latest news
Latest news
Y
Y Combinator Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
I
InfoQ
A
About on SuperTechFans
T
Tor Project blog
Microsoft Security Blog
Microsoft Security Blog
M
MIT News - Artificial intelligence
Google DeepMind News
Google DeepMind News
Microsoft Azure Blog
Microsoft Azure Blog
T
Threat Research - Cisco Blogs
S
Schneier on Security
Cisco Talos Blog
Cisco Talos Blog
H
Heimdal Security Blog

博客园 - xwy.net

玩转ubuntu8.04,记录下碰到的问题,及解决 解决div里放table自适应的问题 temp - xwy.net - 博客园 hibernate annotation+spring 级联更新问题解决 sitemesh,html乱码问题解决不了,难道一定要用jsp - xwy.net - 博客园 注意啦,Struts 2.1.6跟sitemesh-2.4.1不兼容 struts2+freemarker+sitemesh乱码,解决了 firefox3关闭缓存的办法 jQuery.Autocomplete(新版本)自动完成插件在中文应用时的BUG修正 - xwy.net - 博客园 搞定URL中文编码 - xwy.net - 博客园 关于Content-Length cxfc采用UsernameToken时的PasswordDigest问题 centos5.1远程升级ssh到5.0p1 asm冲突的问题,找了半天 莫名其妙的网络问题,原来是KB951748惹得祸 RHCS环境中oracle监听的问题 自制百香果汁(图) svn的RA layer request failed问题 MySQL的AUTO_INCREMENT
解决jasperreport生成html分页和打印问题
xwy.net · 2008-06-27 · via 博客园 - xwy.net

ie打印第一页时候常常会垂直居中,用下面的代码分页也正常了

String HTML_HEADER = "";
    HTML_HEADER 
= HTML_HEADER + "<html>\n";
    HTML_HEADER 
= HTML_HEADER + "<head>\n";
    HTML_HEADER 
= HTML_HEADER + "<title></title>\n";
    HTML_HEADER 
= HTML_HEADER
            
+ "    <meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\"/>\n";
    HTML_HEADER 
= HTML_HEADER
            
+ "    <meta http-equiv=\"imagetoolbar\" content=\"no\">\n";
    HTML_HEADER 
= HTML_HEADER + "    <style type=\"text/css\">\n";
    HTML_HEADER 
= HTML_HEADER + "    a{text-decoration:none}\n";
    HTML_HEADER 
= HTML_HEADER + "    </style>\n";
    HTML_HEADER 
= HTML_HEADER + "    </head>\n";
    HTML_HEADER 
= HTML_HEADER
            
+ "    <body text=\"#000000\" link=\"#000000\" alink=\"#000000\" vlink=\"#000000\">\n";
    HTML_HEADER 
= HTML_HEADER
            
+ "    <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n";
    HTML_HEADER 
= HTML_HEADER
            
+ "    <tr><td width=\"50%\">&nbsp;</td><td align=\"center\" valign=\"top\">\n";
    exporter.setParameter(JRHtmlExporterParameter.HTML_HEADER,
            HTML_HEADER);

    String HTML_FOOTER 
= "";
    HTML_FOOTER 
+= "</td><td width=\"50%\">&nbsp;</td></tr>\n";
    HTML_FOOTER 
+= "</table>\n";
    HTML_FOOTER 
+= "</body>\n";
    HTML_FOOTER 
+= "</html>\n";
    exporter.setParameter(JRHtmlExporterParameter.HTML_FOOTER,
            HTML_FOOTER);

posted @ 2008-06-27 18:05  xwy.net  阅读(2839)  评论(1)    收藏  举报

刷新页面返回顶部