Skip to content
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

Support right-to-left un/ordered lists with bulletpoints #270

Closed
sandre1 opened this issue Aug 24, 2018 · 3 comments
Closed

Support right-to-left un/ordered lists with bulletpoints #270

sandre1 opened this issue Aug 24, 2018 · 3 comments

Comments

@sandre1
Copy link

sandre1 commented Aug 24, 2018

Hello. Right now i am trying to render a pdf containing unordered lists with arabic text, but the bullet points of the list items are rendered left-to-right mode.
I am using css style like so :
ul {
direction: rtl;
}
ul li {
direction: rtl;
}`
but this is not working.

Any ideas? thanks

@ieugen
Copy link
Contributor

ieugen commented Aug 24, 2018

Could you please make a short HTML sample + PDF output that allows to reproduce the issue.

@sandre1
Copy link
Author

sandre1 commented Aug 24, 2018

This is an example code

<html>
<head>
<style>
  
ul.rtl-unordered-list {
  direction: rtl;
}

ul.rtl-unordered-list li {
  direction: rtl;
}

</style>
</head>
<body>
<h3 dir="rtl">Right-to-left title</h3>
  <ul class="rtl-unordered-list" dir="rtl">
    <li>List item - right-to-left direction</li>
    <li>List item - right-to-left direction</li>
  </ul>
</body>
</html>

and the pdf output is
bulletpoints-rtl

The expected result is having bulletpoints on the right-side of the unordered list.

@syjer
Copy link
Contributor

syjer commented Aug 24, 2018

@sandre1 from the code of https://github.com/danfickle/openhtmltopdf/blob/open-dev-v1/openhtmltopdf-core/src/main/java/com/openhtmltopdf/render/ListItemPainter.java it don't take the RTL information when paiting the "list decoration". So, it's currently a missing feature.

ieugen pushed a commit to netdava/openhtmltopdf that referenced this issue Aug 24, 2018
* probably should move text to the left a bit !??!
danfickle added a commit that referenced this issue Aug 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants