When using MemoryStream for input and output sources, exception is thrown by Aspose. I do not get this exception if using filenamepaths.
Using Aspose.Pdf 3.3.2.0
---------------------------------------
InnerException Type: System.IndexOutOfRangeException
InnerException Message: Index was outside the bounds of the array.
InnerException StackTrace:
at Aspose.Pdf.Figure.ଛ.ஒ(Image ֣, Object க, Boolean )
at Aspose.Pdf.Figure.፟.፠(֟ ኯ, Int32 ൜, String ֥, Boolean ኴ, Stream ֭)
at Aspose.Pdf.Figure..ኲ(֟ ኯ, Int32 ኳ, ImageFileType ֤, String ֥, String ֦, String ֧, Int32 ֨, Int32 ֩, Boolean ֪, Boolean ֫, Boolean ኴ, Byte[] ֬, Stream ֭)
at Aspose.Pdf.Figure.֟.֢(Image ֣, ImageFileType ֤, String ֥, String ֦, String ֧, Int32 ֨, Int32 ֩, Boolean ֪, Boolean ֫, Byte[] ֬, Stream ֭)
at Aspose.Pdf.Xml.ከ.ክ(Pdf ӟ, Image ֣)
at Aspose.Pdf.Xml.ᗣ.፻(Pdf ӟ, Section ፼, Table ࡾ, Row ሾ, Cell Փ, Image ֣, ӫ ӿ, ᎎ ፸, Boolean ᎀ)
at Aspose.Pdf.Xml.ᖪ.ᖭ(Pdf ӟ, Section ᇐ, ӫ ӿ)
at Aspose.Pdf.Xml.٫.ኇ(Pdf ӟ)
at Aspose.Pdf.Xml.ᝇ.ᝌ(Ӭ ᄋ, Pdf ӟ)
at Aspose.Pdf.Pdf.Save(Stream stream)
at WS.AsposePDFManager.ConvertFileToPDF(String sourceFile, String targetFile) in D:\Documents and Settings\smi\MyDocuments\PDFManager\AsposePDFManager.cs:line 1184
---------------------------------------
Within ConvertFileToPDF() I create MemoryStreams:
MemoryStream inputFile = new MemoryStream(File.ReadAllBytes(sourceFile));
MemoryStream destinationFile = new MemoryStream();
Line 1184 is: pdfFile.Save(destinationFile);