My main objective is adding a collection of shapes into each pages of the document.
I have managed to add a collection of shapes in the end of the page by using the following code snippets.
DocumentBuilder builder = new DocumentBuilder(doc);
Shape omrLine = new Shape;
for (int i = 0; i < 9; i++)
omrLine[i] = new Shape(doc, ShapeType.Line);
omrLine[i].Rotation = 90;
omrLine[i].Top = -10;
omrLine[i].Left = i * 10;
omrLine[i].Width = 12;
omrLine[i].StrokeColor = Color.Red;
The above code snippet adds the shapes collection at the end of the document by using builder.MoveToDocumentEnd()
In order to loop through each pages of the document , i am able to use the following code
foreach(Section docSection in doc.Sections)
But the MoveToSection method only accepts an integer value. Is there a better way to loop through each pages and add the collection of shapes correctly ?
Thanks for your assistance,