PDF File help!

  • Thread starter Thread starter Ami
  • Start date Start date
A

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();
 
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
 
And the pdf file on the machine (or directory) is named "myLocalFile.pdf"
Looks like you are missing the full path?
 
Back
Top