-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
addTextBreak styling? #18
Comments
Hi, I have the same problem. I use the beta version 0.6.2 and addtextbreak puts lines with spaceafter value of 10. Should be implement paragraph styling to addTextBreak() function too. |
I'll take this. |
@tlorens @ozilion The current version of the $PHPWord = new PHPWord();
$fontStyle = array('size' => 24);
$paragraphStyle = array('spacing' => 240, 'size' => 24);
$PHPWord->addFontStyle('fontStyle', array('size' => 9));
$PHPWord->addParagraphStyle('paragraphStyle', array('spacing' => 480));
$fontStyle = array('size' => 24);
$section = $PHPWord->createSection();
$section->addText('Text break with no style:');
$section->addTextBreak();
$section->addText('Text break with defined font style:');
$section->addTextBreak(1, 'fontStyle');
$section->addText('Text break with defined paragraph style:');
$section->addTextBreak(1, null, 'paragraphStyle');
$section->addText('Text break with inline font style:');
$section->addTextBreak(1, $fontStyle);
$section->addText('Text break with inline paragraph style:');
$section->addTextBreak(1, null, $paragraphStyle);
$objWriter = PHPWord_IOFactory::createWriter($PHPWord, 'Word2007');
$objWriter->save("textbreakstyle.docx"); Please kindly test it and report the result to us. Thanks. |
He opened the issue a year ago, I don't think he wants to test it. If you fixed it I think we can close the issue |
Ok. I close this issue as resolved. |
textBreak's don't seem to follow any sort of style. I could be wrong. I'd like to think it'd follow a paragraphStyle or the last textStyle used. textBreaks for my document seem to large.
The text was updated successfully, but these errors were encountered: