Forum


Replies: 1   Views: 42
Long texarea to template

Posted by nicolas.scaut@gmail.com  · 16-12-2024 - 14:14

Hi

I use PHPDOCX with template and I want to insert into a block the value of a texarea form.

Sometimes, the user use this textarea with few words, sometimes, it contain a lot of words.

How can I use it and set the correct page break ? This textarea does not contain any HTML code 

 

Thanks

Posted by admin  · 16-12-2024 - 14:28

Hello,

Sorry, but we are not sure if we understand your question correctly.

What do you mean by "the correct page break"? In a DOCX document, a page break can be done automatically by the DOCX reader because the content exceeds the limit of the page/section, or manually by adding a page break (addBreak method or using HTML Extended) or a section break (addSection method or using HTML Extended).

If the contents to be added to the document contain some specific placeholder that sets the page breaks from the textbox content, then you can use a WordFragment to replace it with a page break.

If you need to keep text contents on the same page you can enable keepNext and keepLines styles.

Regards.