Re: Problem sending PDF as stream using iTextSharp
- From: "antonyliu2002@xxxxxxxxx" <antonyliu2002@xxxxxxxxx>
- Date: Wed, 11 Jul 2007 17:53:55 -0000
On Jul 11, 12:31 pm, "antonyliu2...@xxxxxxxxx"
<antonyliu2...@xxxxxxxxx> wrote:
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 thewww.asp.netforum,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.
I searched a little bit, and it looks like it's gonna be very hard to
send PDF as stream without saving it to file first. The workaround
would be to save it to file, and then redirect to that pdf file. When
the session expires, remove that pdf file to avoid accumulation of
junk files on the server.
.
- References:
- Problem sending PDF as stream using iTextSharp
- From: antonyliu2002@xxxxxxxxx
- Problem sending PDF as stream using iTextSharp
- Prev by Date: html table control vs web table control
- Next by Date: Re: jpeg from database to file
- Previous by thread: Problem sending PDF as stream using iTextSharp
- Next by thread: Re: Problem sending PDF as stream using iTextSharp
- Index(es):
Relevant Pages
|