Problem sending PDF as stream using iTextSharp



I have no problem writing PDF file to hard drive on the fly with
iTextSharp, but have had no luck in sending PDF as a stream in my
asp.net web application.

I am simply copying the example at

http://itextsharp.sourceforge.net/examples/Chap0105.cs

But, Adobe Acrobat reader complains that the file has been damaged or
cannot be opened, or says something like "if the file was sent as an
email attachment, it was not properly decoded" or something to that
effect.

At the www.asp.net forum, http://forums.asp.net/p/1093198/1643956.aspx#1643956
, someone says that we need to reset the value of the memory stream
position to 0. I tried that with no luck.

Any idea about how to shoot this problem? Thanks.

.



Relevant Pages

  • Re: Complicated macro...
    ... No Such Luck wrote: ... > after any stream was sent there. ... #define print_it(file_ptr, format, ...) do \ ... Prev by Date: ...
    (comp.lang.c)
  • Re: how to start preparing for MCSD with C# and XML?
    ... Your programming skills will suerely help to pick up the language faster. ... Best of luck ... Regards ... MCSD in the C++ stream has been removed. ...
    (microsoft.public.cert.exam.mcsd)
  • Re: Problem sending PDF as stream using iTextSharp
    ... I am simply copying the example at ... someone says that we need to reset the value of the memory stream ... I tried that with no luck. ... send PDF as stream without saving it to file first. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Memorystream very slow
    ... >datas that already on the result stream? ... No risk. ... Good luck. ... Kurt ...
    (borland.public.delphi.language.objectpascal)