Skip to content
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

Closed
tlorens opened this issue Jan 14, 2013 · 5 comments
Closed

addTextBreak styling? #18

tlorens opened this issue Jan 14, 2013 · 5 comments
Assignees
Milestone

Comments

@tlorens
Copy link

tlorens commented Jan 14, 2013

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.

@ozilion
Copy link
Contributor

ozilion commented Jun 26, 2013

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.

@Progi1984 Progi1984 modified the milestones: 0.7.2, 0.7.1 Mar 3, 2014
@ivanlanin
Copy link
Contributor

I'll take this.

@ivanlanin
Copy link
Contributor

@tlorens @ozilion The current version of the develop branch has address your issue (#129). You can use Sample_19_TextBreak.php on the samples folder, or copy paste the following test code after you clone develop branch.

$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.

@Progi1984 Progi1984 removed this from the 0.9.0 milestone Mar 24, 2014
@gabrielbull
Copy link
Member

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

@ivanlanin
Copy link
Contributor

Ok. I close this issue as resolved.

@Progi1984 Progi1984 added this to the 0.9.2 milestone Mar 31, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

5 participants