foreach (PdfPageBase page in doc.Pages) throws a StackOverFlow Exception
Process is terminated due to StackOverflowException.
An unhandled exception of type 'System.StackOverflowException' occurred in System.Drawing.dll
The exception is not handled, instead breaks the application.
Please note this is the 3rd Exception, I'm posting, For all 3 cases we're not allowed to share the underlying documents for the exceptions.
Please repair your code.