You are here: Re: pdf files as a webpage « PHP Language « IT news, forums, messages
Re: pdf files as a webpage

Posted by Michael Vilain on 08/22/05 18:17

In article <4309db23$0$21365$db0fefd9@news.zen.co.uk>,
"Mark D Smith" <usenet@NOSPAM.obantec.net> wrote:

> "Flibble" <nospam@nospam.com> wrote in message
> news:Xns96BA93E6F3600nospamnospamcom@84.92.1.10...
> > "Mark D Smith" <usenet@NOSPAM.obantec.net> wrote in news:4309a717$0$318
> > $da0feed9@news.zen.co.uk:
> >
> > > Hi
> > >
> > > is there a way to output a pdf file to a webpage?
> > > the file may contain pictures & graphs along with text.
> > >
> > > Mark
> > >
> >
> > Last time I used PDF's I did the following:
> >
> > Write the PDF to a file (if it isn't already one), forward the browser
> page
> > to that file (ie. http://www.somesite/document.pdf). The PDF should open
> > in the browser window....user will require a reader (ie. Acrobat reader)
> to
> > be installed.
>
> Tried that and my PC's open Adobe Reader. what i want is the pdf displayed
> in the webpage (if possible).
>
> Mark

Well, the display of a PDF is dependent on if the client browser can
display the MIME type. Safari in MacOS X can with a plugin. I don't
know about other browsers and OSs, but it's not a function of a
server-side language like PHP to do. You'd have to read the file in,
parse it, decode it and display it as html. Much simplier to do this on
the browser. So, I think you need to rethink your requirements. php
probably isn't the solution you're looking for. You could search out
the plugins and post URLs or a "Download PDF reader" link on your pages,
but it's up to people visiting the page to decide if they want to
install such on their browsers to view a page. Besides, PDF files are
usually much larger than HTML, so you should be giving people an option
to view such pages anyway.

--
DeeDee, don't press that button! DeeDee! NO! Dee...

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация