It can be done with:
split_char split = new split_char(){
public boolean isSplitCharacter(char c) {
return true;
}
};
String text = "Some long text";
Chunk ck = new Chunk(text, new Font(Font.HELVETICA, 24));
ck.setSplitCharacter(split);
Paragraph p = new Paragraph(24, ck);
document.add(p);
Best Regards,
Paulo Soares
----- Original Message -----
From: "Zhang, Lei (MRL)" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, January 03, 2003 16:25
Subject: [iText-questions] How to turn off the word wraping-up at the end of
a line in a pa ragraph?
> Hi, All:
> I want to convert a text file into a PDF file line by line. I
> wrote
> a simple Java program to do that, but I found iText always does word
> wraping-up at
> the end of a line if there is a long word at the end of a line. For
> example,
> Here is long line in a text file:
> I am xxxx yyyyy zzzzzz ... new-comer.
> iText will convert it into
> I am xxxx yyyyy zzzzzz ... new
> -comer.
> intead of
> I am xxxx yyyyy zzzzzz ... new-com ( The max
> length
> of a line)
> er ( which is what I want)
> Is there any way to turn off the word wrapping in iText package
> for
> the end of line with a big word?
> Thanks in advance.
>
> Lzhang
>
>
>
> ------------------------------------------------------------------------
> ------
> Notice: This e-mail message, together with any attachments, contains
> information of Merck & Co., Inc. (Whitehouse Station, New Jersey, USA)
> that may be confidential, proprietary copyrighted and/or legally
> privileged, and is intended solely for the use of the individual or
> entity named in this message. If you are not the intended recipient,
> and have received this message in error, please immediately return this
> by e-mail and then delete it.
>
> ========================================================================
> ======
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> iText-questions mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions