I am having problem with code that would take stream of files and concatenate it to a new pdf is no longer working and I get the error File does not begin with PDF instead.
This is the code that I am using:
Stream allFileStreams = new Stream[c]; //load all of the files inthe stream array
FileStream documentInstream = new FileStream("C:\temp\pdf1.pdf", FileMode.Open, FileAccess.Read);
allFileStreams = documentInstream;
//Instantiate PdfFileEditor object
PdfFileEditor pdfEditor = new PdfFileEditor();
//Call Concatenate method of PdfFileEditor object to concatenate all input streams into a single output stream
Response.ContentType = "application/pdf";
Seems like the output pdf only has html in the pdf. No actual pdf content. See file uploaded as the newly formed concatenated version.
Please help asap.