NullReferenceException in PdfFileEditor.Concatenate() Method in Aspose.PDF pdf containing Architectural pdf

Hello,

I am encountering a NullReferenceException when trying to concatenate PDF files using the PdfFileEditor.Concatenate() method in Aspose.PDF 25.1.0 . The issue occurs specifically when the PDFs being processed contain architectural data.

The error is thrown on the following line of code:

using Aspose.Pdf.Facades;
Aspose.Pdf.License license = new Aspose.Pdf.License();
license.SetLicense("Aspose.Total.lic");

Console.WriteLine("Hello, World!");
var agendaFileTmpPath = "test1.pdf";
List<string> pdfFilesToConcatenateList = new List<string>();
pdfFilesToConcatenateList.Add("sample-drawing-package-1and2family.pdf");
pdfFilesToConcatenateList.Add("sample-drawing-package-1and2family.pdf");
pdfFilesToConcatenateList.Add("sample-drawing-package-1and2family.pdf");
pdfFilesToConcatenateList.Add("sample-drawing-package-1and2family.pdf");
pdfFilesToConcatenateList.Add("sample-drawing-package-1and2family.pdf");
pdfFilesToConcatenateList.Add("sample-drawing-package-1and2family.pdf");
pdfFilesToConcatenateList.Add("sample-drawing-package-1and2family.pdf");
pdfFilesToConcatenateList.Add("sample-drawing-package-1and2family.pdf");
pdfFilesToConcatenateList.Add("sample-drawing-package-1and2family.pdf");
pdfFilesToConcatenateList.Add("sample-drawing-package-1and2family.pdf");
var editor = new PdfFileEditor();
editor.CopyOutlines = false;
editor.CopyLogicalStructure = true;
editor.CorruptedFileAction = PdfFileEditor.ConcatenateCorruptedFileAction.StopWithError;
var packetTempFilePath = agendaFileTmpPath.Replace(".pdf", "_out1.pdf");
var result = editor.Concatenate(pdfFilesToConcatenateList.ToArray(), packetTempFilePath);

The NullReferenceException is thrown at this line:

var result = editor.Concatenate(pdfFilesToConcatenateList.ToArray(), packetTempFilePath);

Expected Result: The PDF files should concatenate successfully without any exceptions, and the resulting file should be saved at the specified packetTempFilePath.

Actual Result: A NullReferenceException is thrown when calling editor.Concatenate() with architectural PDFs.

Additional Information:

  • The pdfFilesToConcatenateList is valid and not null, containing correct file paths.
  • The agendaFileTmpPath is properly formatted and valid.
  • The issue only seems to occur with PDFs containing architectural data or complex layouts.

Could you please assist in resolving this issue? Any insights or potential workarounds would be greatly appreciated.

Check this Sample file
sample-drawing-package-1and2family.pdf (2.1 MB)

Thank you!

@abdulkadirsabirbohari
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): PDFNET-59120

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

When can I expect a resolution to this issue?

@abdulkadirsabirbohari
Nothing new for this task yet. Created tasks are solved in the order they are received, taking into account priorities.
The highest priority is for tasks with paid support, followed by tasks from users who have purchased a license.
The time it takes to solve problems can also vary. Therefore, unfortunately, it is not even possible to give ETA.