Java Mailing List Archive

Mailing List
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JSP - A mailing list about Java Server Pages specification and reference
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Subject: Servlet : Session invalidate
Oracle Connection Pooling in 3 2 2
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Subject: Running a Simple JMS Example
Tomcat and webapplication specific java library path
Mapping in workers2 properties
org apache jasper JasperException
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
Value attribute of <html:checkbox
url string for connecting jboss to oracle
javax servlet ServletException: BeanUtils populate
5 0 18: Windows XP Pro vs Windows 2000
HTTP Status 404 The requested resource is not available
Subject: Re: PdfPCell No Wrap

Subject: Re: PdfPCell No Wrap

2007-11-01       - By Teodor Milcheliev


Bruno, you suggest to use setFixedHeight, but this only works if the text is
horizontally alignment LEFT, but I have the same problem with RIGHT alignment,
and if the text is split with spaces (which is normal), only the firs split is
shown, not the last.

Text: some dogs are black, others are red.

so now if lets say the with of the column is ENOUGH to catch only "other are
red" and if i use setNoWrap(false), and setFixedHeight(smth) the text which
will be showing in the cell will be "some dogs are", because the horizontal
alignment is set to Right

The thing is that i have succeeded to wrap text in normal situations with the
PdfContentByte.clip() method no matter the horizontal alignment, but in the
table cells is not that simple, and i'm trying to achieve the same thing. It
should look similar to the MS Excel cell wrapping - when there are 2 neighbour
cell and they are both fill with text, if the text of the left or right one is
wider then the with of the cell, it is "clapped" (not showing but is there).

-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -----
Original Message - found in the mailing list Archives
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -----

Hevn wrote:

I have a PdfPTable and I have set the widths for each column like this:
float[] widths2 = {0.14f, 0.17f, 0.14f, 0.31f, 0.08f, 0.09f, 0.07f};

Now I want the texts inside the cells to not be wrapped so I have this line:

What happens is the data overflows to the next cell.

That is the expected behaviour.
If on the other hand, you use setFixedHeight so that only
one line fits in the cell, then the content will not be wrapped
and the part that doesn't fit will be omitted.

Is there a way to unwrap the text inside the cell without overflowing?

If you are talking about changing the width of the cell dynamically
based on its content: No, this isn't possible.

-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
?????? ?? 30 000 ???????? ? ???-???????? ???????? ? WWW.MOBILIS.BG

-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -----
This email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>
__ ____ ____ ____ ____ ____ ____ ____ ____ ____
iText-questions mailing list
Buy the iText book:

©2008 - Jax Systems, LLC, U.S.A.