Table Borders Breaking Beyond Parameters

Table Borders Breaking Beyond Parameters

Forum member · Oct 8, 2014
Using the simple code below, the top right, and bottom right corners of a table are exceeding the table width by 1-2 pixels, as you can see in this image: http://i.imgur.com/lP0kVbz.png Sometimes if I have other elements on the page, the top left and top right corners will exceed the table vertically by 1-2 pixels, as you can see in this example: http://i.imgur.com/lDipBru.png Sample code: var document = new Document() { Creator = "test", Author = "test", Title = "test" }; var page = new Page(PageSize.Letter, PageOrientation.Portrait); var table = new Table2(0, y + 25, HRWidth, 600, Font.TimesRoman, 11); table.Border.Width = 0.5f; table.CellDefault.Border.Width = 0.5f; table.Columns.Add(100); table.Columns.Add(100); table.Columns.Add(100); table.Columns.Add(100); table.Columns.Add(100); var row = table.Rows.Add(20); row.Cells.Add("10010288122"); row.Cells.Add("01/01/2013 – 12/31/2013"); row.Cells.Add("American Cancer Society"); row.Cells.Add("$120"); row.Cells.Add("Payroll Deduction - Per Pay Period"); pageElements.Add(table); document.Pages.Add(page); document.DrawToWeb("Statement.pdf"); What am I doing wrong?

Re: Table Borders Breaking Beyond Parameters

Support · Oct 9, 2014
Hello, We did some testing on our end and observed the same behavior for the top right, and bottom right corners of a table with 74.8 percent zoom in Adobe Reader. The same Adobe Reader is displaying correctly aligned borders in PDF with 100 percent zoom. Also we checked by opening the PDF with other Readers like Foxit PDF Viewer and NitroPDF Reader and table borders are displaying correctly. There is nothing in our API is causing this behavior. If you zoom into the PDF to some higher percentage you can view the correct alignment of the borders. Also to check it further we printed it to a physical printer and borders are printed correctly. Thanks, ceTe Software Support Team.