I'm using PHPDocx to render word documents from json data. WOrks fantastic. But... We ran in to some issues with checkboxes. We need to add rows of checkboxes with a label after.
So basically like this:
[ ] alternative 1
[x] alternative 2
To do that we do this:
$checkboxFragment = new WordFragment($docx); $checkboxFragment->addStructuredDocumentTag('checkbox', [ 'fontSize' => 12, ]); $docx->addText( [ $checkboxFragment, [ 'text' => ' alternative 1', 'fontSize' => 10 ], ]);
This also works fine. But the problem is that the structured tag for checkbox take up the space that the little handle needs, which is twice the height of the actual checkbox. So we end up having too much vertical space between the checkboxes
(see here: https://pasteboard.co/sRb8eKT2ZvgZ.png)
How do we make this smaller?