Alexandre wrote:
> Hi everyone,
>  
> I'm new to iText and I'd like to know if there's any way to convert a 
> txt file (that I already have) to pdf using iText.

Yes, but... what is a txt file?
No doubt, you are going to answer:
it's a string of characters stored on disk.
That's correct but not sufficient as answer,
because we need to know:

(1) Does the document have some kind of formatting?
If so, is the formatting done with tabs or spaces?

(2) There's no such thing as 'plain text'.
There's always an encoding involved defining how
the characters in your string translate to glyphs.
What is the encoding that was used for your text file?

The answer to your question could be very easy:
read the characters into a String, use that String
to create a Paragraph, add that paragraph to a Document.
Depending on your answer to (1) and (2), it could turn
out to be something very difficult too.
-- 
This answer is provided by 1T3XT BVBA

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
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