Manipulate pdf files

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
youssef
Forum Newbie
Posts: 1
Joined: Sat Jun 26, 2010 9:56 am

Manipulate pdf files

Post by youssef »

hello

we are trying to manipulate pdf files, we could upload files and download them on the disck but we would like to show the pdf files on browser directly (without downloading the files on the disck)

thanks a lot
cpetercarter
Forum Contributor
Posts: 474
Joined: Sat Jul 25, 2009 2:00 am

Re: Manipulate pdf files

Post by cpetercarter »

If a user clicks on a link to a pdf file, the settings which the user has set for his/her browser will determine what happens next. On my computer, for example, a dialogue box will display asking whether I want to download the file or display it using my pdf programme. Other users will have different preference settings in their browser. Some may not have a pdf programme like Adobe on their computer, or a pdf plugin for their browser, at all. In other words, the server cannot control whether the user displays or saves the pdf file.

Perhaps what you are thinking about is a php script which converts a pdf document into html and then sends the html to the browser. Unfortunately, I dont think that such a script exists. There are online pdf to html converters, and various desktop utilities which will do this job, but I cannot find anything which will use php to convert a document "on the fly". It seems that converting html to php is easy (there are several very good pdf classes which will do this) but that pdf to html is difficult.
Post Reply