473,396 Members | 2,034 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.

PDF File help!

Ami
Hi All
I am using this code to open a PDF file and it works fine in Windows
Server 2003, but not
working in Windows XP and 2000. The Download box has Open, Save and
Cancel option, but
when I click Open option, it is not opening the file, instead, it is
asking us to select the Program from the list to open the file and
sometimes giving the error, "There is an error opening this file"
error. This is urgent and any help is highly appreciated. Thank you.

Response.ContentType = "application/pdf";
Response.AppendHeader("Content-Disposition", "attachment;
filename=myfile.pdf");
Response.WriteFile("myLocalFile.pdf");
Response.End();

Sep 13 '06 #1
3 1261
Ami;

Sounds like you do not have Acrobat Adobe Reader on the machine.

Are you trying to view the document in the browser?

HTH,
Austin

"Ami" <am******@gmail.comwrote in message
news:11**********************@p79g2000cwp.googlegr oups.com...
Hi All
I am using this code to open a PDF file and it works fine in Windows
Server 2003, but not
working in Windows XP and 2000. The Download box has Open, Save and
Cancel option, but
when I click Open option, it is not opening the file, instead, it is
asking us to select the Program from the list to open the file and
sometimes giving the error, "There is an error opening this file"
error. This is urgent and any help is highly appreciated. Thank you.

Response.ContentType = "application/pdf";
Response.AppendHeader("Content-Disposition", "attachment;
filename=myfile.pdf");
Response.WriteFile("myLocalFile.pdf");
Response.End();

Sep 13 '06 #2
Ami
No I have Acrobat Reader in the machine and can open other PDF Files.
Thank you.
Austin Phillips wrote:
Ami;

Sounds like you do not have Acrobat Adobe Reader on the machine.

Are you trying to view the document in the browser?

HTH,
Austin

"Ami" <am******@gmail.comwrote in message
news:11**********************@p79g2000cwp.googlegr oups.com...
Hi All
I am using this code to open a PDF file and it works fine in Windows
Server 2003, but not
working in Windows XP and 2000. The Download box has Open, Save and
Cancel option, but
when I click Open option, it is not opening the file, instead, it is
asking us to select the Program from the list to open the file and
sometimes giving the error, "There is an error opening this file"
error. This is urgent and any help is highly appreciated. Thank you.

Response.ContentType = "application/pdf";
Response.AppendHeader("Content-Disposition", "attachment;
filename=myfile.pdf");
Response.WriteFile("myLocalFile.pdf");
Response.End();
Sep 13 '06 #3
And the pdf file on the machine (or directory) is named "myLocalFile.pdf"
Looks like you are missing the full path?

"Ami" <am******@gmail.comwrote in message
news:11*********************@h48g2000cwc.googlegro ups.com...
No I have Acrobat Reader in the machine and can open other PDF Files.
Thank you.
Austin Phillips wrote:
>Ami;

Sounds like you do not have Acrobat Adobe Reader on the machine.

Are you trying to view the document in the browser?

HTH,
Austin

"Ami" <am******@gmail.comwrote in message
news:11**********************@p79g2000cwp.googleg roups.com...
Hi All
I am using this code to open a PDF file and it works fine in Windows
Server 2003, but not
working in Windows XP and 2000. The Download box has Open, Save and
Cancel option, but
when I click Open option, it is not opening the file, instead, it is
asking us to select the Program from the list to open the file and
sometimes giving the error, "There is an error opening this file"
error. This is urgent and any help is highly appreciated. Thank you.

Response.ContentType = "application/pdf";
Response.AppendHeader("Content-Disposition", "attachment;
filename=myfile.pdf");
Response.WriteFile("myLocalFile.pdf");
Response.End();

Sep 13 '06 #4

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

Similar topics

21
by: Dave | last post by:
After following Microsofts admonition to reformat my system before doing a final compilation of my app I got many warnings/errors upon compiling an rtf file created in word. I used the Help...
9
by: Hans-Joachim Widmaier | last post by:
Hi all. Handling files is an extremely frequent task in programming, so most programming languages have an abstraction of the basic files offered by the underlying operating system. This is...
4
by: dixie | last post by:
Help, I'm really out of my depth here (not unusual I hear you say :-). I have just installed HTML Help in an application. I told it in the Project Properties the path to the help file. I then...
1
by: Tim Marshall | last post by:
I'm putting together my first help file (using Easy Help, http://www.easyhelp.com/). So far, so good. I'm able to use the Help File and Help Context ID to have things from my help file pop up...
6
by: Sushil Prasad | last post by:
I am having problem in displaying the compiled help file. In asp.net app I have link button labeled help. On the users click of this button i do the respose.redirect to the url of the .chm file....
4
by: News | last post by:
Hi Everyone, The attached code creates client connections to websphere queue managers and then processes an inquiry against them. The program functions when it gets options from the command...
8
by: Andrew Robert | last post by:
Hi Everyone. I tried the following to get input into optionparser from either a file or command line. The code below detects the passed file argument and prints the file contents but the...
2
by: quicklearner | last post by:
hi I have made a CHM file and I have linked my .CHM file with the controls on the Form in my application which is made in C# 2005. Its working fine . But I want that if user presses 'F1' then when...
2
by: avanti | last post by:
Hi, I use ClickOnce to publish and install an application in the company. I have a help file for the same in .chm format. It is part of the C# project as a 'content' file. I also tried as...
2
by: hotflash | last post by:
Hi All, I found the best pure ASP code to upload a file to either server and/or MS Access Database. It works fine for me however, there is one thing that I don't like and have tried to fix but...
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
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
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...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.