Graphic plus text on same line

Hi Guys

I'm trying to add a line composed of two small graphics with text in between.

I'm using :

sec1.Paragraphs.Add(graphic01)

sec1.Paragraphs.Add(text01)

sec1.Paragraphs.Add(graphic02)

but this puts each on a separate line.

I've searched for some "Line.Add" code but with no success.

Where am I going wrong?

Alan

Hi,

Thank you for considering Aspose.

Please use Inline paragraph property of segment to get your required output. Please refer to:
[http://www.aspose.com/Products/Aspose.Pdf/Api/Segment-InlineParagraph-Property.html ](http://www.aspose.com/Products/Aspose.Pdf/Api/Segment-InlineParagraph-Property.html)

Thanks.

Thanks for the help so far, this is going very well.

Now I want to put this into a table - can it be done?

Here's a section of code which inserts a table (it works, so i've only included the last few lines)

followed by the code which does the "Graphics plus Text" (which also works):

Dim row2 As Row = tab1.Rows.Add()

row2.Cells.Add("Logo")

row2.Cells.Add("Chart one")

'======== End Table ===========================================

' Create Logo + comments

Dim textL1 As Text = New Text()

textL1.TextInfo.FontName = "Arial"

textL1.TextInfo.FontSize = 8

sec1.Paragraphs.Add(textL1)

textL1.Segments.Add(" ")

Dim seg1 As Segment = textL1.Segments.Add()

Dim imgL1 As Aspose.Pdf.Image = New Aspose.Pdf.Image()

imgL1.ImageInfo.File = GetServerPath() & "firsteclipse\Graphics\Logo.bmp"

seg1.InlineParagraph = imgL1

textL1.Segments.Add("Self")

' == end 1 ===

i.e. Can I put textL1 into the first column of my inserted table?

Any clues?

(of course my very last step is to put the Chart into the second column, but I'm sure the same advice will apply)

Cheers

Alan

Hi,

Please use something like this:

'Create a table

Dim tab1 As Table = New Table()

'Add the table into the paragraphs collection of section

sec1.Paragraphs.Add(tab1)

'Add a row into the table

Dim row1 As Row = tab1.Rows.Add()

'Add 1st cell in the row

Dim cell1 As Cell = row1.Cells.Add()

'Add the textL1 into the paragraphs collection of the 2nd cell

cell1.Paragraphs.Add(textL1)

Thanks.