This project has moved. For the latest updates, please go here.

adding indentation to picture

May 25, 2016 at 7:23 AM
I have successfully managed to create a paragraph with indentation.

Paragraph first_p = sections.InsertParagraph("hello");
first_p.IndentationBefore = 10;

As soon as I add a picture to this, the indentation breaks.

Paragraph first_p = sections.InsertParagraph("hello");
first_p.IndentationBefore = 10;
first_p.InsertPicture(image.CreatePicture());

Is anyone able to help me with this?
May 31, 2016 at 6:30 AM
Fixed my problem by using:

Paragraph first_p = sections.InsertParagraph("hello").AppendPicture(p)

Complete code:
Novacode.Image a_picture = sections.AddImage("an image");
Picture p = a_picture.CreatePicture();

Paragraph first_p = sections.InsertParagraph("hello").AppendPicture(p);
first_p.IndentationBefore = 10;
Marked as answer by MadBoy on 5/31/2016 at 12:54 AM