You probably have tabs or the lines are too long. Of course, saying that the
formatting in not the same as expected is not much help.

Best Regards,
Paulo Soares

> -----Original Message-----
> From: bruno [SMTP:[EMAIL PROTECTED]
> Sent: Monday, June 09, 2003 10:42
> To:   [EMAIL PROTECTED]
> Subject:      [iText-questions] Preformatting Text file--PDF
> 
> 
> Hi,
> 
> I am facing difficulties in converting a preformatted text file into PDF
> I am using a paragraph with fixed font size,inspite of this the formatting
> is not as exepected(not the same as in text file).
> 
> My code looks something like this.
> 
> PdfWriter.getInstance(document, new FileOutputStream("test.pdf"));
>                       document.open();
>                       InputStreamReader objInputStreamReader = new
> InputStreamReader(fi);
>                        BufferedReader objBufferedReader = new
> BufferedReader(objInputStreamReader);
>                        Font
> times=FontFactory.getFont(FontFactory.TIMES_ROMAN, 7,Font.NORMAL,
> new Color(0, 0, 255));
>                        while((data=objBufferedReader.readLine())!=null){
>                               document.add(new Paragraph(data, times));
>                        }
> 
> i am trying to read a plain text file.
> 
> I have even tried using the method of creating a font and making use of
> that..still the
> formatting is not proper.Kindly let me know if there is any other way that
> i
> can use to
> format my PDF.
> 
> Thanks & Regards
> Bruno
> Nucleus Software Solutions
> Ph: +65 62606878
> Mail:[EMAIL PROTECTED]
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
> thread debugger on the planet. Designed with thread debugging features
> you've never dreamed of, try TotalView 6 free at www.etnus.com.
> _______________________________________________
> iText-questions mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions


-------------------------------------------------------
This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to