-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Right to left paragraph direction support (rtl dir) #331
Comments
any solution? :( |
I believe no implementation has been done in PHPWord. I change the label Question to Feature Request. |
Thank you, but if anyone know any temp solution plz help me. |
@alimo2 Have you some DOCX / ODT files for sample and reference for reverse engineering ? Thx |
docx file generated by PHPWord ? |
@alimo2 No DOCX with Word ou LibreOffice, but with RTL paragraph. |
i check the parsed xml & i think the problem is extra tags that word add to file! |
so what shall i do with PHPWord classes? i know about word rtl xml tags |
@alimo2 I just commited (to the develop branch) an implementation to RTL in textrun. Please could you test and give us your feedback ? |
yes for sure, tnx |
@alimo2 So is it working for you ? |
yes that is working! tnx a lot. When you commit it in master code? |
In the next release :) |
@Progi1984 thanks for adding support for right to left. Fatal error: Uncaught exception 'PhpOffice\PhpWord\Exception\Exception' with message '"HTML" is not a valid writer.' in D:\Projects\PHPWord\PHPWord-develop\src\PhpWord\IOFactory.php on line 32 Then i have removed html writer from "Sample_Header.php" file. |
@khosro Actually, that sets the direction for the textrun and not for the paragraph. It may be your problem. For the fatal error, could you open a new issue, please ? |
@Progi1984 ,what actually " array('rtl' => true)" does? I think it must set text direction to Right to Left. |
@khosro it writes a "w:rtl" tag in the text run (Source : 8d9e85b#diff-3c77dc4e950fb7b3faece7ad6fe4bc19R134) |
@Progi1984 .OK. |
@khosro See this link about RTL Text in OpenXML files. Normally, that could help you. |
Thanks. |
@khosro At the moment, no. May be with a PR ? An idea, @ivanlanin ? |
@Progi1984 I found a problem |
@khosro Are you sure it's an error ? For me, Word reverses text which is in ASCII. Sorry, I haven't got Word for testing, only Libreoffice & Word Online. |
@Progi1984 Yes.I am sure.I tested it with Microsoft word. |
@khosro Could you send me a DOCX with the good render for this string, plz ? I have to analyze the file. |
@Progi1984 |
@Progi1984
I uploaded the new correct version and also change text direction in it. |
@Progi1984 |
In addition to the ltr, the
Writer/Word2007/Element/Text.php (in the write function, after $this->startElementP();):
|
And also the
|
@amirush2001, |
is there any way to set Table of content as right to left? |
@alimo2 |
I still have problem with latest version of phpword (0.17.0). Arabic letters in template become separated & also with wrong direction. |
i've never use table of content. sry. |
Hi;
I'm using the last version 3, but it doesn't support right to left language such as Farsi, Arabic in paragraph style & make words cluttered & not in right order!
is there any way fix this?
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: