473,396 Members | 1,914 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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.

Jul 11 '07 #1
0 2174

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Matt Chaplain | last post by:
Hi there. I'm writing a program that uses the Telnet protocol over TCP/IP sockets. Of course, that has no bearing here, so I'll rephrase that in Standard C++ :) In essense, I'm trying to...
11
by: Abhishek | last post by:
I have a problem transfering files using sockets from pocket pc(.net compact c#) to desktop(not using .net just mfc and sockets 2 API). The socket communication is not a issue and I am able to...
6
by: Ted | last post by:
Hello all, Please could somebody with a little time on their hands help me with my net sockets program? The aim is to send multiple transactions via C# network stream and read them back. The...
0
by: Sebastian Meier | last post by:
Hi everyone, i have the following problem. I tried to import the file ICSharpCode.SharpZipLib.dll into my VS Project. The Result was the following. Warning: Dependence...
1
by: SevDer | last post by:
Hi, I am trying to write a simple application which copies the predefined files (hardcoded in the code) to my ftp server. I couldn't make it working. I don't want to use any 3rd party...
3
by: Danny Tuppeny | last post by:
Hi all, I'm trying to send a null character as a string delimiter through a TcpClient (code below). It's to connect to this poker bot room: http://games.cs.ualberta.ca/webgames/poker/bots.html...
3
by: dgk | last post by:
This code sends a PDF but ends the application. How can I send the stream but keep the session running? Thanks. Dim ms As New system.io.memorystream Dim document As New iTextSharp.text.Document...
0
by: duclm | last post by:
Hi all, II am having problem sending zip file(binary file) using webrequest function from wince5.0 device to a webpage. It works fine for any file with size less than or equal to 1.5kb. Any bigger...
0
by: ankitnagpal1692 | last post by:
When password in Arabic language is set in pdf using itextsharp, it does not open in Adobe Acrobat Reader using the same password in Arabic. While it is working fine for English language. When I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.