Fixed broken paragraph alignment for OpenXml.
This commit is contained in:
parent
17ee9e1bf8
commit
18c54623b0
|
|
@ -5,7 +5,7 @@ include_once 'Sample_Header.php';
|
||||||
echo date('H:i:s') , ' Create new PhpWord object' , EOL;
|
echo date('H:i:s') , ' Create new PhpWord object' , EOL;
|
||||||
$phpWord = new \PhpOffice\PhpWord\PhpWord();
|
$phpWord = new \PhpOffice\PhpWord\PhpWord();
|
||||||
$phpWord->addFontStyle('rStyle', array('bold' => true, 'italic' => true, 'size' => 16, 'allCaps' => true, 'doubleStrikethrough' => true));
|
$phpWord->addFontStyle('rStyle', array('bold' => true, 'italic' => true, 'size' => 16, 'allCaps' => true, 'doubleStrikethrough' => true));
|
||||||
$phpWord->addParagraphStyle('pStyle', array('align' => 'center', 'spaceAfter' => 100));
|
$phpWord->addParagraphStyle('pStyle', array('alignment' => 'center', 'spaceAfter' => 100));
|
||||||
$phpWord->addTitleStyle(1, array('bold' => true), array('spaceAfter' => 240));
|
$phpWord->addTitleStyle(1, array('bold' => true), array('spaceAfter' => 240));
|
||||||
|
|
||||||
// New portrait section
|
// New portrait section
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ echo date('H:i:s'), ' Create new PhpWord object', EOL;
|
||||||
$phpWord = new \PhpOffice\PhpWord\PhpWord();
|
$phpWord = new \PhpOffice\PhpWord\PhpWord();
|
||||||
$phpWord->setDefaultParagraphStyle(
|
$phpWord->setDefaultParagraphStyle(
|
||||||
array(
|
array(
|
||||||
'align' => 'both',
|
'alignment' => 'both',
|
||||||
'spaceAfter' => \PhpOffice\PhpWord\Shared\Converter::pointToTwip(12),
|
'spaceAfter' => \PhpOffice\PhpWord\Shared\Converter::pointToTwip(12),
|
||||||
'spacing' => 120,
|
'spacing' => 120,
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue