System.NullReferenceException: Object reference not set to an instance of an object.
Thanks for contacting support.
I have tested the similar scenario in our environment and was unable to notice the exception which you have shared. I have used latest version of Aspose.Pdf for .NET which is 17.5 and following code snippet.
Document doc = new Document(dataDir + “input.pdf”); Document doc2 = new Document(); doc2.Pages.Add(doc.Pages);
Please note that it is strongly recommended to use latest version of the API as it contains all fixes and enhancement. You may download Aspose.Pdf for .NET 17.5 from our website and in case if you still face any issue, please share your input document, so that we can test scenario in our environment and address it accordingly.