This project is read-only.

May I use PHPWord_Template class within a website, which I'll be selling?

Jun 5, 2014 at 10:07 PM
I'm programming a website in PHP which requires the use of certain documents. This class would make it a lot easier for me to modify a certain template and send the filled document.

I've read the license but I'm still not sure if this type of situation is in there.

The only way someone will know who programmed this class will be by watching a preview of the system and/or by accessing it's source code. The file will be inside the same structure in which came in ( Some_Directory/PHPWord/Template.php ) and I'll just get rid of the other classes, for now because there's no need for them on this system.

The only thing I'm asking is for the files PHPWord.php and Template.php. I'll modify the second one to make it even easier for me to output the final document as a PDF File (unless you already have that feature and I didn't see it. On that case, I guess I'm also asking for that file/class/function as well)

I will not publish anything until I get the confirmation from someone who can give me such answer. I'll be constantly checking this post (e-mail notifications are awesome), so... I'm hoping to see some reply soon :)

Thanks for your time and effort,
Jun 6, 2014 at 3:27 PM
Edited Jun 6, 2014 at 3:28 PM
Hi Carlos,

PHPWord is licensed under LGPL. You may modify and redistribute any parts of this library for commercial purpose, but you have to provide the source code for that part ONLY. Not your whole application.

If you want to protect other parts of your application, you may need to adjust the way you structure your code so that the parts that you have to give away contain minimum amount of intellectual property that you want to protect.
Marked as answer by Mrcdinis on 6/12/2014 at 8:28 AM
Jun 6, 2014 at 5:33 PM
Edited Jun 6, 2014 at 5:35 PM
So, can I just put a link on a page, somewhere, to download the source code of all the classes I'm using from PHPWord and everything's fine?

By the way, just to make sure, does PHPWord have a class/function to convert/safe the document as a PDF file, Or even something to protect the final .docx file from being modified, in any way possible?
Jun 7, 2014 at 1:32 AM
Yes. If you're using other open-source libraries, it may be best for you to group them together.

The development of PHPWord is continued on GitHub. We now have a PDF writer, but not fully developed. Here's the doc:
Marked as answer by Mrcdinis on 6/12/2014 at 8:28 AM