Forum


Replies: 7   Views: 3484
Addhtml write nothing
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 naoki.peter  · 09-05-2011 - 12:06

Hi,

I'm trying to produce a docx file from basic html code:

[code]
require_once 'phpdocx_pro/classes/CreateDocx.inc';

$docx = new CreateDocx();
$html= '<p>This will insert the name in the document: <i>test</i></p>';
$docx->addHTML($html);

$docx->createDocxAndDownload('example_html');
[/code]

the file is created without any warnings / errors. But when I open the document in word, it shows only a blank page.

the code is similiar to the one at the documentation section: [url]http://www.phpdocx.com/documentation/add_html_word_document[/url]
The code in the documentation doesn't work at all.

Is there a dependency that I missed?

Greetings, naoki.peter

Posted by nicolas  · 11-04-2013 - 12:12

Check if the "php_tidy" extension is set on your webserver ?

Posted by naoki.peter  · 11-04-2013 - 12:12

Hi,

the php_tidy extension is installed. I poste below the tidy configuration from the phpinfo output:

[code]
tidy

Tidy support enabled
libTidy Release 25 March 2009
Extension Version 2.0 ($Id: tidy.c 294893 2010-02-11 17:36:40Z johannes $)

Directive Local Value Master Value
tidy.clean_output no value no value
tidy.default_config no value no value
[/code]

any help is appreciated, thank you

Posted by admin  · 11-04-2013 - 12:12

Hello,

Phpdocx pro 2.3 will include a new HTML to DOCX with many improvements. Tomorrow will be phpdocx 2.2 available so phpdocx 2.3 will be ready ASAP.

Regards.

Posted by admin  · 11-04-2013 - 12:12

Hello,

Next week we hope to release phpdocx 2.3 with support HTML, RTF and DOCX embed in new DOCX and in templates, and other features.

Regards.

Posted by browniecorp  · 11-04-2013 - 12:12

Hello, Team!
addHtml() method doesn't process "padding" parameters

For example:
[code]
$html="<p style='padding-left:10px'>Text</p>";
$docx->addHTML($html);
[/code]

There is no padding in the result docx document.
Can you advice smth?

Thank you.



Posted by mina.nsami  · 11-04-2013 - 12:12

[quote][b]Quote from admin on May 27, 2011, 11:55[/b]
Hello,

Next week we hope to release phpdocx 2.3 with support HTML, RTF and DOCX embed in new DOCX and in templates, and other features.

Regards.[/quote]

hi we are developing a program to output HTML, our dev environment is as follows:

1. Linux (Ubuntu)
2. LibreOffice
3. All the prerequisites needed by PHPDocx is there (we ran the PHPDocx/check.php)
4. PHPDocx Pro version 2.4

even you example of the HTML in the intermediate folder doesn't work, only addBasicHTML is working but with simple text (works perfectly in the easy example), but when using addHTML it doesn't work at all.

Please advice with specific details. I know there is an issue regarding the altChunk parameters but we are stuck with a deadline and we are trying to move forward.

Thanks a lot, I'm looking forward to hearing from you.