Search code examples
opentbstinybutstrong

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


Solution

  • In a DOCX, you can modify the width of text box, by placing this kind of TBS field inside the box :

    [t;att=wp:extent#cx]
    

    Then, you can merge the value at the PHP side using :

    $TBS->MergeField('t', 3000000);
    

    The unit is EMUs (English Metric Units). I don’t know about it, but is the mentioned here.