windows下PDF文档的开发包

源代码在线查看: hello.jsp

软件大小: 3295 K
上传用户: a1a1J0
关键词: windows 文档 开发包
下载地址: 免注册下载 普通下载 VIP

相关代码

												   /* $Id: hello.jsp,v 1.7.2.1 2003/09/03 12:24:26 rp Exp $				    *				    * hello.jsp				    */								    int font;				    pdflib p;				    byte[] buf;				    ServletOutputStream output;								    p = new pdflib();								    // Generate a PDF in memory; insert a file name to create PDF on disk				    if (p.open_file("") == -1) {				        System.err.println("Error: " + p.get_errmsg());					System.exit(1);				    }								    p.set_info("Creator", "hello.jsp");				    p.set_info("Author", "Rainer Ploeckl");				    p.set_info("Title", "Hello world (Java/JSP)!");								    p.begin_page(595, 842);		/* start a new page     */								    font = p.load_font("Helvetica-Bold", "winansi", "");								    p.setfont(font, 18);								    p.set_text_pos(50, 700);				    p.show("Hello world!");				    p.continue_text("(says Java/JSP)");				    p.end_page();			/* close page           */								    p.close();				/* close PDF document   */								    buf = p.get_buffer();								    response.setContentType("application/pdf");				    response.setContentLength(buf.length);								    output = response.getOutputStream();				    output.write(buf);				    output.close();				%>							

相关资源