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

推荐订阅源

L
LINUX DO - 最新话题
G
Google Developers Blog
J
Java Code Geeks
The GitHub Blog
The GitHub Blog
F
Full Disclosure
H
Help Net Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Vercel News
Vercel News
酷 壳 – CoolShell
酷 壳 – CoolShell
Recent Announcements
Recent Announcements
Help Net Security
Help Net Security
The Hacker News
The Hacker News
IT之家
IT之家
Y
Y Combinator Blog
Martin Fowler
Martin Fowler
L
Lohrmann on Cybersecurity
C
CERT Recently Published Vulnerability Notes
V
Visual Studio Blog
博客园 - 聂微东
Hacker News: Ask HN
Hacker News: Ask HN
H
Hacker News: Front Page
Know Your Adversary
Know Your Adversary
Security Latest
Security Latest
Security Archives - TechRepublic
Security Archives - TechRepublic
Simon Willison's Weblog
Simon Willison's Weblog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
T
Troy Hunt's Blog
Last Week in AI
Last Week in AI
Schneier on Security
Schneier on Security
N
News and Events Feed by Topic
博客园 - 【当耐特】
有赞技术团队
有赞技术团队
AWS News Blog
AWS News Blog
Blog — PlanetScale
Blog — PlanetScale
博客园_首页
Google DeepMind News
Google DeepMind News
Cloudbric
Cloudbric
N
News | PayPal Newsroom
A
About on SuperTechFans
S
Schneier on Security
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Hugging Face - Blog
Hugging Face - Blog
M
MIT News - Artificial intelligence
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
雷峰网
雷峰网
T
The Exploit Database - CXSecurity.com
罗磊的独立博客
K
Kaspersky official blog
The Cloudflare Blog
I
Intezer

博客园 - 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)    收藏  举报

刷新页面返回顶部