473,395 Members | 1,647 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,395 software developers and data experts.

Send PDF File to client

Hello,
I'm successfully sending a PDF file stored in a database to the client.
My problem is that in Acrobat, when you choose to save a copy, the default
file name is the aspx file name.
Note that I'm not using :
Response.AppendHeader("Content-Disposition", "attachment;filename=a.pdf");
Because I want the browser to open the file by default.

TIA.

Nov 19 '05 #1
2 1804
Is this what you want?

Pay not attention to the ActiveReports stuff. Just
look at how the PDF export is being written to
the browser:

http://www.eggheadcafe.com/PrintSear...asp?LINKID=391

--
2005 Microsoft MVP C#
Robbe Morris
http://www.robbemorris.com
http://www.learncsharp.net/home/listings.aspx

"Olivier Matrot" <ol************@online.nospam> wrote in message
news:u7**************@TK2MSFTNGP10.phx.gbl...
Hello,
I'm successfully sending a PDF file stored in a database to the client.
My problem is that in Acrobat, when you choose to save a copy, the default
file name is the aspx file name.
Note that I'm not using :
Response.AppendHeader("Content-Disposition", "attachment;filename=a.pdf");
Because I want the browser to open the file by default.

TIA.

Nov 19 '05 #2
I don't think so.
As I said, the PDF file is correctly displayed on the client.

If I use the line :

Response.AppendHeader("Content-Disposition", "attachment;filename=a.pdf");

then, the file name is correct in Acrobat's 'Save a copy' dialog box, but
the user is asked to choose between opening or saving the file on disk.

"Robbe Morris [C# MVP]" <in**@turnkeytools.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Is this what you want?

Pay not attention to the ActiveReports stuff. Just
look at how the PDF export is being written to
the browser:

http://www.eggheadcafe.com/PrintSear...asp?LINKID=391

--
2005 Microsoft MVP C#
Robbe Morris
http://www.robbemorris.com
http://www.learncsharp.net/home/listings.aspx

"Olivier Matrot" <ol************@online.nospam> wrote in message
news:u7**************@TK2MSFTNGP10.phx.gbl...
Hello,
I'm successfully sending a PDF file stored in a database to the client.
My problem is that in Acrobat, when you choose to save a copy, the
default file name is the aspx file name.
Note that I'm not using :
Response.AppendHeader("Content-Disposition",
"attachment;filename=a.pdf");
Because I want the browser to open the file by default.

TIA.


Nov 19 '05 #3

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

Similar topics

14
by: edykstra | last post by:
Hello, If you point your browser to this page, http://prdownloads.sourceforge.net/vnc-tight/tightvnc-1.2.9_x86_viewer.zip?use_mirror=umn the server sends you the HTML page, and very soon...
0
by: zhimin | last post by:
Hi, I'm writing a program to send large file(100m) through dotnet using TCPListener & TCPClient, I'm sending the file with a ask and response loop: 1. Client send a flag 1 to server indicate it...
1
by: Nguyen Thanh Danh | last post by:
I'm a student, i try search on Internet but i can't find any sample how to send file throught socket, between 2 computer! Please help me! Thanks!
4
by: wackyphill | last post by:
Is there a way to code it so that you can transmit a file to a client programatically so that you could send it a file that is not part of your website? Like if my site is in c:\inetpub\mySite ...
2
by: Robbie De Sutter | last post by:
Hello, How do I open a new, empty e-mail message from the default e-mail client whereby the sender is given and a file is attached? Currently I use the command (vb.net): ---...
1
by: Henk | last post by:
Hi, I made a client and server application. I'm trying to send an xml file from the server to the client. It works, but there are some problems: the file the client receives is the same as the file...
14
by: eliss.carmine | last post by:
I'm using TCP/IP to send a Bitmap object over Sockets. This is my first time using C# at all so I don't know if this is the "right" way to do it. I've already found out several times the way I was...
9
by: Mahernoz | last post by:
Can i send an email from JavaScript? Is it possible? If yes please the code to send email using javascript...
0
by: romcab | last post by:
hi guys, Hope you can help me with this one. I have a client/server app. The server is connected to a sql database and when the client connect to the server, the server will download the database...
2
by: SvenV | last post by:
I based my program on the asynchronous client/server example on msdn. There weren't too many modifications to the original code. I just created some extra code to response to different messages. F.e....
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.