Skip to content

Fails to add horizontal line to docx/odt document #568

Open
@samuelsh

Description

@samuelsh

Hello friends,

I'd started to use PHPWord to generate DOCX/ODT from my PHP application.

While it mostly works "out of the box" for me, there is an issue, while trying to add "Horizontal line" to my generated document.

This code just adds nothing, and I can't figure out what's the problem:

$phpWord = new \PhpOffice\PhpWord\PhpWord();
$section = $phpWord->addSection();
$section->addLine(array('dash' => 'dash', 'width' => 100, 'height' => 2, 'weight' => 10));

$phpWord->save(wp_upload_dir()['basedir'].'/test.odt', 'ODText'); // it won't display horizontal line in DOCX either

PHP 5.4.41-0+deb7u1 (cli) (built: May 28 2015 18:22:26)
Debian GNU/Linux 7.8 (wheezy)


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions