Generating from Stream

Generating from Stream

Forum member · Jan 2, 2006
I need to know whether DynamicPDF Generator for .NET supports generating pdf from IO Stream. If so, let me know how?

Re: Generating from Stream

Support · Jan 3, 2006
Hello, Yes, our DynamicPDF Merger for .NET product will allow you to generate PDF documents from IO Streams without any problem. The fully functional evaluation version can be downloaded from our web site for testing. Thanks, ceTe Software Support Team

Re: Generating from Stream

Forum member · Jan 3, 2006
Could you please let me know where to download the same. I tried myself and I get this error. Stream does not support reading Exception Details: System.NotSupportedException: Stream does not support reading.

Re: Generating from Stream

Support · Jan 3, 2006
Hello, The evalution version of DynamicPDF Merger for .NET can be downloaded from the following link on our website: DynamicPDF Merger for .NET Thanks, ceTe Software Support Team

Re: Generating from Stream

Forum member · Jan 3, 2006
Dim MyDocument As ceTe.DynamicPDF.Document = New ceTe.DynamicPDF.Document Dim mypage As New ceTe.DynamicPDF.Page(ceTe.DynamicPDF.PageSize.A4, ceTe.DynamicPDF.PageOrientation.Landscape) Dim myelement As ceTe.DynamicPDF.PageElement Dim mystream As System.IO.Stream = Session("LoopStream") Dim imagedata As ImageData = imagedata.GetImage(mystream) mypage.Elements.Add(New ceTe.DynamicPDF.PageElements.Image(imagedata, 0, 0)) MyDocument.Pages.Add(mypage) MyDocument.DrawToWeb(Me) '''The above piece of code gives me an error Stream does not support reading. Exception Details: System.NotSupportedException: Stream does not support reading.

Re: Generating from Stream

Support · Jan 3, 2006
Hello, The reason you are getting the error is because the stream you are using most likely does not support reading. You will need to find out what kind of stream it is and make sure that the stream supports reading. Thanks, ceTe Software Support Team

Re: Generating from Stream

Forum member · Jan 3, 2006
Earlier the stream was created as of "OpenWrite", I changed to "OpenRead" or "Create" now it is giving different error. System.ArgumentException: Invalid parameter used. at System.Drawing.Bitmap..ctor(String filename) at ceTe.DynamicPDF.Imaging.ImageData.GetImage(String filePath) BTW, where I can find this example in your product.

Re: Generating from Stream

Support · Jan 3, 2006
Hello, After looking at the exception, it looks like the stream that you are passing is being treated as a string. AS long as the stream is valid, there should not be any problem. Can you please send over your entire code at [^a|mailto:support@cete.com|Support^] so that we can take a look at it and see what is causing the exception to be thrown? Thanks, ceTe Software Support Team