Forum


Replies: 6   Views: 3120
Transform docx to pdf
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 boldig  · 11-04-2013 - 12:13

Hi

i used following code

require_once '../../classes/TransformDocAdv.inc';

$docx = new CreateDocx();


$docx->enableCompatibilityMode();


$html.= '<table border="1">';
$html.= '<tbody><tr><td style="background-color: yellow">1_1</td><td rowspan="3" colspan="2">1_2</td></tr>';
$html.='<tr><td>Some random text.</td></tr>';
$html.='<tr><td><ul><li>One</li><li>Two <b>and a half</b></li></ul></td></tr>';
$html.='<tr><td>3_2</td><td>3_3</td><td>3_3</td></tr></tbody>';
$html.= '</table>';

$docx->embedHTML($html);

$docx->createDocx('example_text');

// using default method
$docx->transformDocx('example_text.docx', 'example_text.doc');
$docx->transformDocx('example_text.docx', 'example_text.pdf');


i tried converting the docx file into pdf, however for some reason the right hand side of the document is getting cut.

Thanks