Umang Bista
Umang Bista

Reputation: 33

Php:Creating PDF file

I'm wondering is this is possible or not? Suppose i have div containing 10 Questions,Options and Answers. Now,if user want to copy content of that div he has to manually select and copy the content using mouse and paste on his editor(Ms Word or some other editors).

But what i want is when user clicks the download button the content gets copied to the pdf(or other file) file and can be downloaded.

Upvotes: 2

Views: 101

Answers (4)

doniyor
doniyor

Reputation: 37846

i think, you need fpdf lib.

to create txto other similiar file from the content of the page:

  • open/create file
  • read_page = read the page content
  • file_put_content(read_page)
  • file is ready to download

Upvotes: 1

user767124
user767124

Reputation:

Great PDF lib for creating PFDs is mpdf just try example, you would be amazed how easy it is: http://www.mpdf1.com/

Upvotes: 1

user1421727
user1421727

Reputation:

FPDF is probably the best library to create PDF's in PHP

Check out fpdf website here : http://www.fpdf.org/

Best for Multiple layers of text/images Watermarks Barcodes much more

Do check out the Scripts section in the website

Upvotes: 1

Mr. Alien
Mr. Alien

Reputation: 157284

You need to use fpdf for that

Here's a nice tutorial of how to create a pdf file using PHP

Reference

Upvotes: 1

Related Questions