擅长:python、mysql、java
<p>如果使用<a href="https://bitbucket.org/rptlab/reportlab/src/f0426d8c4e7c1318f5c74181b5907a251ff2f302/?at=rtl-support" rel="nofollow">this branch of Report lab that adds RTL support</a></p>
<p>并从代码中删除这一行:</p>
<pre><code>arabic_text = get_display(arabic_text) # change orientation by using bidi
</code></pre>
<p>您的代码将正常运行</p>
<p>因为它们已经用PyFriBiDi的分支解决了
如您所见<a href="http://www.reportlab.com/software/dev/" rel="nofollow">here</a>:</p>
<blockquote>
<p>Some users from the community notably Ury Marshak, Moshe Wagner and Hosam Aly have contributed batches to get PyFriBibi working with ReportLab. We have created an SVN branch for this development and it is available at ...</p>
</blockquote>
<p>(该页面上的SVN链接不再工作,因此您应该使用我包含的bitbucket链接!)在</p>
<p>我已成功运行了您代码的此修改版本并生成了正确的结果:</p>
^{pr2}$