Forum


Replies: 3   Views: 978
Pdf conversion: table cell padding stripped
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 Lochspring  · 15-11-2021 - 13:27

HI.  We're using PHPDocx 10 here for our HTML to DOCX/PDF conversion.  We have managed to get our docx files to generate pretty much the way we want, complete with using WordStyles for the control over the look and feel, by and large.  However, we're running into some problems with table cell padding.  

Attached, please find a link to a  GDrive folder with copies of the documents I reference here.  There, you'll find a copy of the Sample docx Im starting with.  As you can see in the docx, there are .16" paddings inside each cell (applied to whole table via WordStyle). When I run this through libreoffice's converter directly, via the soffice CLI command, I get the document marked as Sample - CLI.pdf, which has my padding correctly applied.  When I run it through Sample_1.php in the transform document examples, I get the document marked Sample - PHP.pdf.  My cell paddings have all been set back to Word Default.

What's happening here?  PHPDocx appears to be ignoring PARTS of the Wordstyle on conversion, while Libreoffice honors them properly. I don't see any differences in the code chain leading from the transformDocuments command to the Libreoffice conversion call that would affect docment structure, and since I'm starting with a prebuilt docx, there should be no generation/alteration required to get through conversion, I should think.  What am I missing?