This is a discussion on Displaying a PDF from PHP within the PHP Language forums, part of the PHP Programming Forums category; Hi... Problem: I have PDF's sitting on somewhere (not on the client), and, using a database command, a selection ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi...
Problem: I have PDF's sitting on somewhere (not on the client), and, using a database command, a selection list of what PDF's they have stashed is displayed. When the person selects the PDF they want displayed, I want to do *something* in PHP which allows me to display the PDF on their screen. Problem is: have absolutely no idea if this is even possible, or if it is, how to go about it. Anyone have a suggestion?? Thanks in advance, Joe |
|
|||
|
Joe Trubisz wrote:
> Hi... > > Problem: I have PDF's sitting on somewhere (not on the client), and, > using a database command, a selection list of what PDF's they have > stashed is displayed. When the person selects the PDF they want > displayed, I want to do *something* in PHP which allows me to display > the PDF on their screen. > > Problem is: have absolutely no idea if this is even possible, or if it > is, how to go about it. > > Anyone have a suggestion?? http://us3.php.net/fpassthru would be a good place to start reading. -- Justin Koivisto - spam@koivi.com PHP POSTERS: Please use comp.lang.php for PHP related questions, alt.php* groups are not recommended. |
|
|||
|
or
http://www.php.net/manual/en/ref.pdf.php "Joe Trubisz" <trubisz@yahoo.com> wrote in message news:89cfa378.0311121102.32224f54@posting.google.c om... > Hi... > > Problem: I have PDF's sitting on somewhere (not on the client), and, > using a database command, a selection list of what PDF's they have > stashed is displayed. When the person selects the PDF they want > displayed, I want to do *something* in PHP which allows me to display > the PDF on their screen. > > Problem is: have absolutely no idea if this is even possible, or if it > is, how to go about it. > > Anyone have a suggestion?? > > Thanks in advance, > Joe |
|
|||
|
On 12 Nov 2003 11:02:58 -0800, trubisz@yahoo.com (Joe Trubisz) wrote:
>Hi... > >Problem: I have PDF's sitting on somewhere (not on the client), and, >using a database command, a selection list of what PDF's they have >stashed is displayed. When the person selects the PDF they want >displayed, I want to do *something* in PHP which allows me to display >the PDF on their screen. > >Problem is: have absolutely no idea if this is even possible, or if it >is, how to go about it. I would do this by having a cache directory within your web root, and write the code to (a) move the PDF file to the cache directory (re-naming it on the way to something unique), and then (b) call header() and redirect to the file... You could open the PDF file as a stream and deliver it to the client too, but I like the cache method myself - for instance, if you had a hundred people looking at the same PDF, if you keep a little database table of what is in the cache, you only cache one file and deliver it a hundred times. Just my two penneth :) |
|
|||
|
On 12 Nov 2003 11:02:58 -0800, Joe Trubisz wrote:
> Hi... > > Problem: I have PDF's sitting on somewhere (not on the client), and, > using a database command, a selection list of what PDF's they have > stashed is displayed. When the person selects the PDF they want > displayed, I want to do *something* in PHP which allows me to display > the PDF on their screen. > > Problem is: have absolutely no idea if this is even possible, or if it > is, how to go about it. > > Anyone have a suggestion?? > > Thanks in advance, > Joe Assuming the client has Acrobat, can't you just redirect them to where the PDF is stored? Or, if it's in a non-web location, make a cache-copy somewhere linkable and redirect to that. If you're not assuming they have Acrobat (You want to PDF->HTML), then that's out of my league. -- -- Rudy Fleminger -- sp@mmers.and.evil.ones.will.bow-down-to.us (put "Hey!" in the Subject line for priority processing!) -- http://www.pixelsaredead.com |