Forum


Replies: 9   Views: 249
How to reduce space between one line break

Posted by fairshareitservices  · 30-07-2024 - 10:45

Okay. When I use \n with instead of break it works with the replaceVariableByText() method. For whne there is a bold tag in the sentence we use below code
 

$docx = new CreateDocx();

    $wf = new WordFragment($docx);
 

 $text[] = array(

                    'text' => $partialInputExploded[$i],

                    'bold' => true,

                    'fontSize' => 5.5,

                    'font' => 'Arial',

                );
$wf->addText($text, array('font' => 'Arial', 'fontSize' => 7)); and then use replaceVariableByWordFragment(array($placeHolderName => $fomattedWordFragment), array('type' => 'inline')); So for this we \n add the sentence to new line but \n remains same in the generated output