PdfFileEditor.Concatenate concatenates in a different order every time?

I am using the concatenate method to concatenate several PDF files and adding bookmarks into the concatenated file. But I noticed that every time I use the concatenate method it concatenates the single PDF files in a different order every time.

For example, I have PDF X and PDF Y. I pass them into the concatenate method using a string array. The concatenate method saves the concatenated file to my hard drive. When I open the file sometimes PDF X is first and sometimes PDF Y is first. I need the PDF files to be concatenated in the same order every time.

Is there a way to do this? Is this a bug in Aspose.PDF.Kit?

Thank you.

Here is my code:

Dim inStreams(1) As String
inStream(0) = "PDF X.pdf"
inStream(1) = "PDF Y.pdf"
pdfEditor.Concatenate(inStreams, “output.pdf”)

Hi Kyle,

I have tested this issue at my end but couldn’t see any such anomaly. Can you please download the latest version and try with that?

If you still notice the same problem then please share the sample PDF files with us, so we could test the issue at our end.

We’re sorry for the inconvenience and looking forward to help you out.

Thanks for your response. I am using version of Aspose.Pdf.Kit. I’ve tried 4 different PDF’s and the problem occurs with all of them. I’ve attached 2 PDF’s that I’ve been using for you to test.

Thank you.

I think I fixed the issue. my DataView was ordering differently every time. Not sure why but I believe I fixed the problem.