Replies: 1   Views: 96
Transforming docx to pdf makes the text in the table go to top right position
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 keno_renz  · 12-05-2022 - 11:03

In the link are my sample document(from createDocx() ) and pdf (generated from transformDocument()) as you can observe, the .docx is good and there is no error on the file. But when i transform it to pdf the text from the table (labels and variables) go to the top left part of the document. Im using libreoffice for the conversion. Hope somebody can tell me whats the cause or even better give me a solution. Thanks

Posted by admin  · 12-05-2022 - 11:32


What version and license of phpdocx are you using?

The problem is that almost all contents are being added using absolute positions. The DOCX, that has not been generated with phpdocx but with other DOCX program, contains one table and multiple textboxes positioned using absolute positions.

As recommended on the documentation pages (

Avoid to the greatest extent possible using absolute positions and place the contents in the document with elements like tables.

As this is a DOCX to be used as template and then transform it to PDF, we recommend you to generate it again without using aboslute positions or use LibreOffice to generate it.