Forum


Replies: 3   Views: 4420
Width and height properties
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 pphornet  · 11-04-2013 - 12:13

try it code (without image, sorry)

[code]<?php
require_once '../phpdocx_pro/classes/CreateDocx.inc'; // don't forget change path!


$docx = new CreateDocx();
$docx->enableCompatibilityMode();

$return_txt = "<table style="width:400pt;">";
$return_txt .= "<tr style="height:150pt; vertical-align:top;"><td style="width:100pt;border:1px solid black"><p>My question is not so simple</p></td>";
$return_txt .= "<td style="width:300pt;border:1px dotted red; vertical-align:middle;"><p style="text-align: center;">here image</p></td></tr>";
$return_txt .= "</table>";
$docx->embedHTML($return_txt);

$return_txt = "<table style="width:100%;">";
$return_txt .= "<tr style="height:150pt; vertical-align:top;"><td style="width:100pt;border:1px solid black"><p>My question is not so simple</p></td>";
$return_txt .= "<td style="border:1px dotted red; vertical-align:middle;"><p style="text-align: center;">here image</p></td></tr>";
$return_txt .= "</table>";
$docx->embedHTML($return_txt);


$docx->createDocx('Example');
?>[/code]