We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
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 = 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.
The text was updated successfully, but these errors were encountered:
$section = $phpWord->addSection(); Try this, $section->addLine( array( 'width' => \PhpOffice\PhpWord\Shared\Converter::cmToPixel(12), 'height' => \PhpOffice\PhpWord\Shared\Converter::cmToPixel(0), 'positioning' => 'absolute','weight' => 2 ) );
Sorry, something went wrong.
No branches or pull requests
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.
The text was updated successfully, but these errors were encountered: