tinybutstrong

TinyButStrong OpenTBS include output of one template into other Sub Templating

牧云@^-^@ 提交于 2021-02-18 19:32:13
问题 we are using TinyButStrong and OpenTbs to prepare word (docx) documents from templates. We basically need to process several sub-templates (based on what user selected) and then merge all as table rows into the main template. So basically we need something like this: Final Template Table Row 1 - Output from docx1 template Row 2 - Output from docx2 template The rows can vary, so do the sub template file for each individual row. TBS seems to have a subtpl markup, however its not clear how it

Can a 'when' conditional section show content based on a 'contains' or 'includes' parameter?

扶醉桌前 提交于 2019-12-26 12:38:25
问题 I'm using TBS/OpenTBS (thanks Skrol, it's awesome) to produce Word documents based on form inputs. One of the form fields is a checkbox. Let's say it has ten options. I can display content fine if a single option is selected, but if, say, 4 options are selected, I need to define a condition in my template for what happens if those precise 4 options are selected. I would have to do the same for every other permutation. What I'm trying to do is use a 'when'-based conditional section so that it

CakePHP + TinyButStrong

Deadly 提交于 2019-12-22 09:53:15
问题 Anyone tried using TinyButStrong together with CakePHP? I have no prior knowledge of TinyButStrong but seems to be a good way to generate Word documents from templates. But I am not sure how to integrate this with a CakePHP application. Thank you for any ideas / suggestions. Best regards, Tony. 回答1: I presume you mean TinyButStrong with the OpenTBS plug-in which can merge DOCX (and other Ms Office and OpenOffice documents) using templates. Here is a way to add an export action in a CakePHP

Inserting a bullet point and styling to [onshow.] entires in openTBS

筅森魡賤 提交于 2019-12-13 21:23:36
问题 I was wondering if there was a way to pass through a bullet point and a basic CSS colour styling for the bullet point via the variable that gets applied via onshow. IE $string = '<span style="color:red">&#149;</span> The rest of the string'; $TBS -> VarRef['bulletPoint'] = $string; And then in the docx template have [onshow.bulletPoint] which gets replaced with • The rest of the string But with the bullet point red in this case. 回答1: For the bullet, you can use the UTF8 common character.

CakePHP + TinyButStrong

感情迁移 提交于 2019-12-05 22:42:48
Anyone tried using TinyButStrong together with CakePHP? I have no prior knowledge of TinyButStrong but seems to be a good way to generate Word documents from templates. But I am not sure how to integrate this with a CakePHP application. Thank you for any ideas / suggestions. Best regards, Tony. I presume you mean TinyButStrong with the OpenTBS plug-in which can merge DOCX (and other Ms Office and OpenOffice documents) using templates. Here is a way to add an export action in a CakePHP Controller which is destined to generate a Docx to be downloaded. The following code is available for CakePHP

OpenTbs convert html tags to MS Word tags

瘦欲@ 提交于 2019-11-30 21:51:01
问题 I am using OpenTbs, http://www.tinybutstrong.com/plugins/opentbs/tbs_plugin_opentbs.html. I have a template.docx and am able to replace fields with content but if the content has html code it is displayed in the document created by the template. First list <br /> Second Line I have tried to use: $TBS->LoadTemplate('document.docx', OPENTBS_ALREADY_XML); Thinking this would allow me to replace my html tags with ms office tags, but it just showed the MS Office tags in the document instead: First