0

I have 2 images in 2 cells (1 each so they are side by side). The image does not seem to set the height of the cell so the image rolls off the current page.

Is there a way get the image to roll over to the next page if it needs it?

I have tried to manually get the height for the image and set this on the cell but it did not seem to make the cell any bigger.

Basic layout of my table

Dim Section2 As Section = doc.AddSection()

Section2.Headers.FirstPage.IsNull()

'For the graph
Dim graphTable As Table = Section2.AddTable
graphTable.Borders.Visible = False

Dim graphColumn As Column = graphTable.AddColumn
graphColumn.Width = 470
graphColumn = graphTable.AddColumn
graphColumn.Width = 500

Dim graphRow As Row = graphTable.AddRow
graphRow.Cells(0).AddImage("test.png"))
graphRow.Cells(2).AddImage("test.png"))

Dim graphRow2 As Row = graphTable.AddRow
graphRow2.Cells(0).AddParagraph("d")
graphRow2.Cells(1).AddParagraph("d")

My next idea if this is not possible is to cut the image into a specified size and render each of the pieces on separate pages.

Ruddy
  • 9,795
  • 5
  • 45
  • 66

1 Answers1

1

With the current implementation, neither table rows nor images can break over several pages.

Use an overload of AddImage that allows to set the image size to make them fit on one page. Or split the images yourself as you already suggested.