I was using v6.7 of PdfFileEditor.SplitToPages to split a multi-page PDF into individual page files and I ran into a Out of Memory exception when the file size was >64k. I upgraded to the latest version, v9.7, and that fixed that problem but introduced another. The resulting PDFs get loaded into an EMC ApplicationXtender instance which worked fine with the output of the v6.7 pages but fails with the output of the v9.7 pages.
Can I find out which was the first version of Aspose.Pdf after v6.7 that fixed the memory issue? Or, what the difference is in the output of the v9.7 PDF page that is causing ApplicationXtender to fail?
Sample code:
List pageFileList = new List();
int pageNumber = 0;
string baseFileName = Path.GetFileNameWithoutExtension(inputFile);
string pageFileName = String.Empty;
pdfFileEditor = new PdfFileEditor();
inputStream = new FileStream(inputFile, FileMode.Open);
outputBuffer = pdfFileEditor.SplitToPages(inputStream);
foreach (MemoryStream ms in outputBuffer)
{
pageNumber++;
pageFileName = Path.Combine(outputDirectory, String.Format("{0}_Page{1}.PDF", baseFileName, pageNumber));
outputStream = new FileStream(pageFileName, FileMode.Create);
ms.WriteTo(outputStream);
outputStream.Close();
outputStream = null;
pageFileList.Add(pageFileName);
// attempts to make v9.7 page work
// with ApplicationXtender
//pdfDocument = new Aspose.Pdf.Document(pageFileName);
//pdfValidateLog = Path.ChangeExtension(pageFileName, "log");
//pdfDocument.Validate(pdfValidateLog, PdfFormat.v_1_6);
//pdfDocument.Save(pageFileName);
//pdfDocument.Dispose();
//try { File.Delete(pdfValidateLog); }
//catch { }