Questions tagged [tinybutstrong]
TinyButStrong is a template engine for PHP.
161
questions
0
votes
1
answer
14
views
deprecated warning with TBS 3.14.0 on PHP 8.2
I'm getting errors like these:
Deprecated: Creation of dynamic property clsTinyButStrong::$_UserFctLst is deprecated in /home/b/s/ejEfbT2v/ftp_bswkdk/b2b/tbs/tbs_class.php on line 738
Deprecated: ...
1
vote
0
answers
24
views
Can I iterate different images in a Word doc with an openTBS template using PHP?
I have a MS Word document with a block of 3 cells and another 3 cells down below. Inside each cell there is a different thing: in three cells there are text, which work just fine, and inside the other ...
0
votes
1
answer
21
views
How i create duplicate format block with opentbs plugins
I am trying to make duplicate format row with TinyButStrong word document. The data have grouping each title of activity but i cannot make spesific format templete document in .docx
data sample
the ...
1
vote
1
answer
24
views
Can't load a .doc extension file with TBS/OPENTBS
I'm trying to load a .doc file (MS WORD 2007) with only Office.
But I've a pop-up asking me the encoding type.
What is happening is that the template can't be loaded with errMsg.
But if I edit the ...
0
votes
1
answer
27
views
OpenTBS - pasting into Excel using PHP results in "numbers stored as text" - how to resolve?
In Excel, on row 1, from columns A to K I have text representing column header labels.
On row 2, from columns A to K I have the following:
[a.auditHour;block=tbs:row]
[a.instance]
[a.dataFileUsedMB]
[...
1
vote
1
answer
78
views
"The file 'file.odt' is corrupt and therefore cannot be opened." when change picture using OpenTBS
I'm testing the OpenTBS library to use it to generate a document in my project. I created a .odt file in LibreOffice with the image as stated in the documentation and other posts on StackOverflow. ...
-1
votes
1
answer
68
views
Bug after php update
I have a bug on my application after upgrading my php version. The 8.0 php version is ok but if I try to update on 8.1 or 8.2 my appication block with an error I don't understand.
TinyButStrong Error ...
1
vote
0
answers
71
views
Error when changing an image using TBS/openTBS
I'm trying to use tbs/opentbs with PHP to switch out an image in my docx file.
I'm using
TBS 3.14.0
OpenTBS 1.10.0
PHP 7.2.5
The docx file does download. When I open it using MS Word 2021 I get the ...
0
votes
0
answers
55
views
Tinybutstrong opentbs ote=changepic adjust parameter cannot be used in block section, it causes template crash
The parameter adjust for [x.x;ope=changepic;tagpos=inside;adjust] paramater is not working in a block section.
I want to loop through a set of results and add an image for each result given. This is ...
0
votes
1
answer
54
views
TBS onload after update from 3.10.1 to 3.14.0 causes errors - how to get rid of?
I'm currently struggling with error messages from TBS and couldn't find any hint on change log or elsewhere.
So far we've been using TBS 3.10.1 with PHP7, now I'm trying to update to actual TBS 3.14.0 ...
0
votes
1
answer
51
views
Problem with new lines in cells while reading an Open Document Spreadsheet (*.ods) file in a PHP array with OpenTBS
I am trying to read an Open Document Spreadsheet (*.ods) file in PHP using 'TinyButStrong template engine' along with the 'OpenTBS' plugin. My target is to convert the spreadsheet's cell data into a ...
0
votes
1
answer
38
views
Can you change the width or height of a shape using openTBS?
I was wondering if you could change the width of a shape with openTBS
I think the text should be written in the alt text box but I coudln't find any article that explained how to do that
0
votes
0
answers
20
views
TinyButStrong Error When Merging Block with Dynamic Queries
I am attempting to merge an array based on a value from another array, but I get this kind of error: "TinyButStrong Error when merging block [docList]: invalid query '2022_0817_wes' because ...
0
votes
1
answer
35
views
Which parameter to use in order to display several blocks?
enter image description here
I'm trying to define a zone in my word doc template and to display data from a record source(ERP Software), the problem I'm facing is that I can't show more than one block ...
0
votes
1
answer
75
views
Tinybutstrong: How Merge a type of Field indexed array?
I am using TBS, It works fine when I Merge objects and Associative Arrays php, But I don't know how Merge an array in PHP like this: (It is json for major compression):
data = [{"d_secuencia"...
1
vote
1
answer
148
views
image in OpenTBS not changing
I'm trying to show a series of pictures and comments in a document with OpenTBS. The pictures are hosted on a local webserver. The data is in an array.
In the resulting document the text lines are ...
0
votes
1
answer
132
views
conditional block display with TBS in DOCX tables
I am processing DOCX files for invoices with TBS. A first TBS block contains all the taxable items, one per line, followed by lines for subtotal and tax. A second TBS block contains all the non-...
0
votes
1
answer
66
views
(TBS) TinyButStrong optional sub-blocks
Is there a way to make sub-blocks optional, there are cases when a sub-block doesn't contain any information and I get errors. Lets say I have a block that contains people's data, like their full ...
0
votes
1
answer
68
views
In OpenTBS: How to use "new paragraph" carriage returns instead of "new line" in MS Word Templates
I have a PHP variable holding plain text that i need to insert into a MS Word Template using OpenTBS.
My Word placeholder is:
[onshow.introduction]
The problem is I use justification formatting, so I ...
0
votes
1
answer
255
views
Trying to merge a picture into an OpenTBS template fails with "failed to found the picture" (sic)
Im using OpenTBS to merge data from PHP into a word template.
All the normal variables merge fine, however I fail to succeed at merging an image file.
The placeholder for my image in my Word file ...
0
votes
2
answers
511
views
TinyButStrong update for PHP 8.1?
I've recently updated our server to PHP 8.1 and the latest version of TinyButStrong. The latter now throws a fatal error:
PHP Fatal error: Cannot acquire reference to $GLOBALS in U:\ivojoadmin\...
0
votes
0
answers
45
views
Why does the OpenTBS_DOWNLOAD command is not generating a file
I am new to openTBS,
I tried the html and php code from 'https://www.tinybutstrong.com/opentbs.php?demo' and 'https://www.tinybutstrong.com/plugins/opentbs/demo/demo_merge.php', and I can't manage to ...
0
votes
1
answer
69
views
Merge different .pptx files into one
I am trying to merge different .pptx files into one. That is, I have templates for each slide, I am able to modify MergeBlock and MergeField but I don't know how to join all the .pptx files into one.
...
0
votes
1
answer
29
views
How can I output a comma separated string of values with opneTBS
using openTBS (in the SugarCRM plugin MailMergeReports) and I have the following in my Word template.
[a_sub5;block=w:p;nodata] No States
[a_sub5;block=w:p][a_sub5.name]
This works fine as far as it ...
0
votes
3
answers
87
views
OpenTBS - read docx properties
Is there a way to access docx properties once an OpenTBS template is loaded?
$TBS->LoadTemplate($template, OPENTBS_ALREADY_UTF8);
I know that I could open the docx as a zip, access core.xml in ...
1
vote
1
answer
60
views
Use of ifempty in openTBS docx template
I am trying to use the ifempty attribute in a docx template to choose from 2 available variables. I do not have access to the php files. I am just a user of a system using tbs to allow custom export.
...
0
votes
1
answer
139
views
merge field not Merge data in word document by TinyButStrong
I am using TinyButStrong for merge data in docx file. I have do same example data. For this i have write below code:
<?php
include_once('tbs_class.php');
include_once('../tbs_plugin_opentbs.php'...
0
votes
1
answer
249
views
(TBS) TinyButStrong How to use Multiple 'when' for a block ? Example when [hasHouse] = 1 and [name] = 'bob'
So I have a block and I want to use the 'when' condition, I tried using but got no results.
If I just leave one of the conditions i get back results, but I dont get back anything if I use both, and ...
1
vote
1
answer
36
views
Template engin for e-mails
I use opentbs for document templates (writer and ms word). Now I want to use opentbs also for write e-mails. So that I can read an .msg file prepared from the office and than add senders, customer ...
0
votes
1
answer
38
views
how can we edit chart data in excel worksheet from a ppt generated by tbs?
We have one empty chart and we are loading via tbs and plotting the graph, everything works fine
when we open the newly created ppt and try to edit chart data in excel (Edit data in excel) it's empty, ...
0
votes
1
answer
59
views
TBS tiny but strong: how to recursively fill in data
I use openTBS to parse an invoice template. The invoice address is supplied via a custom function. I would like to conditionally more information to the filled in data.
I was thinking of permitting ...
0
votes
1
answer
62
views
can we delete slides with multiple range using opentbs?
currently we are doing this, which is working fine, but i was trying to delete slide with multiple range
$slides_to_deletea = range(3, $num_slides);
$TBS->PlugIn(OPENTBS_DELETE_SLIDES, $...
0
votes
0
answers
264
views
How can replace content in a document file with another document text, image and table in PHP?
I have to replace the content of a document result.docx with another document server.docx.
I have implemented the PHP code. I used the tinybutstrong plugin to develop functionality.
But there is a ...
0
votes
0
answers
58
views
tinybutstrong - opentbs - colspan in excel
(Sorry my poor english)
I have data:
[
'mainGrp1'=>['subGrp1.1'=>[1,2,3],'subGrp1.2'=>[a,b,c],'subGrp1.3'=>[4,5,6]],
'mainGrp2'=>['subGrp2.1'=>[1,2,3,4,5],'subGrp2.2'=>[a,b,c,d,e]]...
0
votes
1
answer
104
views
subblock create xlsx with opentbs?
Hello I hope you can help me. I am trying to use sub-blocks with the following array that you come from 2 mysql queries.
$data[$i]= array(
"ref"=>$row['ref'],
"label"=>$row['...
0
votes
0
answers
26
views
Can you use the OPENTBS_EDIT_ENTITY to change Word settings?
I use the OPENTBS_EDIT_ENTITY 'word/settings.xml' to change the updateFields setting currently in Word and that has always worked great. Could I also use that for settings like turning view table ...
0
votes
0
answers
29
views
TinyButStrong Block Not Working for li tag
If I define my block on the li tag, TBS only shows the first item in the array.
<ul class="nav navbar-nav">
<li class="dropdown nav-item">
<a href="#...
0
votes
1
answer
38
views
500 Error After Moving Code To New Server
I recently moved my code to a new server with Debian 10 and PHP 7.3.19. The old server had Ubuntu 16.04.15 and PHP 7.0.33. As a result, I am now getting a 500 error on my index.php page. However, if I ...
0
votes
1
answer
174
views
OpenTBS - Repeating Paragraph with Token Replacement?
I have a text-based (as opposed to table-based) .docx document with a section that has several places in the paragraph for replacement. This paragraph must be duplicated and the tokens replaced for ...
0
votes
1
answer
571
views
Use composer's autoload to load OpenTBS plugin for tinybutstrong
I am using tinybutstrong and it's opentbs plugin. Until now I did use an explicit require of the two source files for that but I want to switch to composer with autoloading. So I want to go from this
...
0
votes
1
answer
41
views
massive file size with pictures
I'm using opentbs to get an organization chart with photographs.
People register pictures with no size limit. I'd like to know if it exists a tag that compresses the pictures before editing.
I ...
0
votes
1
answer
203
views
how to select header section in OpenOffice ODT document with TinyButStrong TBS
I can successfully manipulate fields in the header and footer sections of a DOCX document with TinyButStrong (TBS) through this code:
$TBS->PlugIn(OPENTBS_SELECT_HEADER);
$TBS->...
0
votes
1
answer
37
views
how to select master slide in OpenOffice ODG document with TinyButStrong TBS
I can successfully manipulate fileds on a master slide of a PPTX document with this code:
$TBS->PlugIn(OPENTBS_SELECT_SLIDE, '1', true); // select master slide
$TBS->MergeField('...
0
votes
1
answer
90
views
OpenTBS no longer merges fields in ODT - no errors
Long time Tinybutstrong/OpenTBS user here - my application has been moved to a new server (Debian Jessie > Debian Buster), including new versions of Apache (2.4.38) and PHP (7.3 FPM).
$TBS = new \...
0
votes
1
answer
241
views
Can I use TinyButStrong Fields to control paragraph formatting in my Word Table
I have a word table being populated from a MYSQL query and sub query via an OpenTBS template. The main query acts has a single cell merged across the row; the first column of the subquery is merged ...
0
votes
1
answer
66
views
How do i resolve 'Uninitialized string offset:' error in TinyButStrong
I was successfully download the merged spreadsheet document but it gives me these errors instead of the merge values. Why is that and how should i resolve it ?
Notice: Uninitialized string offset: 2 ...
0
votes
1
answer
281
views
Is it possible to change the format in opentbs when using ope=tbs:num?
When merging blocks using opentbs I was able to properly get a field to merge as a number to excel using
ope=tbs:num which I need because I am both displaying the data and performing calculations with ...
0
votes
1
answer
286
views
How to resolve TinyButStrong's 'at least one tag corresponding to w:tr is not found' error?
I'm creating a project to mail merge a given .odt file and provide a .odt output. When i'm performing the mail merge operation it provides me this error
TinyButStrong Error in block's definition [...
0
votes
1
answer
257
views
How to remove or change an image in a docx
I'm trying to change an image embedded in a docx. In some circumstances I'll need to replace a default placeholder image on each page with a new one, and in others I'd like to just remove that ...
0
votes
1
answer
36
views
When my variable has an apostophe in it, it cannot be used for onshow
I'm using a conditional in templating engine tinybutstrong to show a <div> when a variable is not blank.
<div class="notice">[onshow;block=div;when [var.notice;noerr]!=''][var.notice;...