Forum


Replies: 3   Views: 3141
Pdf dont get styles of docx
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 nschulze  · 20-01-2011 - 15:26

# jolyon2000

Hi have created a script which creates a PDF document from DOCX document, however, the formatting in the PDF document does not resemble that of the DOCX document at all!! My code is:

require_once(”TransformDoc.inc”);
$document = new TransformDoc();
$document->setStrFile($UTILS['AUDIT_REPORTS_REPOSITORY'].’/template_table.docx’);
$document->generatePDF();

I have the Pro version so i would expect this to work!

# nschulze
@jolyon

i got the same problem =/


like jolyon and i already reported
nothing of the styles from the docx were set to the pdf

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

until now i found out, that the styles are missing completely

the xml file begins with the body tag

which function should add the meta information and the styles to the xhtml file?

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

Hi,

PDF transformations are possible with a XSL created by Microsoft and DOMPDF.
The process is:

DOCX ---> (XSL) ---> HTML ---> (DOMPDF) ---> PDF

We're working to improve HTML and PDF documents, to solve the possible issues with missing styles.