Home > PHPtoWord

PHPtoWord

PHPtoWord is a project mainly written in PHP, it's free.

PHP class which outputs a Word file

PHPtoWord Alpha version - - August 20, 2011

Description: The purpose of this class is to assist in outputting a Word document.

Trying to create an html page that will output to Word is time consuming and solutions, as well as information on the web, is currently very limited. This class consists of functions which make the file creation much more simple.

//Hello World example //helloworld.php

Available Functions: open(), paragraph(), lineBreak(), pageBreak(), header(), footer(), setFont(), image(), table(), writeFile(), bulletedList()...

Future Project Plans:

  1. Add the ability to display as a webpage as well as output a file. //This is easily done but the css needed for the layout to look correct in Word will not appear correct on the web and vice versa.
  2. Improve footer function to appear at the true foot of the page. //Right now the footer will appear wherever the current cursor placement is when calling the function.
  3. Improve image resizing so that the image stays in proportion when only a Width or Height are given.
  4. Expand on the capabilities of table and list generation.
  5. Clean up the unnecessary style code within the body.
  6. Add more Word functionality. //Pie Charts, Graphs, Links, Shapes, Bookmarks...
Previous:tik