-
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
HTML rtl content . #2558
Comments
After $phpWord = new PhpWord(); Try adding: Settings::setDefaultRtl(true); |
Try upgrading to the latest PhpWord release (1.2.0). |
Many thanks @oleibman 🙏 |
@oleibman I Try to use section rather than table cell to do the height is dynamic with content . |
The error message is correct - there is no such class. I'm not sure why it tried to access it. Can you show me all your code so that I can try to figure out what's going wrong. Here's what I used, without any problems: $phpWord = new PhpWord();
Settings::setDefaultRtl(true);
$section = $phpWord->addSection();
Html::addHtml($section, $html, false, false); |
I want to access the setComplexBlock() with section to avoid limitation of fixed height in table cell . $phpWord = new PhpWord();
Settings::setDefaultRtl(true);
$section = $phpWord->addSection();
Html::addHtml($section, $html, false, false);
$templateProcessor->setComplexBlock('HTML', $section); // error here |
I am not familiar enough with TemplateProcessor to make the change I am about to describe. I will open a new issue. As you have seen, you get an error when you try to use $elementName = substr(get_class($complexType), strrpos(get_class($complexType), '\\') + 1); Insert: if ($elementName === 'Section') {
$elementName = 'Container';
} Now, no error is thrown, and the result is probably what you want. As I mentioned, I'm not that familiar with TemplateProcessor, so I'm not sure that it is what you want, nor if there are any other repercussions from this change. But you might try it and see if it accomplishes what you want. |
I am grateful for your help 🙏 |
I try to decode html code with Arabic language appear in template word rtl, but appear every time ltr.
The text was updated successfully, but these errors were encountered: