Reputation: 811
I want to create a PDF file that should contain a table and, under this table, three images; the images should have an horizontal layout (they should be on the same line). How can I align the three images in MigraDoc? If I add the images in this way
document.LastSection.AddImage("path1");
document.LastSection.AddImage("path2");
document.LastSection.AddImage("path2");
I obtain three images with a vertical layout under the table. If I use
document.LastSection.LastParagraph.AddImage("...");
instead of
document.LastSection.AddImage("...")
I solve the problem but I introduce a new problem. The table that I've added using
var table1 = new Table();
.....
document.LastSection.Add(table1);
appears under the three images.
What can I do to obtain the table and under the table the three images with horizontal layout?
Upvotes: 1
Views: 3439
Reputation: 21689
How about var para=document.LastSection.AddParagraph();
and then calling para.AddImage(...);
to add the three images to one paragraph?
MigraDoc is dynamic - and document.LastSection.LastParagraph
obviously returns the last paragraph before the table. To cure this, just add a paragraph after the table and add the images to this paragraph.
Upvotes: 5