Hi,
It does not work for me.
I am using the below code for generating the pdf document.
Code:
public void Draw(PdfDocument doc)
{
XGraphics gfx = XGraphics.FromPdfPage(doc.AddPage());
foreach (DrawBase item in Items) {
try {
//Start New Page if PageBreak
if (item.GetType() == typeof(PageBreak)) {
if (item.IsConditionTrue())
gfx = XGraphics.FromPdfPage(doc.AddPage());
}
//Skip remaining page(s)
else if (item.GetType() == typeof(Skip)) {
if (item.IsConditionTrue())
break; //skip rest of document
}
//This will draw
else if (item.IsConditionTrue()) {
item.Draw(gfx);
}
}
catch (Exception ex) { Debug.Write("Unable to DRAW object: (" + ex.StackTrace + ")" + GetXml(item)); }
}
}
But i tried to use AddPageField() which you have mentioned in very first reply.But i cant see that method for any of the classes.
Even i tried to find out the classs FormattedText & paragraph like your first sample but such classes seems to be not exists in my code.
Please help me to insert page numbers in this above code.