Reordering PDF pages

  • When we tried to reorder some pages several times, we encountered a problem, the following is our code and pdf file MyPDFToShare.pdf (1.5 MB) , which has 64 pages.
            var pdf = new Document("D:\\MyPDFToShare.pdf");
            int count = 100000;
            try
            {
                while (count > 0)
                {
                    count--;

                    pdf.Pages.Insert(2, pdf.Pages[43]);
                    pdf.Pages.Delete(44);

                    pdf.Pages.Insert(20, pdf.Pages[25]);
                    pdf.Pages.Delete(26);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Exception: " + ex.Message);
            }

@Glority_Developer

We were able to notice an exception while executing the code snippet that you shared with Aspose.PDF for .NET 21.10. Therefore, an issue as PDFNET-50787 has been logged in our issue tracking system. We will further look into its details and keep you posted with the status of its resolution. Please be patient and spare us some time.

We are sorry for the inconvenience.

Hi @asad.ali, do you have any progress on this issue?

@Glority_Developer

Regretfully, the earlier logged ticket has not been yet resolved due to other issues in the queue logged prior to it. Nevertheless, we will surely inform you once we make some significant progress towards ticket resolution. Please be patient and spare us some time.

We are sorry for the inconvenience.