Skip to content

Text Align not correct work #704

New issue

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

Closed
Ryuzakix3 opened this issue Jan 14, 2016 · 6 comments
Closed

Text Align not correct work #704

Ryuzakix3 opened this issue Jan 14, 2016 · 6 comments

Comments

@Ryuzakix3
Copy link

When you use addText and set the align to "start" or "left" in the paragraphstyle than is the word file corrupt but when you use only "end" or nothing as align, than is the word file ok.

@ghost ghost self-assigned this Jan 23, 2016
@ghost ghost added this to the 0.13.0 milestone Jan 23, 2016
@Sohorev
Copy link

Sohorev commented Jan 29, 2016

When you use addText and set the align to \PhpOffice\PhpWord\SimpleType\Jc::END alignment not works. For example change alignment in Sample_08_ParagraphPagination.php to \PhpOffice\PhpWord\SimpleType\Jc::END and view bug.

У меня выравнивание текста справа не работает - проверить можно легко в файле Sample_08_ParagraphPagination.php указать выравнивание \PhpOffice\PhpWord\SimpleType\Jc::END и увидеть, что выровнено слева. Выравнивание не работает не в простом тексте, ни в тексте внутри ячейки таблицы.

@ghost
Copy link

ghost commented Feb 6, 2016

@Ryuzakix3, could you, please, provide a code sample to reproduce the problem? I played around with Sample_08_ParagraphPagination.php a bit, but the result file opens well.

Thanks.

@ghost
Copy link

ghost commented Feb 6, 2016

@Sohorev, take a look here and here. It works. Any details?

@Sohorev
Copy link

Sohorev commented Feb 8, 2016

Generated document is not displayed correctly in ms word 2007, and kingsoft office. But in libreoffice displayed normal

Вы меня поняли совершенно правильно, именно так и делаю.
Пример скачал, выполнил - уточнение такое выравнивание работает, только если результат открыватьчерез libreoffice (под linux). В MsWord 2007 (под виндой) и kingsoft office (под linux) выравнено слева т.е. не верно.

@ghost
Copy link

ghost commented Feb 13, 2016

Unfortunately, I do not have Microsoft Office installation available to test on, so I tried WPS Office 2016 and found one interesting thing. WPS Office Writer uses right value for horizontal alignment. As a matter of fact, OOXML standard does not allow such value (see p.1396). It requires using value end. I thought they maybe using previous versions of the standard. So I looked into ECMA-376 Second Edition (equals to ISO/IEC 29500:2008 standard) and failed again. Only in the very first edition of ECMA-376 I found right instead of end. It seems WPS Office Writer creates documents based on standard of 2006 year. 😞

I will take some time to find out what to do with that stuff.

Thanks for the report!

ghost pushed a commit that referenced this issue Feb 23, 2016
@ghost
Copy link

ghost commented Feb 23, 2016

@Sohorev, I pushed some changes to develop branch.

Please, use Jc::RIGHT in your case. Microsoft Word 2007 knows nothing about ISO/IEC-29500:2008 standard, so it relies on the older one (ECMA-376 1st Edition). See my comments in Jc and JcTable classes for additional information.

Good luck!

@ghost ghost closed this as completed Feb 23, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants