Here is my code example:
- Code: Select all
Dim doc As New Document()
Dim s As Section = doc.AddSection()
Dim t As Spire.Doc.Table = s.AddTable(True)
Dim r As Spire.Doc.TableRow = t.AddRow()
For i As Integer = 0 To 3
Dim c As Spire.Doc.TableCell = r.AddCell()
c.AddParagraph().AppendText("94 USt §13b 16%")
Dim txtRange As TextRange = CType(c.Paragraphs(0).ChildObjects(0), TextRange)
txtRange.CharacterFormat.Italic = True
txtRange.CharacterFormat.FontName = "Tahoma"
Next
Dim r1 As Spire.Doc.TableRow = t.AddRow()
For i As Integer = 0 To 3
Dim c As Spire.Doc.TableCell = r1.Cells(i)
c.AddParagraph().AppendText("bbbbbbbbb")
Next
Dim r2 As Spire.Doc.TableRow = t.AddRow()
For i As Integer = 0 To 3
Dim c As Spire.Doc.TableCell = r2.Cells(i)
c.AddParagraph().AppendText("umläutearungasdfn adsfnasd asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf")
Dim txtRange As TextRange = CType(c.Paragraphs(0).ChildObjects(0), TextRange)
txtRange.CharacterFormat.Italic = True
txtRange.CharacterFormat.FontName = "Tahoma"
Next
doc.SaveToFile("C:\test.pdf", FileFormat.PDF)
doc.Close()