You had the right guessing, thanks... so the code (for general information) 
finished like:
public void encodeBegin(FacesContext contexto){
   log.debug("Generando PDF");
   this.setDataTableFields();
   Font font8 = FontFactory.getFont(FontFactory.HELVETICA, 32);
   ResponseFacade outFacade = 
(ResponseFacade)(contexto.getExternalContext().getResponse());
   Document document = new Document(PageSize.LETTER,36, 72, 108, 180);
   ByteArrayOutputStream output = new ByteArrayOutputStream();
   try{
      OutputStream out = outFacade.getOutputStream();
      PdfWriter writer = PdfWriter.getInstance(document, output);
     writer.setFooter(new HeaderFooter(new Paragraph("Suprema Corte de Justicia 
de La Nación"),true)); 
     document.addAuthor("Suprema Corte de justicia de la Nación");
     document.addCreationDate();
     document.open();
    document.add(new Paragraph(new Phrase("Resultado de la Búsqueda", font8)));
    if(this.getShowRowNumber()){
        this.setTable(new PdfPTable(this.getFieldsArray().length+1));
    }else{
        this.setTable(new PdfPTable(this.getFieldsArray().length+2));
    }
    this.getTable().getDefaultCell().setBorder(0);
    
this.getTable().getDefaultCell().setHorizontalAlignment(PdfPCell.ALIGN_JUSTIFIED);
    this.printHeaders(this.getTable());
    this.printRows(this.getTable());
    document.add(this.getTable());
    document.close();
    output.writeTo(out);
    output.flush();
    out.close();
   }catch(Exception e){
        log.debug("Error generando la tabla, método encodeBegin del PDF:");
        e.printStackTrace();
   }
}

Greetings

----- Mensaje original ----
De: Bruno Lowagie <[EMAIL PROTECTED]>
Para: Post all your questions about iText here 
<[email protected]>
Enviado: martes, 8 de enero, 2008 2:46:38
Asunto: Re: [iText-questions] Blank pages only

Carlos de Luna Saenz wrote:<!-- DIV {margin:0px;} -->
> the result of this is a 714 pages document with blank pages...
> am i missing something?
If I had to guess, I'd say your JSP setup is not binary safe.
You can test this by writing the PDF to a file on the server:
the file will be OK overthere. I think your JSP treats the
binary file as plain ASCII.
br,
Bruno


      
____________________________________________________________________________________
¡Capacidad ilimitada de almacenamiento en tu correo!
No te preocupes más por el espacio de tu cuenta con Correo Yahoo!:              
        
http://correo.espanol.yahoo.com/
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to