A crash occurs when inserting a page from one PDF into another using Aspose.Pdf.Kit.dll 4.0
An unhandled exception of type 'xeb116a323308e2f7.x379651f854a11f87' occurred in Aspose.Pdf.Kit.dll
Main PDF (test1.pdf) has field fill-ins. Page from other PDF (test2.pdf) being inserted has field fill-ins.
It works when "Page from other PDF (test2.pdf) being inserted" does NOT have field fill ins.
When tested with version 3.9 it gave a different error. "Root element is missing."
Code used:
int location = 1;
string inFile1 = ".\\test1.pdf";
string inFile2 = ".\\test2.pdf";
string outFile = ".\\test3.pdf";
int[] pages = new int[] { 1 };
//Creating stream objects holding the PDF files in Open Mode
FileStream inStream1 = new FileStream(inFile1, FileMode.Open);
FileStream inStream2 = new FileStream(inFile2, FileMode.Open);
//Creating output stream object that will store the extracted pages as a PDF file
FileStream outputStream = new FileStream(outFile, FileMode.Create);
//Instantiating PdfFileEditor object
PDF.PdfFileEditor editor = new PDF.PdfFileEditor();
editor.Insert(inStream1, location, inStream2, pages, outputStream);
//Closing output stream
outputStream.Close();