here is the sample html i use:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title></title>
<style>
body {
color: #555555;
direction: rtl;
font-family: ariel;
font-size: 12px;
line-height: 20px;
text-align:right;
}
</style>
</head>
<body>
<div class="jWizard" id="jWizard">
<div class="jbox gray" id="jbbpsdf8101">
<div class="jbox-title gray">ORIGINAL CONTENT</div>
<div class="jbox-content">
<div align="center" style="display:block;clear:both;margin:0;padding:
0;">
<table width="100%" cellspacing="0" cellpadding="0" border="0"
style="margin:0;table-layout:fixed;">
<tbody><tr valign="top">
<td width="20%" valign="top" align="right" style=""><div
align="right" style="margin:0;padding:0;;"></td><td width="6"
style="margin:0;padding:0;border-right:1px solid #d1d1d1;"></td><td
width="6" style="margin:0;padding:0;"></td><td width="80%"
valign="top" align="right" style=""><div align="right" style="margin:
0;padding:0;;"><div id="psdf8101"><div style="background:#F9F9F9;">
ืืืื ืืืืขืื ืืื ืืืช ืืืืืืชืืื, ืืืื ืืืฉืื ืืืจื ืฉืื ืืืช ืฆืจืื ืืืืืช. ืื
ืืื ืื ืืฉื ื ืืื ืืกืฃ ื ืืืื ืืืฉืงืืข, ืืืืงื ื ืืืืื ืืื ืืช ืืืืฉืจื, ืืืืข
ืืืงืฆืืขื, ืืืื ืื ืืกืืื ืืช ืืชืื ื ืืื ืืืคืก - ืืืื ืืืงืจืื ืืืื ืื ื ืืขืืืคืื
ืืฉืืืจ ืืงืฆืืขื ืื ืืชืืื ืฉืืกืืืขื ืื ื ืืืฉืืื.
ืฆืจืืืื ืืืฆืื ืืืืืื ืืื? ืืขืื ืืื ืื ืืืขืช ืืืคื ืืืฆืื ืจืฉืชืืช ืืืืื ืืช?
ืืคื ืืื ืืืืข ืฉืืืื ืืขืืืจ ืืื ืืืืืืืข ืืชืืื.
ืืืจืืืืืช ืืื ืฉื ืืชืืื ืจืื ืืืื ืืฉืจ ื ืืืง ืืืื ืงืืืืจืืืช ืขืืงืจืืืช:
ืืืจืืืืืช ืืื ืืกืช ืืื ืื, ืขืืฆืื ืืืืจืืืืืช ืคื ืื ืืชืืื ืืืจืืืืืช ืื ืืฃ.
ืืฉืืืื ืืจืืฉืื ืื, ืคืื ืื ืืืืจืืื ืืืื ืื, ืฉืืขืฆื ืืช ืืืื ื ืืืืืื ืขื ืืืงืื
ืืฉืื ืื, ืชืื ืืื ืืืฉืื ืขื ืฉืืืื ื ืืื ืืื ืื ืฉืืคื ืืื ืฉืฉืืืืฉื, ืืขืืจื ืืช
ืื ืืชืื ืื ืื ืืฉืจ ืืจืืฉืื ืืื ืืฉื ื, ืืืื ืืื ืืขืจืืืช ืืื, ืืืืืจืืจ, ืืฉืื,
ืชืืืจื ืืื.
ืืืจืืืื ืืคื ืื ืชืคืงืืื ืืืคืื ืืช ืืืืื ืืคื ืืืืื ืฉื ืืื ืืื ืืคืจืงืืืื
ืืืื ื ืืื, ืืืืฆืขืืช ืืืืจืช ืคืจืืื ืืจืืืื, ืืืืื ืืื ืืงืืฉืืืืื
ืืืงืื ืกืืจืืงืืืืืื ืข"ืคื ืืชืคืงืื ืฉื ืืืื ืืืื ื ืืฉืื ืื - ืืืืจืื, ืขืืืื
ืืืืืจ ืืกืืจื ืืขืื.
ืืืกืืฃ, ืืขืฆืื ืื ืืฃ ืื ืืื ืืืืื ืื ืขื ืืชืืืช ืกืืืืชื ืฉื ืืื ืืื ืืชื ืืื ืืฉืื
ืืืืขืืคืืช ืืืงืืืืช - ืืื ืืืืืจืช ืกืื ืงืจืงืข ืืฆืืืืื ืืชืืืืื, ืืืื ืืืืืจืช
ืคืชืจืื ืืช ืืืฆืืจืช ืฆื, ืืฆืืจืช ืคืืฆ'ืจืื ืืืื ืืฆืืืื, ืืฉืืืื ืฉื ืืกืชืืืงื ืขื
ืคืจืงืืืืช.
ืืืคืฉืื ืืืืข ืขื ืืืื ืืช ืืืืืื ืืื?
ืฆืจืืืื ืืงืฆืืขื ืืชืืื ืืืจืืืืงืืืจื? ืฉืืื ืืืืืื ืืงืจืืื ืืฉืคืื ืื ืื ืืืืืื
ืืืืืืฅ ืืื ืขื ืืืจืืื ืืกืืืื ืฉืืฆื ืืื ืืฉืืืจ ืืฉืืจืืช ืืขืืจ.
ืืืื ืืืคืืฉ ืืืฉ ืืงืฆืืข ืืืชืืื, ืืืจื ืืืืื ืืืืชืจ ืืืชืจืฉืืืช ืืื ืืจื ืขืืื
ืืชืืง ืขืืืืืช. ืืื ืืื ืืืกืชืคืง ืจืง ืืื, ืืงืฉื ืืจืืืช ืื ืืกืฃ ืฉืชืืื ืื ืฉืืืฉ
ืขืืืืืช ืืืื ื ืื ืกืืืื ืฉืชืืื ื ื ืขื ืืื ืืืืจืืืืื ืฉืืื ืืชื ืืขืื ืืื ืื.
ืืืกืืฃ, ืืืืขื ืืคืืืฉื ืืฉืืืืื ืจืขืืื ืืช ืืืืืจืื ืืื ืืืคืฉืจ, ืืืื ืืื ืื
ืืืื ืื ืืืชืืืฉ ืืืืคืฉืจ ืืืืฉ ืืืงืฆืืข ืืืฆืืข ืืืืื ืื ืืฉื
ืขืฆืื.
</tr>
</tbody></table>
</div></div></div>
</div>
</body>
</html>
You can download the arial.ttf font from this link
http://www.sipurey.com/dompdf_0-6-0_beta2/dompdf/lib/fonts/arial.ttf
i really apprentice your help.
thanks
Hana
I was trying to look at this function call:
$pdf->addText( $x, $this->y($y)- ($pdf->fonts[$pdf->currentFont]
['FontBBox'][3]*$size)/1000, $size, $text, $angle, $word_space,
$char_space);
at the cpdf_adapter
then i went i looked at the dompdf class.
i think that this might be the clue.The Text is rendered accordingly
to x and y corrdinates from the botton-left of the page, and in a left
to right order.
so, what if we can change to refernce located to botto right and......
i dont know.
Frustrating...
i am investigating it for 2 weeks, looking at the code day and night.
well, i hope you can help me
thanks
Hana
Hi AgainI was trying to look at this function call:
ย ย $pdf->addText( $x, $this->y($y)- ($pdf->fonts[$pdf->currentFont]
['FontBBox'][3]*$size)/1000, ย $size, $text, $angle, $word_space,
$char_space);at the cpdf_adapter
then i went i looked at the dompdf class.
i think that this might be the clue.The Text is rendered accordingly
to x and y corrdinates from the botton-left of the page, and in a left
to right order.
so, what if we can change to refernce located to botto right and......
i dont know.
Frustrating...
i am investigating it for 2 weeks, looking at the code day and night.
well, i hope you can help me
thanks
Hana
Thanks for the corporation ( i really intend to either donate or pay
something in return- i understand the situation)
I set up at this link dompdf installation with the hebrew arial font
http://sipurey.com/dompdf_0-6-0_beta2/dompdf/www/examples.php
in the examples page , at the "other" section there is an html called
"TestHana52.html"
i set there same content with all the text manipulations
the first section is the original content and below that i wrote which
manipulation i did on the text.
Once you press on the PDF link, check the original section which
rendered and you will see the text is written from left to right in
mirrored way (check the letters)
if you need access to the fileserver tell me and i will send you u/p
for access
thanks again
Hana
On Oct 18, 4:10ย am, BrianS <eclecticg...@gmail.com> wrote:
> FYI I'm starting to look at this now. I think you're on the right track for
> a temporary hack. However, I don't think you need go as far as modifying the
> coordinates. You're already forcing text-align: right, so then all we need
> to do is reverse the order of the letters using something like the str_rev()php function. Since the adapter doesn't know anything about the text
if (strtolower($style->direction) == 'rtl') {ย preg_match_all('/./us', $text, $ar);ย $text = join('',array_reverse($ar[0]));}