Concatenating Files without creating Temporary files

Is there anyway to append several PDF files together without creating temporary files ... I am using the Concatenate method but all the methods ask for an outFile and it cannot be the same as one of the input files.

This is the only way that I have found that works:

For Each sPath In sFiles

If IO.File.Exists(".\Concatenated.pdf") Then

If Not oConcat.Concatenate(".\Concatenated.pdf", sPath, ".\Temp.pdf") Then Stop


IO.File.Move(".\Temp.pdf", ".\Concatenated.pdf")


IO.File.Copy(sPath, ".\Concatenated.pdf")

End If



You can use the overloaded Concatenate method which works on Streams. You can use memory streams with this method.


Adeel Ahmad
Support Developer
Aspose Changsha Team