CodeIgniter Basic Word integration using docx template files and PHPWord |
[eluser]heru[/eluser]
hello there ! it's been a while huh, but i came with the solution B) let me explain this step by step : 1. download PHPWord library from this site. 2. put it in application/libraries 3. in application folder, create "docs" folder (for generated documents) and "temp" folders inside "docs" folder that you created before. 4. put "template.docx" in "temp" folder. 5. now creat the controller like this : Code: public function template(){ or simply, download my attachment.
[eluser]Zeff[/eluser]
Hi all, I tried this code/library and the docx files (with gegeneric names) are correctly created in my temp folder. What if I do not want to save the file, but directly output it to the browser for download? (save_document() does not work...) I experimented with PHPWord in the past and I used this code to output my $this->word object: Code: header('Content-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document'); Any suggestions to do this right from PhpOffice? Many thanks! Zeff |
Welcome Guest, Not a member yet? Register Sign In |