473,322 Members | 1,241 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Displaying a PDF from PHP

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
Jul 17 '05 #1
4 2471
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 - sp**@koivi.com
PHP POSTERS: Please use comp.lang.php for PHP related questions,
alt.php* groups are not recommended.

Jul 17 '05 #2
or

http://www.php.net/manual/en/ref.pdf.php

"Joe Trubisz" <tr*****@yahoo.com> wrote in message
news:89**************************@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

Jul 17 '05 #3
On 12 Nov 2003 11:02:58 -0800, tr*****@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 :)
Jul 17 '05 #4
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
Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Waguih Boctor | last post by:
Hi, I have a number of ASP pages where some JPGs and GIFs are displaying in the browser and some are not. I have included an excerpt from the HTML below. In this example, the gif file at the...
8
by: euang | last post by:
Hi, I have been using access 2000 for two years on WINDOWS NT to display dynamic aweb page using ASP My ISP has now changed to Windows 2003, and I am having major problems displaying...
1
by: Dave Posh | last post by:
I seem to be having a problem displaying time stored in mysql. The format stored in the database is 13:15:05. The database data type is time. I'm using asp vbscript and sql to retrieve the time...
2
by: Joe Price | last post by:
Hi chaps I've got an XML file, within that file i've embedded html code using the <!]> tag I'm displaying that xml file through a browser using an xsl style sheet. However it is displaying...
1
by: Yoshitha | last post by:
hi I have datalist control in my ASP.NET application the problem here is i have used a textbox with multiline true propertly when i enter data like "fdjsfhjksdhfjsdfhsdjhfsdfhsdjfhsd...
2
by: Carole MacDonald | last post by:
There have been lots of posts on this topic, but I haven't been able to apply any of the suggestions to my situation. I have an .aspx page with a form on it that has several submit buttons on...
5
by: Robert | last post by:
Hello Accessors I have some reports created in Access that are very good for what they do. However, it seems to me that when you are displaying information you don't need to print out that a...
2
by: RAJ | last post by:
In our multi-tier application, we have several ASP.NET user controls which will update the same data source provided by middle tier logic. In this particular scenario we have one user control...
0
by: dipper | last post by:
I have a dataset with several tables. Now i want to create different dataviews displaying results from some of the tables. I manage to create a view displaying 1 table, but how do i create a view...
33
by: buss123 | last post by:
Hi all, combo box script code was working in IE perfectly with all modes but OnChange event was not working in FireFox(editable mode, if we select valuese that combo box values r...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.