Forum


Replies: 4   Views: 3388
Blank document in windows/centos/debian linix environments
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by vami_kri  · 22-07-2013 - 13:31

Dear all



I'm getting blank document while trying to create a simple hello world example



Envionment:



Windows - PHP 5.3.1/tidy/zip/XSLT enabled



Debion Linux - PHP 5.3.8 /zip/XSLT enabled



Centos Linux - PHP 5.4.1 /Zip/XSLT enabled



Used Code:



require_once 'classes/CreateDocx.inc';

$docx = new CreateDocx();

$text = array();

$text[] =

    array(

    'text' => 'I am going to write'

    );

$text[] =

    array(

    'text' => ' Hello World!',

    'b' => 'on'

    );

 

$text[] =

    array(

    'text' => ' using bold characters.'

    );

$docx->addText($text);

$docx->createDocx('tmp/hello_world_2');



Log:



2013-07-22T16:54:31+05:30 phpdocx_logger INFO  Create a temp file to use as initial ZIP file. DOCX is a ZIP file.

2013-07-22T16:54:31+05:30 phpdocx_logger INFO  Set language.

2013-07-22T16:54:31+05:30 phpdocx_logger INFO  Add text to word document.

2013-07-22T16:54:31+05:30 phpdocx_logger INFO  Set DOCX name to: tmp/hello_world_2.

2013-07-22T16:54:31+05:30 phpdocx_logger INFO  DOCX is a new file, not a template.

2013-07-22T16:54:31+05:30 phpdocx_logger INFO  Remove existing template tags.

2013-07-22T16:54:31+05:30 phpdocx_logger INFO  Add word/document.xml content to DOCX file.

2013-07-22T16:54:31+05:30 phpdocx_logger INFO  Close ZIP file

2013-07-22T16:54:31+05:30 phpdocx_logger INFO  Copy DOCX file using a new name.



File get created but with no content.



Please advices