We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Table- iterate- image

Hi, could I have an hint how to get images to work:

Dim Pdf1 As New Pdf()
Dim oSection As Aspose.Pdf.Section = Pdf1.Sections.Add()
Dim oCell As Aspose.Pdf.Cell
Dim oCellSeg As Aspose.Pdf.Segment
Dim oCellText As Aspose.Pdf.Text
Dim r, c as integer
Dim imgX As New Aspose.Pdf.Image()
Dim oTbl As New Aspose.Pdf.Table(oSection)
oSection.Paragraphs.Add(oTbl)
oTbl.ColumnWidths = "100 100 100 100"
Dim oRow As Aspose.Pdf.Row
for r = 1 to 3
oRow = New Aspose.Pdf.Row(oTbl)
oTbl.Rows.Add(oRow)
for c = 1 to 4
oCell = New Aspose.Pdf.Cell(oTbl)
if r = 2 then ocell.Border = New BorderInfo(CType(BorderSide.bottom, Integer), 0.5F)
oRow.Cells.Add(oCell)
if r = 2 and c = 3 then
'put imgX here
else
oCellText = New Aspose.Pdf.Text(oSection)
oCell.Paragraphs.Add(oCellText)
oCellSeg = New Aspose.Pdf.Segment(oCellText)
oCellText.Segments.Add(oCellSeg)
oCellSeg.Content = "Test" & r & c
oCell.Paragraphs.Add(oCellText)
oCellSeg = New Aspose.Pdf.Segment(oCellText)
oCellText.Segments.Add(oCellSeg)
end if
next
next
Pdf1.Save("testTable.pdf", SaveType.OpenInAcrobat, Response)