Hi guys...
I'm evaluating MigraDoc, to see if it's a viable technology change from the tech the company I work for are already using - so far it's fairly promising.
Currently using the GDI+ based empira Software NuGet Package (v1.32.4334) .
I have some code to add a footer to a section - my requirement is that I need to use the "AddPageField()" and "AddNumPagesField()" but 1 lower than the actual page:
A better explained example would be, I have a cover page which has it's own footer - the page count does not start from the cover page.
The next page that's added has a new footer (the one below), where on the right it displays Page 1 of 1 - if we had a document where there is only the cover page and this next page I have described.
Code:
Paragraph paragraph = sec.Footers.Primary.AddParagraph();
paragraph.AddFormattedText(label, font);
var topBorder = new Border()
{
Color = borderColour,
Width = 0.5,
Style = BorderStyle.Single
};
paragraph.Format.Font = font;
paragraph.Format.Borders.Top = topBorder;
paragraph.Format.Borders.DistanceFromTop = 1.5;
paragraph.Format.Alignment = ParagraphAlignment.Left;
paragraph.Format.LeftIndent = Unit.FromMillimeter(-15.7);
paragraph.AddTab();
paragraph.Format.AddTabStop(Unit.FromMillimeter(173), TabAlignment.Right);
paragraph.AddFormattedText("Page ");
paragraph.AddPageField();
paragraph.AddFormattedText(" of ");
paragraph.AddNumPagesField();
Does anybody have a suggestion for me, as I can't quite work out how to do it?
Thank you all in advance,
Matt