Git Product home page Git Product logo

Comments (5)

ozilion avatar ozilion commented on May 8, 2024

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.

from phpword.

ivanlanin avatar ivanlanin commented on May 8, 2024

I'll take this.

from phpword.

ivanlanin avatar ivanlanin commented on May 8, 2024

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

from phpword.

gabrielbull avatar gabrielbull commented on May 8, 2024

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

from phpword.

ivanlanin avatar ivanlanin commented on May 8, 2024

Ok. I close this issue as resolved.

from phpword.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.