I just updated to the latest version of PDF.net 2010.01.31
Our tables were fine and we were updating for other issues. Since we updated here is our problem.
We create a 2x2 table to fill the full page for each cell we want a half inch pad/margin.
Page 1 is perfect, page 2 and 3 are not. They loose the 0.5 inch margin on top.
I have attached an example PDF (issue.pdf) that was created with the code below.
Thanks
Mike
-------------------------------------------------
dim show_label_lines as boolean
show_label_lines = true
Dim pdf1 As Pdf = New Pdf()
Dim license As license = New license
License.SetLicense("Aspose.Pdf.lic")
pdf1.PageSetup.PageHeight = inch_to_point(8.5)
pdf1.PageSetup.PageWidth = inch_to_point(11)
pdf1.PageSetup.Margin.Left = inch_to_point(0)
pdf1.PageSetup.Margin.right = inch_to_point(0)
pdf1.PageSetup.Margin.top = inch_to_point(0)
pdf1.PageSetup.Margin.bottom = inch_to_point(0)
Dim sec1 As Section = pdf1.Sections.Add()
Dim tab1 As Aspose.Pdf.Table = New Aspose.Pdf.Table()
sec1.Paragraphs.Add(tab1)
tab1.isrowbroken = false
tab1.ColumnWidths = inch_to_point(5.5) & " " & inch_to_point(5.5)
tab1.DefaultCellPadding.Left = inch_to_point(cdbl(0.5))
tab1.DefaultCellPadding.right = inch_to_point(cdbl(0.5))
tab1.DefaultCellPadding.top = inch_to_point(cdbl(0.5))
tab1.DefaultCellPadding.bottom = inch_to_point(cdbl(0.5))
tab1.DefaultCellTextInfo.FontSize = "9"
tab1.DefaultCellTextInfo.FontName = "Arial"
dim currrow, skiprow, from_add_row, to_add_row as row
dim cnt1, cnt2 as integer
for cnt1 = 1 to 6
currrow = tab1.Rows.Add()
currrow.fixedrowheight = inch_to_point(4.25)
for cnt2 = 1 to 2
Dim xcell As Cell = currrow.Cells.Add(cnt1 & "x" & cnt2)
xcell.Border = New BorderInfo(CType(BorderSide.All, Integer), 1.0)
next
next
pdf1.Save(server.mappath("work") & "\" & "issue.pdf")
function inch_to_point(use_inch) as double
if use_inch < 0 then
inch_to_point = 0
else
inch_to_point = use_inch * 72
end if
end function