Re: [iText-questions] linebreaks in tablecells

2002-03-28 Thread Gerd Mueller

On Thu, 28 Mar 2002 09:37:23 +0100
Bruno Lowagie <[EMAIL PROTECTED]> wrote:

> Quoting Gerd Mueller <[EMAIL PROTECTED]>:
> 
> > Although it helps to avoid the gaps between the lines in the "anmerkung"
> > field
> > it causes other problems as you may see in the screenshot.
> 
> So I see, but I think you're very close to a solution now.
> What version of iText are you using? I know there was a bug
> in some earlier version that caused this kind of problems.

Version 0.8.9
 
> Also can you send me some code:
> creation of the table: cellpadding and cellspacing

Table t = new Table( 4 );
t.setBorderWidth( Table.NO_BORDER );
t.setAlignment( Table.ALIGN_LEFT );
t.setCellpadding( 2 );
t.setWidth( 100 );
int[] headerWidths = {30, 25, 25, 20};
t.setWidths( headerWidths );

> creation of the cell + how did you add the data.

Cell c = new Cell( new Chunk( SS( "the text\n with \n linebeaks" ), aFont ) );
c.setHorizontalAlignment( Element.ALIGN_LEFT );
c.setVerticalAlignment( Element.ALIGN_MIDDLE );
c.setBorderWidth( 1 );
c.setLeading( 5.0f );


Best Regards,
Gerd

__
Gerd Mueller  [EMAIL PROTECTED] 
SMB GmbHhttp://www.smb-tec.com

___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions



Re: [iText-questions] linebreaks in tablecells

2002-03-27 Thread Gerd Mueller

On Wed, 27 Mar 2002 13:09:17 +0100
Bruno Lowagie <[EMAIL PROTECTED]> wrote:

> Quoting Gerd Mueller <[EMAIL PROTECTED]>:
> 
> > You can see the result in the screenshot (taken from AcrobatReader 4 on
> > Linux)
> 
> I didn't receive the attachment.
> Could be the mailing list is preventing attachments.
>

Sorry, I didn't attachet it at all ;-)

> > in the cell with the text 'anmerkung ...'. It seems that each '\n' causes 
> > two linebreaks instead of only one. Or is there any layout property, that 
> > I can set to avoid this ?
> 
> Are you sure there are two linebreaks in the PDF?
> Maybe the leading of the Cell is to big (leading = the
> space between two lines).


__
Gerd Mueller  [EMAIL PROTECTED] 
SMB GmbHhttp://www.smb-tec.com



screenshot.gif
Description: GIF image


RE: [iText-questions] linebreaks in tablecells

2002-03-27 Thread Bruno Lowagie

Quoting "Joachim F. Petzold" <[EMAIL PROTECTED]>:

> PdfPCell.setNoWrap(boolean)  works for PDF generation.
> If set to "true" it suppresses wrapping, even if as a result
> the cell content collides with the adjacent cell or flows
> beyond the table's left margin.
> 
> I am not sure about Cell.setNoWrap() since I mostly work with
> PdfPTables.

OK, people really should mention if they use Table or PdfPTable.
(Or we should axe Table as Paulo would say ;-)

___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions



RE: [iText-questions] linebreaks in tablecells

2002-03-27 Thread Joachim F. Petzold

PdfPCell.setNoWrap(boolean)  works for PDF generation.
If set to "true" it suppresses wrapping, even if as a result
the cell content collides with the adjacent cell or flows
beyond the table's left margin.

I am not sure about Cell.setNoWrap() since I mostly work with
PdfPTables.


Regards,
Joachim Petzold

> -Original Message-
> From: Bruno Lowagie [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, March 27, 2002 7:21 AM
> To: Joachim F. Petzold
> Cc: Gerd Mueller; iText Mailing List
> Subject: RE: [iText-questions] linebreaks in tablecells
> 
> 
> Quoting "Joachim F. Petzold" <[EMAIL PROTECTED]>:
> 
> > Cell.setNoWrap(true)
> 
> This method is only implemented for HTML generation,
> it doesn't work for PDF (or does it???)
> 


___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions



RE: [iText-questions] linebreaks in tablecells

2002-03-27 Thread Bruno Lowagie

Quoting "Joachim F. Petzold" <[EMAIL PROTECTED]>:

> Cell.setNoWrap(true)

This method is only implemented for HTML generation,
it doesn't work for PDF (or does it???)

___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions



RE: [iText-questions] linebreaks in tablecells

2002-03-27 Thread Joachim F. Petzold

Gerd,

note sure if the following will solve your problem:
if you enter all line breaks manually,
you should set Cell.setNoWrap(true), so that
line-breaks inserted by the automatic wrapping
don't interfere with your manual line breaks.

Regards,
Joachim Petzold


> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Gerd
> Mueller
> Sent: Wednesday, March 27, 2002 6:53 AM
> To: [EMAIL PROTECTED]
> Subject: [iText-questions] linebreaks in tablecells
>
>
>
> Hi,
>
> I've got a problem with linebreaks in table cell in a PDF
> document. I create a
> simple tablecell by using
>
> new com.lowagie.text.Cell( String content );
>
> The content text contains new lines, e.g. '\n', but not '\r\n'.
> You can see the result in the screenshot (taken from
> AcrobatReader 4 on Linux)
> in the cell with the text 'anmerkung ...'. It seems that each '\n' causes
> two linebreaks instead of only one. Or is there any layout property, that
> I can set to avoid this ?
>
> Best Regards,
> Gerd
>
> __
> 
> Gerd Mueller
> [EMAIL PROTECTED]
> SMB GmbH
> http://www.smb-tec.com
>
> ___
> iText-questions mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>



___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions



Re: [iText-questions] linebreaks in tablecells

2002-03-27 Thread Bruno Lowagie

Quoting Gerd Mueller <[EMAIL PROTECTED]>:

> You can see the result in the screenshot (taken from AcrobatReader 4 on
> Linux)

I didn't receive the attachment.
Could be the mailing list is preventing attachments.

> in the cell with the text 'anmerkung ...'. It seems that each '\n' causes 
> two linebreaks instead of only one. Or is there any layout property, that 
> I can set to avoid this ?

Are you sure there are two linebreaks in the PDF?
Maybe the leading of the Cell is to big (leading = the
space between two lines).

___
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions