I have created a Name Tag printing function which is a table (A - PDFTable)
for each name tag and a table (B - PDFCellTable) with the tag contents.
I addCell the B Cell into Table A.
B. Cells have border set to 0, so no lines within the name tag, but the
border appears around each name tag how do I eliminate that?
In other words the borders seem to be around the cell of the outer
table(PDFtable)
Code:
While rs.Read()
AttendeesListed += 1
Dim PDFCellTable As PdfPTable = New PdfPTable(1)
'total height = 180
'Name Side, Row 2 is Name (Flipped)
PDFCell.MinimumHeight = 100
PDFCell.HorizontalAlignment = 1 '0=Left, 1=Centre, 2=Right
PDFCell.VerticalAlignment = Element.ALIGN_TOP
PDFCell.PaddingLeft = 0
PDFCell.PaddingRight = 0
PDFCell.PaddingTop = 8
If Len(rs("Name")) > 20 Then
NameFontSize = 28
Else
NameFontSize = 34
End If
PDFCell.Phrase = New Phrase(rs("Name").ToString, New
Font(Font.FontFamily.HELVETICA, NameFontSize, Font.BOLD))
PDFCell.Rotation = 180
PDFCellTable.AddCell(PDFCell)
'Name Side, Row 1 NN Logo (Flipped)
PDFCell.MinimumHeight = 40
PDFCell.HorizontalAlignment = 0 '0=Left, 1=Centre, 2=Right
PDFCell.VerticalAlignment = Element.ALIGN_TOP
PDFCell.PaddingLeft = 10
PDFCell.PaddingTop = 10
PDFCell.PaddingRight = 0
PDFCell.PaddingBottom = 0
PDFCell.AddElement(New Chunk(NNLogoImage, 20, -20))
PDFCellTable.AddCell(PDFCell)
'Menu Side Row 1 Choices
PDFCell.MinimumHeight = 50
PDFCell.HorizontalAlignment = 1 '0=Left, 1=Centre, 2=Right
PDFCell.VerticalAlignment = Element.ALIGN_MIDDLE
PDFCell.PaddingTop = 0
PDFCell.PaddingBottom = 5
PDFCell.Phrase = New Phrase(rs("Name").ToString, New
Font(Font.FontFamily.HELVETICA, 20))
PDFCell.Rotation = 0
PDFCellTable.AddCell(PDFCell)
'Menu Side Row 1 Choices
PDFCell.MinimumHeight = 50
PDFCell.HorizontalAlignment = 1 '0=Left, 1=Centre, 2=Right
PDFCell.VerticalAlignment = Element.ALIGN_BOTTOM
PDFCell.PaddingTop = 0
PDFCell.PaddingBottom = 5
PDFCell.Phrase = New Phrase("Choice1 | Choice2 | Choice3",
New Font(Font.FontFamily.HELVETICA, 14, Font.BOLD))
PDFCell.Rotation = 0
PDFCellTable.AddCell(PDFCell)
'Row 3 Misc Info (Date, Pre Seat, Number)
PDFCell.MinimumHeight = 40
PDFCell.HorizontalAlignment = 1 '0=Left, 1=Centre, 2=Right
PDFCell.VerticalAlignment = Element.ALIGN_BOTTOM
PDFCell.PaddingTop = 0
PDFCell.PaddingBottom = 11
PDFCell.PaddingRight = 25
PDFCell.Phrase = New Phrase(rs("PreSeated") & Blank &
CDate(rs("doDate")).ToString("M/d") & Blank &
AttendeesListed.ToString("#,###"), New Font(Font.FontFamily.HELVETICA, 6))
PDFCellTable.AddCell(PDFCell)
PDFTable.AddCell(PDFCellTable) รง==== It looks like this
added cell to the outer table has borders? How to suppress them?
PDFCellTable = Nothing
End While
- Bill
_____
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://www.itextpdf.com/book/
Check the site with examples before you ask questions:
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/