For empty lines instead of "" put "\n". 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Dittmar, Bernd
> Sent: Monday, January 31, 2005 9:20 AM
> To: '[email protected]'
> Subject: [iText-questions] blank lines on io needed
> 
> Hello,
> 
> by using this BufferedReader Code, all blank lines are thrown away in
> "doc.add(p)".
> How to eleminate this effect, any idea ?
> 
> --------------------------------------------------------------
> --------------
> -------------------------------------------------------------
> 
>       doc.open();
>             doc.add(t_logo);
>       Paragraph p;
>       java.io.BufferedReader  br  = new java.io.BufferedReader(in);   
> 
>       try     { 
>               while ((line=br.readLine()) != null){ 
>                       if (lncnt > j)
>                       {       
>                               doc.newPage();
>                               lncnt = 0;
>                               doc.add(t_logo);
>                       }       
>                       p = new Paragraph(new
> Phrase(lineSpacing,line,FontFactory.getFont(FontFactory.COURIE
> R, fntSize)));
>                       doc.add(p);
>                       lncnt++;        
>                       }
>                       br.close();
>               } catch (IOException e) { 
>                       System.out.println("IO Exception on 
> Buffered Read :"
> + e); 
>               }; 
>       
>       doc.close();
>       os.close();
> }
> 
> 
> 
> 
> 
> Mit freundlichen Gruessen/ Yours sincerely,   
> Bernd Dittmar 


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to