From 18c54623b0037f16de936863c2e02f491169a5c6 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sun, 1 Mar 2015 21:13:03 +0400 Subject: [PATCH] Fixed broken paragraph alignment for OpenXml. --- samples/Sample_01_SimpleText.php | 2 +- samples/Sample_08_ParagraphPagination.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/Sample_01_SimpleText.php b/samples/Sample_01_SimpleText.php index 391622b8..67276b6a 100644 --- a/samples/Sample_01_SimpleText.php +++ b/samples/Sample_01_SimpleText.php @@ -5,7 +5,7 @@ include_once 'Sample_Header.php'; echo date('H:i:s') , ' Create new PhpWord object' , EOL; $phpWord = new \PhpOffice\PhpWord\PhpWord(); $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)); // New portrait section diff --git a/samples/Sample_08_ParagraphPagination.php b/samples/Sample_08_ParagraphPagination.php index 979d6c0f..4b6338d7 100644 --- a/samples/Sample_08_ParagraphPagination.php +++ b/samples/Sample_08_ParagraphPagination.php @@ -6,7 +6,7 @@ echo date('H:i:s'), ' Create new PhpWord object', EOL; $phpWord = new \PhpOffice\PhpWord\PhpWord(); $phpWord->setDefaultParagraphStyle( array( - 'align' => 'both', + 'alignment' => 'both', 'spaceAfter' => \PhpOffice\PhpWord\Shared\Converter::pointToTwip(12), 'spacing' => 120, )