Im using the following code to concatenate a bunch of documents using streams
//Create a list of streams to the input documents
List<FileStream> inputStreamList = new List<FileStream>();
foreach (Document doc in myDocumentCollection.Documents)
{
//Add a stream to the imputStreamList for each document in the collection
FileStream inputFileStream = new FileStream(doc.FilePath, FileMode.Open);
inputStreamList.Add(inputFileStream);
}
//Merge the multi-stream of Pdfs into a new Pdf stream.
Stream[] inStreams = inputStreamList.ToArray();
PdfFileEditor pdfEditor = new PdfFileEditor();
FileStream outStream = new FileStream("c:\concatenatedResult.pdf", FileMode.Create);
pdfEditor.Concatenate(inStreams, outStream);
outStream.Close();
Is there any way I can use the Pdf.CompressionLevel Property to ensure the resultant concatenated PDF is at maximum compression (9) ?
Many Thanks