Board index   FAQ   Search  
Register  Login
Board index PHP PHP Scripts

Open or save a pdf file using php script

Links for php scripts

Moderators: macek, egami, gesf

Open or save a pdf file using php script

Postby Hem » Fri Aug 31, 2012 8:15 pm

Hello

I am very new to PHP, so apologize for my ignorance. I am writing a PHP server side script . I have to give user the ability to save a PDF file or open it using Acrobat Reader. How can I do this?

The file is in the same directory as the script.

I am using Apache on a Linux

Can I please get some help. Much appreciated
Hem
New php-forum User
New php-forum User
 
Posts: 2
Joined: Fri Aug 31, 2012 8:01 pm

Re: Open or save a pdf file using php script

Postby johnj » Sun Sep 02, 2012 2:11 am

To open, the user should have acrobat installed on their machine (computer).

To save - you can use a open source lib like fpdf (http://www.fpdf.org/) which has a php class or look into the php manual on php.net as php version 4.0.5 has a pdf lib.
johnj
php-forum Super User
php-forum Super User
 
Posts: 1805
Joined: Thu Mar 10, 2011 5:07 pm

Re: Open or save a pdf file using php script

Postby Hem » Tue Sep 04, 2012 10:09 pm

Acrobat is installed on the machine where the browser is (client)

The link above is more to construct pdf

I already have a pdf file. I am looking for a code to save it to disk.

Thanks
Hem
New php-forum User
New php-forum User
 
Posts: 2
Joined: Fri Aug 31, 2012 8:01 pm


Return to PHP Scripts

Who is online

Users browsing this forum: Google [Bot] and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.