Skrol29 / tinybutstrong

TBS is a PHP template engine for pro and beginners. Only 1 class with few methods properties, but it can do may things for any text templates, including HTML and XML. The only engine that enables W3C compliant templates. It has many plugins including OpenTBS.
http://www.tinybutstrong.com
60 stars 18 forks source link

TBS library not working with latest pptx versions #30

Closed ashifaliclientpoint closed 5 months ago

ashifaliclientpoint commented 8 months ago

hi We are using TBS library to create a new pptx file after find and replace tags from master pptx file. It is working fine. But same code is not working with latest pptx files. Can you please help me to fix this issue. I am using below set of code. Please review and please let me know if i am doing something wrong.Also sharing file.

require_once ("opentbs/tbs_class.php"); require_once ("opentbs/tbs_plugin_opentbs.php"); $pptx = new clsTinyButStrong (); // new instance of TBS $pptx->Plugin ( TBS_INSTALL, OPENTBS_PLUGIN ); // load the OpenTBS plugin $pptx->LoadTemplate($fileNameIn, OPENTBS_ALREADY_UTF8); $pptx->PlugIn(OPENTBS_SELECT_SLIDE, 1); $pptx->VarRef["Rep_Name"] = $templateDataArray["Rep_Name"]; $pptx->PlugIn(OPENTBS_SELECT_SLIDE, 1); $pptx->VarRef["Rep_Title"] = $templateDataArray["Rep_Title"]; $pptx->PlugIn(OPENTBS_SELECT_SLIDE, 1); $pptx->VarRef["Client"] = $templateDataArray["Client"]; $pptx->Show(OPENTBS_FILE, $pptxFileNameOut);

PPTX with merge tags_new_version.pptx

ashifaliclientpoint commented 7 months ago

@Skrol29 any update on this issue. Clients are waiting for fix this issue ASAP.

Thanks

ashifaliclientpoint commented 7 months ago

@Skrol29 Can you please check this issue.

Skrol29 commented 7 months ago

Hi,

Sorry to be long, the support is supposed to be at https://stackoverflow.com/

In your case, the problem comes from the template : the TBS fields has been invisibly cut by the spell and grammar feature. Simply select the TBS field, and choose Review, Language, Set Proofing Language, then check Do not check spelling.

Regards,

ashifaliclientpoint commented 7 months ago

Thanks for reply. Any other solution? We can't say clients to do changes in pptx manually. They have lots have pptx. Is there any other way, that we can fix this by using code.

Thanks

Skrol29 commented 7 months ago

I've just tested an enhancement for OpenTBS that seems to work : strengthen the cleaning of MsPowerpoint XML by including a cleaning point already used for MsWord. It seems to solve your case. Let me make some non-regression tests, and I will publish a new version if it's ok.

ashifaliclientpoint commented 7 months ago

That is great. If this issue will fix with any other version. Please update me when you done your testing.

Thanks

Skrol29 commented 7 months ago

You can already test the beta, at the OpenTBS repo

Skrol29 commented 7 months ago

@ashifaliclientpoint

OpenTBS 1.12.1 is released.

Regards,