> For EACH line of the file I do the following
> BufferedReader buf_reader = new BufferedReader(new
> FileReader(in_file)); String line = null;
> document.add(new Paragraph(line));
>
> By doing this I lose my formatting (alignment) of the text, how do I
> solve this. Thank you very much for your help.

try this and the formating of the code is okay.

---------------------------------------------------------
// ...

BuffferedReader in = new BufferedReader(new 
FileReader("ReadFile.java"),32768);

String line;
while((line = in.readLine()) != null) {
        Paragraph para = new Paragraph(line, 
FontFactory.getFont(FontFactory.COURIER, 10, Font.NORMAL));
        document.add(para);
}
// ....
-----------------------------------------------------------

> regards
> Don S

by 
Michael




-------------------------------------------------------
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to