Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error: File damaged and could not be repaired

Status
Not open for further replies.

novasoy

Programmer
May 8, 2002
12
0
0
US
I know one cannot keep a user from saving a web-distributed (Acrobat 5.05) PDF to his/her hard drive, but I'm trying to make it as hard as I can. To that end I have altered the document properties to hide the toolbar and menubar, which works great. Not satisfied with that, rather than refer to the PDF file directly with a regular hyperlink, I want to do a ASP redirect to the file. That has the added bonus feature of hiding the PDF filename and preventing the user from doing a "Save Target As..." on the hyperlink.

Everything seems to work great, except for one detail. I get the above error as the PDF is opening in the browser. The redirect seems to be working fine because I can see the address bar and title bar change, and Acrobat obviously is starting up.

Any ideas?
 
I am not sure, but I think you will need to change the response.type to "application/vnd/pdf" (this is an estimation - I can't get to my normal workstation for clarification) or something like that, as you may already be writing the response in the standard format before the response.redirect. Derren
[Mediocre talent - spread really thin]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top