Hi
I have used the below code to add the new text(slide 12 of 52) to the existing PDF page and tried to save the each page as single page pdf file.
Attached sample Output. The text is printed in reverse order. Kindly help to resolve this issue.
//Open document
Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document("Input.pdf");
Aspose.Pdf.Document newDocument;
TextBuilder textBuilder;
int pageCount=1;
//Create text fragment
TextFragment textFragment = new TextFragment();
textFragment.Position = new Position(100, 600);
//Set text properties
textFragment.TextState.FontSize = 12;
textFragment.TextState.Font = FontRepository.FindFont("TimesNewRoman");
//textFragment.TextState.BackgroundColor = Color.LightGray;
textFragment.TextState.ForegroundColor = System.Drawing.Color.Black;
foreach (Aspose.Pdf.Page pdfPage in pdfDocument.Pages)
{
textFragment.Text = string.Concat("Slide ", SN.ToString(), " of ", sc.Tostring());
//Save new document
newDocument = new Aspose.Pdf.Document();
//Create TextBuilder object
textBuilder = new TextBuilder(pdfPage);
//Append the text fragment to the PDF page
textBuilder.AppendText(textFragment);
newDocument.Pages.Add(pdfPage);
newDocument.Save(string.Concat(outpath,sn,Tostring(), pageCount, "pdf"));
pageCount++;
}