Hi. I'm trying to concatenate four PDF files, using the next code in C#, but when I see the file Output.pdf is created with size of 0 bytes. I'm testing Aspose.Pdf.Kit version 1.9.0.0. The size of the source pdf files is between 399 and 612 k. Thanks in advance for the help
string[] FilesInOrder = string[] {"file1.pdf", "file2.pdf", "file3.pdf"};
string FileOutput = "output.pdf";
Stream[] StreamsInput = new Stream[ FilesInOrder.Length ];
for ( int i = 0; i < FilesInOrder.Length; i++ )
{
StreamsInput[ i ] = new FileStream( FilesInOrder[ i ], FileMode.Open );
}
FileStream streamOutput = new FileStream( FileOutput, FileMode.Create );
PdfFileEditor pdfEditor = new PdfFileEditor();
pdfEditor.Concatenate( StreamsInput, streamOutput );
for ( int i = 0; i < FilesInOrder.Length; i++ )
{
StreamsInput[ i ].Close();
}
streamOutput.Close();