
13/10/2008, 13:14
|
 | | | Fecha de Ingreso: noviembre-2002 Ubicación: Puebla, México
Mensajes: 474
Antigüedad: 22 años, 4 meses Puntos: 0 | |
Respuesta: Generando PDF
<%@ page
language="java"
import="
com.lowagie.text.Document,
com.lowagie.text.pdf.PdfWriter,
com.lowagie.text.Paragraph,
java.io.FileOutputStream,
com.lowagie.text.pdf.PdfPTable,
com.lowagie.text.PageSize,
com.lowagie.text.pdf.PdfPCell,
com.lowagie.text.DocumentException
"
contentType="application/pdf; charset=ISO-8859-1"
............
............
............
response.setHeader("Content-Disposition","attachment; filename=reporte.pdf");
Ahora en lugar de poner: attachment pon: inline
............
//Document document = new Document();
Document document = new Document(PageSize.A4.rotate());
try{
PdfWriter.getInstance(document, response.getOutputStream());
document.open();
PdfPTable table = new PdfPTable(2);
table.addCell("1");
..............
...............
...............
Última edición por xlugo2002; 13/10/2008 a las 13:28 |