logo       

RE: Preformatting Text file--PDF: msg#00139

java.lib.itext.general

Subject: RE: Preformatting Text file--PDF

Sorry, I should have read the code better. You must use a fixed font like
courier.

Best Regards,
Paulo Soares

> -----Original Message-----
> From: bruno [SMTP:bruno@xxxxxxxxxxxxxxxxxxxxxx]
> Sent: Monday, June 09, 2003 11:22
> To: Paulo Soares; itext-questions@xxxxxxxxxxxxxxxxxxxxx
> Subject: RE: [iText-questions] Preformatting Text file--PDF
>
> Paulo Soares,
>
> Yes i do have lines with spaces and long lines.
>
> I am sorry for not being elaborate..i am attaching the source file and
> the PDF.
>
>
> -----Original Message-----
> From: Paulo Soares [mailto:psoares@xxxxxxxxxxx]
> Sent: Monday, June 09, 2003 6:15 PM
> To: 'bruno'; itext-questions@xxxxxxxxxxxxxxxxxxxxx
> Subject: RE: [iText-questions] Preformatting Text file--PDF
>
>
> 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:bruno@xxxxxxxxxxxxxxxxxxxxxx]
> > Sent: Monday, June 09, 2003 10:42
> > To: itext-questions@xxxxxxxxxxxxxxxxxxxxx
> > 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:bruno@xxxxxxxxxxxxxxxxxxxxxx
> >
> >
> >
> >
> > -------------------------------------------------------
> > 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
> > iText-questions@xxxxxxxxxxxxxxxxxxxxx
> > https://lists.sourceforge.net/lists/listinfo/itext-questions << File:
> ITCRSBRG1.txt >> << File: test.pdf >>


-------------------------------------------------------
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.


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise