Thanks, for clarifying variable borders.

But, if a normal border will paint the border in the cell boundaries,
what is causing the first example I posted at the beginning of this
thread to paint the border outside the cell boundary? Maybe I don't
understand the boundary of the cell, but it doesn't seem to be working.

-Mitch

-----Original Message-----
From: Paulo Soares [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 02, 2005 8:24 AM
To: Mitch Freed; [email protected]
Subject: RE: [iText-questions] PdfPTable Cell Borders

Variable borders paint the border inside the cell whereas normal borders
paint the border in the cell boundaries. Let's say we have a 1 pt border
and two cell, one on top of the other that we'll call cell1 for the top
one and cell2 for the bottom one. With variable borders the 1 pt border
will be inside each cell and in the place that the two cells join
there's 1 pt border for cell1 and 1 pt border for cell2 with the result
of a visible 2 pt border. With normal borders the border of cell2 will
be on top of the border of cell1 with the result that the visible width
will be 1 pt.

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> Mitch Freed
> Sent: Wednesday, November 02, 2005 3:08 PM
> To: [email protected]
> Subject: RE: [iText-questions] PdfPTable Cell Borders
> 
> I'm not sure if I am using useVariableBorders() correctly, or what, 
> but if I set useVariableBorders for the cell with the different border

> width, the outside of the table doesn't line up with the cell (see 
> cell_variableborders.pdf). If I turn on variableBorders for all the 
> cells, I get double borrder on the cells (see 
> all_variableborders.pdf). Is there something else that needs to happen

> to get the borders to work with a cell with a different border like 
> this?
>  
> ________________________________
> 
>  
> [C#]
>  
> PdfPTable table = new PdfPTable(new float[] {1f,1f,1f}); 
> table.DefaultCell.UseAscender = true;
> table.DefaultCell.UseDescender = true;   
> table.DefaultCell.UseVariableBorders = true;
>  
> PdfPCell header = new PdfPCell();
> header.AddElement(new Chunk("header with colspan 3")); header.Colspan 
> = 3; header.UseAscender = true; header.UseDescender = true; 
> header.UseVariableBorders = true; table.AddCell(header);
>  
> PdfPCell c = new PdfPCell();
> c.AddElement(new Chunk("1.1"));   
> c.BorderWidth = 10f;
> c.UseBorderPadding = true;
> c.UseAscender = true;
> c.UseDescender = true;
> c.UseVariableBorders = true;
> table.AddCell(c);
>  
> table.AddCell("2.1");
> table.AddCell("3.1");
> table.AddCell("1.2");
> table.AddCell("2.2");
> table.AddCell("3.2");
>  
> ________________________________
> 
>  
> Thanks,
>  
> -Mitch
>  
> 
> ________________________________
> 
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> Mitch Freed
> Sent: Tuesday, November 01, 2005 1:33 PM
> To: [email protected]
> Subject: RE: [iText-questions] PdfPTable Cell Borders
> 
> 
> Just found it -- useVariableBorders(bool)
>  
> Thanks,
>  
> -Mitch
>  
> 
> ________________________________
> 
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> Mitch Freed
> Sent: Tuesday, November 01, 2005 1:17 PM
> To: [email protected]
> Subject: [iText-questions] PdfPTable Cell Borders
> 
> 
> I have a table(PdfPTable) using a border and have specified one cell 
> to use a large border width. I have the BorderPadding set to True 
> (setUseBorderPadding), which sets the padding to include the border 
> width -- that's working great. The border of the cell however, moves 
> into and outside of the table's area (it's an outside cell in this 
> case). Is there anyway to tell the table or cell to keep the border 
> within the cell? I am attaching the example pdf and code.
>  
> ________________________________
> 
>  
> [C#]
>  
> PdfPTable table = new PdfPTable(new float[] {1f,1f,1f}); 
> table.DefaultCell.UseAscender = true; table.DefaultCell.UseDescender =

> true;
>  
> PdfPCell header = new PdfPCell();
> header.AddElement(new Chunk("header with colspan 3")); header.Colspan 
> = 3; header.UseAscender = true; header.UseDescender = true; 
> table.AddCell(header);
>  
> PdfPCell c = new PdfPCell();
> c.AddElement(new Chunk("1.1"));
> c.BorderWidth = 10f;
> c.UseBorderPadding = true;
> c.UseAscender = true;
> c.UseDescender = true;
> table.AddCell(c);
>  
> table.AddCell("2.1");
> table.AddCell("3.1");
> table.AddCell("1.2");
> table.AddCell("2.2");
> table.AddCell("3.2");
>  
> ________________________________
> 
>  
> Thanks,
> Mitch Freed
> [EMAIL PROTECTED]
> 


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to