PrizmDoc Hybrid Viewing: Reduce server viewing requirements and streamline document processing
Read More
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.
The tale of how an underdog is going head-to-head with a tech giant (and winning).
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." imGearDocument.Pages.Insert(newIndx, page);
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.
InsertPages