PDF-bean???是什么东西啊?有没有这样的代码呢?
iTextAsian.jar我知道,不知道有没有实现代码?
iTextAsian.jar我知道,不知道有没有实现代码?
解决方案 »
- 关于tomcat部署和优化和内部加载原理以及开发中常见的问题的讨论
- 页面上怎么取出Action里面封装的实体的值?
- 请教一下分页的思想
- jspa是什么技术?
- HttpServletRequest.getPatahInfo()怎么使用啊?
- 问一个结构(系统架构)问题
- java从mysql数据库中用sql语句实现不重复抽取数据?
- 在jsp中怎样用替换函数replace呢..
- 请问哪能下载到javabeans工具包
- js和jsp怎么传递参数?
- 查询数据库时。抛出下面的异常,请问是什么意思?
- 怎么在resin里设置个端口,比如一个是8080,另一个是8081,访问的时候分别用http://ip:8080和http://ip:8081来访问?急,在线等待。
page import="java.io.*,
com.lowagie.text.*,
com.lowagie.text.pdf.*"
%><%
//
// Template JSP file for iText
// by Tal Liron
//response.setContentType( "application/pdf" );// step 1: creation of a document-object
Document document = new Document();// step 2:
// we create a writer that listens to the document
// and directs a PDF-stream to a temporary bufferByteArrayOutputStream buffer = new ByteArrayOutputStream();
PdfWriter.getInstance( document, buffer );// step 3: we open the document
document.open();// step 4: we add a paragraph to the document
document.add(new Paragraph("Hello World"));// step 5: we close the document
document.close();// step 6: we output the writer as bytes to the response output
DataOutput output = new DataOutputStream( response.getOutputStream() );
byte[] bytes = buffer.toByteArray();
response.setContentLength(bytes.length);
for( int i = 0; i < bytes.length; i++ ) { output.writeByte( bytes[i] ); }
%>
---------
iText的