In Web application,you can save the merged and page-numbered result both as Stream objects. For example.
If FileStream fsa contains A.pdf, FileStream fsb contains B.pdf, MemoryStream ms will hold the merged pdf named c, then you could respond to clients with page-numbered pdf named d in HttpRespond stream.
//read input Pdf documents
FileStream fsa= File.Open(inputfile1,FileMode.Open,FileAccess.Read,FileShare.Read);
FileStream fsb= File.Open(inputfile2,FileMode.Open,FileAccess.Read,FileShare.Read);
//new a PdfFileEditor object
PdfFileEditor pdfEditor = new PdfFileEditor();
MemoryStream ms= new MemoryStream();
MemoryStream out= new MemoryStream();
pdfEditor.Concatenate(fsa,fsb,ms);
fileStamp = new Aspose.Pdf.Kit.PdfFileStamp(ms, out);
FormattedText ft = new FormattedText("#",System.Drawing.Color.FromArgb(0,0,0),Aspose.Pdf.Kit.FontStyle.TimesRoman,EncodingType.Winansi,false,12);
fileStamp.AddPageNumber(ft);
fileStamp.Close();
byte[] outBuf = out.GetBuffer();
//response to user's web.
response.Expires = 0;
response.Buffer = true;
response.ClearContent();
response.AddHeader("content-disposition","inline; filename=" + "output.pdf");
response.ContentType = "application/pdf";
response.BinaryWrite(outBuf);
outStream.Close();
response.End();
Setting alignment of page number is not provided yet. The developers will support properties in near future release.