还不错的open的pdf生成包,我用redhat EL5, tomcat5做到的试验
把下载来的 iTextAsian.jar 和 itext-2.0.4.jar放到tomcat的ROOT/WEB-INF/lib/下
然后用下面的jsp测试。就可以成功了输出日文的pdf了。
<%@
page import="java.io.*,
com.lowagie.text.*,
com.lowagie.text.pdf.*,
java.io.RandomAccessFile,
com.lowagie.text.Image"
%><%
//
// Template JSP file for iText
// by Tal Liron
//
page import="java.io.*,
com.lowagie.text.*,
com.lowagie.text.pdf.*,
java.io.RandomAccessFile,
com.lowagie.text.Image"
%><%
//
// Template JSP file for iText
// by Tal Liron
//
response.setContentType( "application/pdf" );
// step 1: creation of a document-object
Document document = new Document();
Document document = new Document();
// step 2:
// we create a writer that listens to the document
// and directs a PDF-stream to a temporary buffer
// we create a writer that listens to the document
// and directs a PDF-stream to a temporary buffer
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
PdfWriter.getInstance( document, buffer );
PdfWriter.getInstance( document, buffer );
// step 3: we