Object reference not set
at Spire.Pdf.PdfDocumentBase.ImportPageRange(PdfDocumentBase ldDoc, Int32 startIndex, Int32 endIndex)
at Spire.Pdf.PdfDocumentBase.ᜃ(PdfDocumentBase A_0)
Example of the code that is causing the error (the bottom line is where the crash occurs):
- Code: Select all
PdfDocument fullDocument = new PdfDocument();
PdfDocument fullListofExhibits = new PdfDocument();
PdfDocument problemExhibit = new PdfDocument();
//Create title page and put into mergedNarrative
fullDocument.LoadFromFile(@"C:\Test\TitlePage.pdf");
fullListofExhibits.LoadFromFile(@"C:\Test\ExhibitsCoverPage.pdf");
problemExhibit.LoadFromFile(@"C:\Test\patient form child orthodontics.pdf");
fullListofExhibits.AppendPage(problemExhibit);
fullDocument.AppendPage(fullListofExhibits);
The specific file that is the problem is the patient form child orthodontics.pdf, which I can email if necessary. Thanks!