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

推荐订阅源

Engineering at Meta
Engineering at Meta
D
DataBreaches.Net
云风的 BLOG
云风的 BLOG
B
Blog
T
The Blog of Author Tim Ferriss
MyScale Blog
MyScale Blog
A
About on SuperTechFans
H
Heimdal Security Blog
AI
AI
F
Full Disclosure
The Last Watchdog
The Last Watchdog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
量子位
I
InfoQ
Martin Fowler
Martin Fowler
MongoDB | Blog
MongoDB | Blog
WordPress大学
WordPress大学
Hugging Face - Blog
Hugging Face - Blog
小众软件
小众软件
N
News and Events Feed by Topic
腾讯CDC
L
LINUX DO - 最新话题
Attack and Defense Labs
Attack and Defense Labs
Hacker News: Ask HN
Hacker News: Ask HN
Google Online Security Blog
Google Online Security Blog
博客园_首页
Forbes - Security
Forbes - Security
The Register - Security
The Register - Security
博客园 - 三生石上(FineUI控件)
PCI Perspectives
PCI Perspectives
V
Vulnerabilities – Threatpost
The Cloudflare Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Recent Commits to openclaw:main
Recent Commits to openclaw:main
L
LangChain Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
NISL@THU
NISL@THU
博客园 - Franky
Microsoft Security Blog
Microsoft Security Blog
J
Java Code Geeks
Simon Willison's Weblog
Simon Willison's Weblog
O
OpenAI News
H
Hacker News: Front Page
Project Zero
Project Zero
P
Privacy International News Feed
Cyberwarzone
Cyberwarzone
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
大猫的无限游戏
大猫的无限游戏
Application and Cybersecurity Blog
Application and Cybersecurity 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)    收藏  举报

刷新页面返回顶部