Re: [iText-questions] Tables and borders

2011-07-01 Thread hhn000
Yes, I do. and it's not very different from a factory method that copies the table.DefaultCell. I think I just need to read more :-). On Fri, Jul 1, 2011 at 08:59, 1T3XT BVBA wrote: > On 1/07/2011 8:50, hhn000 wrote: > > Yeah, that's what I ended up doing, I just feel it should be "cleaner" > >

Re: [iText-questions] Tables and borders

2011-07-01 Thread 1T3XT BVBA
On 1/07/2011 8:50, hhn000 wrote: > Yeah, that's what I ended up doing, I just feel it should be "cleaner" > or "smarter" (I really like the idea of setting borders, etc all in > one place, table.DefaultCell - now I have it in my own method, also > doable) Yes, but suppose you have a table with p

Re: [iText-questions] Tables and borders

2011-06-30 Thread hhn000
Yeah, that's what I ended up doing, I just feel it should be "cleaner" or "smarter" (I really like the idea of setting borders, etc all in one place, table.DefaultCell - now I have it in my own method, also doable), this is not meant in a bad way, this is a two platform library, which in it self ha

Re: [iText-questions] Tables and borders

2011-06-30 Thread Emiel Ackermann
In Java, I would instantiate the cell and disable the border of the cell with: cell.setBorder(Rectangle.NO_BORDER); before returning it within your method private PdfPCell NewCell(string text, FaxFonts font, int colspan) { return new PdfPCell(new Phrase(text, _fonts[(int)f

Re: [iText-questions] Tables and borders

2011-06-30 Thread hhn000
It seems that the problem is that I'm using new PDFPCell to create the new cell instead of using AddCell(Phrase), so it doesn't know about the table. But if I create the new cell from table.DefaultCell, doesn't it create a copy of the table? which gets thrown away when adding the cell with AddCell

Re: [iText-questions] Tables and borders

2011-06-30 Thread hhn000
Does anyone have any ideas about the problem? I have checked the source, but I can't see any difference between AddCell(string) and AddCell(new PDFPCell(new Phrase(string, font). If so, the only change is the Colspan, I haven't checked the generation from the table, but there doesn't seem to be any

Re: [iText-questions] Tables and borders

2011-06-29 Thread hhn000
Ok, I'm adding the rows using the following code: public void DrawBlock(ITextColumns block) { var table = new PdfPTable(block.Widths); table.WidthPercentage = 100f; table.DefaultCell.Border = Rectangle.NO_BORDER; AddRows(table, block

Re: [iText-questions] Tables and borders

2011-06-29 Thread 1T3XT BVBA
On 29/06/2011 9:24, hhn000 wrote: > > Does anyone have any idea of what I'm doing wrong? We don't have sufficient information to answer that question. 1. You say that you initially turned borders off and it worked. 2. Then you turned them on and it worked. 3. Now you turned them back off and it no

[iText-questions] Tables and borders

2011-06-29 Thread hhn000
Hi, I'm using iTetSharp 5.0.6. While creating some tables for a document (actually a list of items formatted using a PDFPTable), I initially turned off the borders on the tables' DefaultCell, then turned it back on, for debugging purposes, and now they stay on even though I set the table's Defaul