How can i make the page added at the last as the first page of the document
Can you please specify which programming language you are using and provide more details about how you want to add the page to a specific page number?
I have used C#.net
I am using C#.net as my programming language. I have created a page at the last and i want this page to be the 2nd page in the document. How can i do that?
You can directly add the page at the 2nd position in the document by using Document.Pages.Insert() method. However, if you want to remove the last page and add it as 2nd page, you can do something like below.
Document doc = new Document(dataDir + "input.pdf");
doc.Pages.Insert(2, doc.Pages[doc.Pages.Count]);
doc.Pages.Remove(doc.Pages[doc.Pages.Count]);