phplaravelpowerpointopentbs

TBS TinyButStrong on PHP laravel : pptx template that doesn't work with certain fonts or font colors


To sum up quickly: I'm working on a mutual insurance application where the salesperson can generate a powerpoint. The powerpoint is generated thanks to a template and this template is filled with tags from the TBS TinyButStrong plugin. I have a first version where it works well. But I wanted to test something else: change the font color and font style. Then it didn't work anymore. I'd like to know if there's a list of font styles that are accepted or not.

If not, is it a TBS version problem? And is there an alternative where I can use any font or color?


Solution

  • Here’s what I did. I took the PPTX file and unzipped it, which created many files and folders. In one of the folders, I found each slide represented as an XML file. For the slides where the generation wasn’t correct, I checked the XML to see if there were any anomalies. And indeed, I noticed there were! Around the fields that weren’t generating properly, there were extra tags. These tags were preventing the application of a specific font or causing incorrect rendering due to their surplus or incorrect positioning.

    Once I removed the unnecessary tags and fixed everything, I selected all the files again, zipped them, and simply added the ".pptx" extension to the compressed file. This allowed me to recover a properly formatted file. And that’s how I resolved the issue!