Forum Feature requests

Right to Left (RTL) text support

While Prince allows for internationalized fonts to be imported and used, a known issue is the lack of Right to Left support. This inhibits the ability to convert legal, working HTML+CSS in Arabic or Hebrew to PDF. For systems with a global reach, trying to leverage Prince as their PDF solution, this is a substantial issue.

Is there an ETA on this functionality?
We would love to support right-to-left text, but it is probably going to have to wait until Prince 7.0, as it's a complex feature that affects a lot of things. For example, our text handling and line breaking would need to be changed to correctly handle spans of right-to-left Hebrew text within a left-to-right Latin paragraph. We can do this, but it's non-trivial, and there are several simpler and higher priority issues we need to fix first.
Thanks for the info.
I just wanted to bump this request to the top and see if it is still on the list for Prince 7.0. Also, is 7.0 even on the radar right now?

It certainly is, and will support Hebrew, Arabic and Hindi at the very least. If you would like to take it for an early test run we may be able to provide you with an alpha build, depending on what platform you are running on.
Just to add to this, I would love to have vertical text be a possibility.
mikeday wrote:
It certainly is, and will support Hebrew, Arabic and Hindi at the very least. If you would like to take it for an early test run we may be able to provide you with an alpha build, depending on what platform you are running on.

That would be great! I am working on a book right now that has Hebrew. I am running Windows Vista.
Here is an early alpha release of Prince 7.0 that includes support for Arabic, Hebrew, and Hindi:


Let us know how it goes! :)
I've tested it today. In Arabic support, there are at least 2 faults:
1. In Arabic, some words do not join to the letter that comes after them. For example: Alef, Daal, Zaal, Reh, Zeh, Vav, ... . But Prince wrongly tries to join the next character to these letters. Also, Alef does not join properly to previous letter.
2. Rather than UTF-8, Arabic encodings like windows-1256 are not supported.
For an example, see this picture (I've underlined wrong parts):

For more information, please see chapter 8 of the Unicode manual at:
Thanks for testing! Which font did you use to create this sample image?
I tested Prince with various fonts and the problem is always there, but this is my test case for above picture:
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>My title</title>
<body dir="rtl">
<h1>My title</h1>
<p>First Line.<p>
<p>Second Line.</p>
<p>Third Line.</p>
<p>Fourth Line.</p>

I didn't set any font family, so Prince used "Times New Roman" as the default font. I changed the text because I couldn't paste utf-8 HTML here. Just copy and paste some text from an Arabic or Persian website (like Wikipedia). That would be fine for testing.
Thanks, we'll check this out.
I forgot to say about another problem. Sometimes after reading parts of the Unicode document (with UTF-8 encoding), PrinceXML falls back on one-byte western encoding and shows wrong characters, because of interpreting two byte characters as 1-byte characters.
If it's needed, I can provide samples for this. My tests where done using prince-7.0a8, just like above problem.
Please email me ( a sample. We do know of some issues with some HTML documents, but XML should not have any encoding problems.
I am trying to use hebrew text and have a problem with the points being moved slightly to the left. In the image below, the top line is the correct rendering. I am using Ezra SIL font. I am using Prince 7 linked to above.

Rendering the vowel marks in the correct position requires support for OpenType positioning, which we will be adding to Prince for the next release.
Hi all,

We have created a new test build of Prince that supports correct alignment of vowel marks and other diacriticals using the OpenType layout features. It also fixes the Arabic shaping bugs.


Please give it a try and let us know how it goes! :D
Fantastic, thanks a lot. I tested the new version with Hebrew characters and it works great. Is there any kind of ETA for Prince 7?
Not yet, as there are more font and i18n features we need to work on. However, you're welcome to keep using this alpha version, which should be quite stable.
The first beta for Prince 7.0 is now available, and includes support for bidirectional text layout and OpenType fonts with advanced layout features. It supports Arabic, Hebrew, Hindi and other Indic scripts.
Since Prince supports RTL text for languages like Arabic and Hebrew, does it also support RTL page progression so the PDF prints properly? That is, the first page of the PDF becomes the last page, etc. If so, could you please be so kind as to let me know the CSS property to effect this? If not, any idea how to reverse the PDF's page order, if it's not too much trouble?
Prince has no reverse page order yet, this would require a separate third-party PDF tool like Acrobat.
The latest CSS has some math ability in it I believe. So maybe we could do
page-total - current-page + 1 to display the correct page number.

Jim Albright
Wycliffe Bible Translators

hi mike any news on reverse page numbering?
Perhaps you could use prince-script(counter(page), counter(pages)) and do the subtraction in JavaScript? :)