关于iReport 导出文件的问题

1、在运行时,不能导出到excel 文件

A:请确保 apache 的poi库(poi-3.0.1-FINAL-20070705.jar或更高)在你的 web-info/lib 路径下。

 

2、用iRepor如何导出泰文的pdf(下面以iReport3.0为例)

1)在Windows的字体目录下,找到 ANGSA.TTF 字体,拷贝到 iReport 的 fonts目录下

2)在iReport 菜单中选择,“选项-->类路径-->添加文件夹”选择iReport的 fonts目录(如H:\jasperReports\ireport300\fonts),保存类路径

3)选择“选项-->重新加载字体”

4)设置你报表的 静态泰文文本或 文本字段,字体选“Angsana New”, PDF字段选“Angsana New(ANGSA.TTF)”,PDF嵌入打勾,PDF编码选“Identity-H (Unicode with horizontal writing)”

5)这样就在 iRepot设计预览中,导出的PDF文件,可以看到泰文了

6)如果在运行时(即产品发布)预览显示很正常,但导出的PDF文件一片空白,而且Eclipse提示以下错误信息,说明在 web-inf/lib 路径下找不到相应的字体文件,需要把相应的字体文件打包成jar(如jar cvf xxFont.jar ANGSA.TTF),并部署到 web-inf/lib 目录下。

Exception in thread "AWT-EventQueue-0" net.sf.jasperreports.engine.JRRuntimeException: Could not load the following font :
pdfFontName   : ANGSA.TTF
pdfEncoding   : Identity-H
isPdfEmbedded : true

 

参考:

http://www.adempiere.com/Using_Jasper_Report_Form_in_place_of_Standard_Forms#Deploying_Jasper_Report_for_Production_.28in_regards_to_Thai_fonts.29

http://www.adempiere.com/ADempiere/Compiere_JasperReports_Integration_HowTo#Problems_exporting_to_PDF

Could not load the following font :pdfFontName   : STSong-Light问题

http://blog.sina.com.cn/s/blog_4b08012601000c5z.html

http://hi.baidu.com/huyangtree/blog/item/2038d0d9ebbeac6bd1164e23.html

http://www.diybl.com/course/3_program/java/javajs/20100719/453225.html 

posted @ 2011-10-19 11:57  finema  阅读(1208)  评论(0编辑  收藏  举报