Join us for an engaging webinar, as we unravel the potential of AI for revolutionizing document management.
Enable your employees to remain productive
throughout the document management process.
Learn how SmartZone uses a regular
expression engine integrated into the recognition engine to achieve the best possible accuracy
on data that can be defined by a regular expression.
Docubee is an intelligent contact automation platform built to help your team success
I want to re-arrange the page order of a PDF. I’ve tried the following…
var page = imGearDocument.Pages[indx].Clone();
imGearDocument.Pages.RemoveAt(indx); //// Exception: "One or more pages are in use and could not be deleted."
But an exception is thrown. Somehow, even though the page was cloned, the exception states that the page can’t be removed because it’s still in use.
What am I doing wrong here?
If you’re using an older version of ImageGear .NET, you may run into this exception when you clone the page. Some of the resources between the original and the clone are still shared, which is why this happens.
Starting with ImageGear .NET v24.8, this no longer happens, and the above code should work fine.
If you still need to use the earlier version, you can use the InsertPages method instead.