We are having the exact same issue with the latest update. We really need 4.3 as a fix for another problem we had with the text getting cut off was included in that release. When we downloaded 4.3.0.2 it fixed the close memory stream issue, but then Adobe will not open the file. With this many people having the same issue concatenating memory streams, I would think you could reproduce the problem on your end. We also have a large solutions where trying to extract useable code for you to test is going to be difficult.
Hi Matt,
Can you please try the sample project I shared in my previous post? If you still find the same issue at your end, please do let us know. Also, in order to understand the issue we need to look into the difference between our sample code and the code running at your end. I hope you can help us in this regard.
We’re sorry for the inconvenience.
Regards,
Thanks Shahzad. This sample allowed me to get to the bottom of the problem (I’m guessing most people here will be doing a similar thing).
I created the attached sample program which is a rough copy of my application. The important parts (including the failures) are here:
Taking Paul’s suggestion it looks like the following is now required for the subsequent calls:
Hi Paul and Eric,
Thank you very much for your feedback. We’ll investigate this problem at our end and you’ll be updated shortly.
We’re sorry for the inconvenience.
Regards,
Hi,
I too have the same problem – the code i am using is
MemoryStream[] outBuffer = pdfEditor.SplitToPages(mStream);
for (int PCount = 0; PCount <= TotalPages - 1; PCount++)
{
Byte[] _DocumentByte = outBuffer[PCount].GetBuffer();
inMemoryStream = new MemoryStream(_DocumentByte);
inMemoryStream.Write(_DocumentByte, 0, 0);
if (outStream.Length > 0)
{
inStreamsArray = new Stream[] { outStream, inMemoryStream };
}
else
{
inStreamsArray = new Stream[] { inMemoryStream };
}
pdfEditor.Concatenate(inStreamsArray, outFileStream);
outStream = outFileStream;
}
Byte[] _theByte = outFileStream.GetBuffer();
SavePdf(_theByte);
After I concatenate it gives an error of using closed stream.
Could any one of you help me out.
thanks & Regards,
Ramanath guptha
Hi Ramanath,
Please try the hot fix attached with the following post of this thread:
V4.3.0.0 - PdfFileEditor.Concatenate closes MemoryStream
Also, please make sure that you set the position of all the input streams to 0 i.e. inStream.Position = 0;
Please try this at your end; however if you still find any issues, please do let us know.
We’re sorry for the inconvenience.
Regards,
The issues you have found earlier (filed as 15674) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.