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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening a file (pdf) on a page automatically?

Status
Not open for further replies.

christheprogrammer

Programmer
Jul 10, 2000
258
CA
Hi all,
How do you make a pdf file open automatically on a web page? I have found that making a hyperlink point directly to the filename works, as well as (in VB):
Response.Redirect("But, this only works on the development machine, as soon as I try it from another machine on the domain, the link fails. Is this related to absolute/relative addresses? If so, what is the format for the addresses?

Thanks a million Chris
 
you need a browser plugin to view pdf files. this may be your problem. but as far as the adress goes both relative and absolute should work.
 
Thanks, theocratic, but I have the plugin. I should have used a JPEG as an example since there is no plugin required to display one. The problem is that the image does not display on another machine (404 - not found) even though it exists in the directory. I am using absolute addressing, i.e. C:\ is not found...

Cheers Chris
 
thats you problem. the reason it only works on your machine is because that path is only on your machine. you'll have to upload the pdf file to a server in order to have others see it.
 
more to say:

you can either use a relative path, and upload the fils with the same folder structure ie. pdffiles/whatever.pdf then when you upload the files make a folder called pdffiles and up your file there. or, use an absolute path, but one that relates to a server ie.
 
Thanks for the responses - My development machine IS the server, running IIS from windows XP. I tried to bring up the file using but that doesn't work, even on this development machine/server. I must be missing something simple... damn

Chris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top