Page 1 of 1

Advice for design using PDF files in PHP

Posted: Wed May 19, 2004 12:04 pm
by glebreck
Hey guys a little new to PHP. My backgroung is in ASP but I'm making the switch.

I have a problem I am trying to solve for a custmer. They have a large PDF file which they upload to a database I have created for thier site. Rather than just a link to the PDF file they would like to display it's contents on the web page(s).

Now I have tried embedding the PDF to the page but it still must load the whole thing, not good considering most of their users are dial up.

Is there a way create the html within a PHP page from the pdf file in their site. The PDF will change so it needs to be dynamic, but I need links and all.

Is this even possible?

Posted: Wed May 19, 2004 12:10 pm
by feyd

I don't think thats the right thing

Posted: Wed May 19, 2004 12:21 pm
by glebreck
From what I understand from the link you sent that is for creating PDF from Php. I want to take a PDF and put into a PHP page!

Thanks Though

Posted: Wed May 19, 2004 3:10 pm
by Draco_03
pdf is like any media.. so all you have to do is to upload it on your server and put an html link to it.. there no php involved in that

Code: Select all

ex :
<a href="path/to/my/pdf.pdf">Click here</a> to read pdf
and that's it

Posted: Wed May 19, 2004 4:15 pm
by Weirdan
Perhaps glebreck talking about something like Google's "View as HTML" for pdfs....

Posted: Wed May 19, 2004 5:35 pm
by McGruff
The most efficient way to manage this might be a single data source which (using php) can serve up the content in either format - if that's possible in your set up? The php app could run on an office network or on a web site.

I should say I haven't mucked about with pdf from php myself so I couldn't say how well it works in practice.

Posted: Wed May 19, 2004 5:44 pm
by feyd
there's always writing your own reader:
http://partners.adobe.com/asn/acrobat/s ... e15_v5.pdf WARNING: 13.5MB

Posted: Wed May 19, 2004 6:27 pm
by patrikG
To view a PDF inline, you'll have to pass it the correct [php_man]header[/php_man]. If you scroll down a little bit, you'll find a section dedicated to PDF.

Personally, I have relied on ezPDF to do pretty much everything for me (incl. headers) and it works beautifully.

------------------
Edit: oops - misunderstood your post. Converting PDF to HTML or any such thing, hmm... a google-search turned up quite a number of links for that. Aparently there is an app called "pdf2html" - a linux rpm which you could use from PHP with [php_man]exec[/php_man]. Would be interested in which package you'd chose - let us know :)