- 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);
}