Question

I have a page with dynamic content and would like the user who creates the report to send the result as an email attachment (pdf & excel). How would be the best way to do this ?

Thanks

Was it helpful?

Solution

  • For email: PHPMailer()
  • For excel: PHPExcel()
  • For PDF: domPDF or prince

Just use google to find each of these. This is a pretty complicating process, but if you do it step by step then you should be able to figure it out. Prince is not free, but looks much better than domPDF.

  1. Create excel version of report on server.
  2. Create PDF version of report on server.
  3. Email both files with reports attached.
  4. Delete files from the server.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top