Concatenate Object reference not set to an instance of an object

I am trying to concatenate two files and get an error:


An exception of type ‘System.NullReferenceException’ occurred in Aspose.Pdf.dll but was not handled in user code

Additional information: Object reference not set to an instance of an object.

The two files are attached, here is the code snippet:

Public Sub MergePDFs(ByRef SourceFiles() As String, ByRef OutputFile As String)
Dim license As Aspose.Pdf.License = New Aspose.Pdf.License()
license.SetLicense(“MCPSR.Aspose.Pdf.lic”)
license.Embedded = True

Dim pdfEditor As New PdfFileEditor()
With pdfEditor
.AllowConcatenateExceptions = True
.Concatenate(SourceFiles, OutputFile)
End With
End Sub

Hi Nathan,


Thanks for using our API’s.

I have tested the scenario and have managed to reproduce same problem. For the sake of correction, I have logged it as PDFNET-41250 in our issue tracking system. We will further look into the details of this problem and will keep you posted on the status of correction. Please be patient and spare us little time. We are sorry for this inconvenience.

The issues you have found earlier (filed as PDFNET-41250) have been fixed in Aspose.PDF for .NET 22.3.