How do I open a PDF document using php script

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
daniel02
Forum Newbie
Posts: 5
Joined: Tue Mar 23, 2004 3:58 pm
Location: dallas, tx

How do I open a PDF document using php script

Post by daniel02 »

I currently have a hyperlink on my website that links to a PDF document. However, when you click on a hyperlink it actually creates a copy of the file and displays it. I want to be able to open the actual file itself, not a copy of it. Is this possible using PHP? Thanks!

:?:
magicrobotmonkey
Forum Regular
Posts: 888
Joined: Sun Mar 21, 2004 1:09 pm
Location: Cambridge, MA

Post by magicrobotmonkey »

whats the difference?
daniel02
Forum Newbie
Posts: 5
Joined: Tue Mar 23, 2004 3:58 pm
Location: dallas, tx

Post by daniel02 »

The reasons are more complicated than I can really describe in typing. The bottom line is that I need to be able to do it and was just wondering if it is possible.
magicrobotmonkey
Forum Regular
Posts: 888
Joined: Sun Mar 21, 2004 1:09 pm
Location: Cambridge, MA

Post by magicrobotmonkey »

whats the difference between "open" ing it and "Display" ing it? I don't really understand what you want to do
daniel02
Forum Newbie
Posts: 5
Joined: Tue Mar 23, 2004 3:58 pm
Location: dallas, tx

Post by daniel02 »

Let me rephrase...
I currently have a hyperlink on my website that links to a PDF document. However, when you click on a hyperlink it actually creates a copy of the file and opens it. I want to be able to open the actual file itself, not a copy of it. Is this possible using PHP?

In other words, I want to open the pdf file that is on the server. A hyperlink opens a copy of the file and not the file itself. Does that clear it up at all? Thanks.
magicrobotmonkey
Forum Regular
Posts: 888
Joined: Sun Mar 21, 2004 1:09 pm
Location: Cambridge, MA

Post by magicrobotmonkey »

Are you trying to edit it?
daniel02
Forum Newbie
Posts: 5
Joined: Tue Mar 23, 2004 3:58 pm
Location: dallas, tx

Post by daniel02 »

Really my question is simply this...Can you open a pdf file using PHP? I want to use PHP to open the file using Acrobat Reader without using a hyperlink.
magicrobotmonkey
Forum Regular
Posts: 888
Joined: Sun Mar 21, 2004 1:09 pm
Location: Cambridge, MA

Post by magicrobotmonkey »

You want to do it automatically? I think header() might work look it up
daniel02
Forum Newbie
Posts: 5
Joined: Tue Mar 23, 2004 3:58 pm
Location: dallas, tx

Post by daniel02 »

You know what, that did not seem to be the solution, but I just recognized a flaw in my plan. What I'm wanting to do is not going to work for what I need. I might create a new post if I can figure out how to word my problem. Thanks anyways...
Post Reply