You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Sebastian Weber <se...@hmedia.de> on 2006/09/01 23:57:24 UTC

arabic text

Hi Prakash,
you can download the version of FOP that I use to print Arabic script from
www.anneundsebp.de/fop/fop.html

I hope it works for you. Unfortunately I don't understand Arabic but I know
that there are still some problems with the type setting. Maybe you can
inform me about bugs you'll find.
I'll add some explanations and the source code in a few days.

Regards
Sebastian


Re: arabic text

Posted by Kia Teymourian <ki...@cs.tu-berlin.de>.
Hi Sebastian,

It is good news that you are working on the implementation of 
Bidirectional Algorithm.
As you can read in this thread [1], I’m working also on this task and 
looking for
an independent solution without the usage of java.text.bidi, trying to 
keep it
compatible with JDK 1.3.

I could find some useful codes in iText project [2] and wrote a simple 
class for
Arabic-shaping on Arabic/Persian inline texts.
I wrote a simple fo test file[3] and gave it to my class and done the 
Arabic shaping
and the converting them into Hexadecimals [4]. At the end I created a 
test pdf file [5].

Now I am trying to rewrite the codes from the iText completely for the 
best performance
and find the best place to integrate them into the fop project.
The abrabic shaping is not required for the rtf, text or xml output, it 
is just a problem with pdf, ps,
and pcl.

Please look at these classes in iText project:
com.lowagie.text.pdf.ArabicLigaturizer
com.lowagie.text.pdf.BidiOrder
com.lowagie.text.pdf.BidiLine

I don’t know if you used the java.text.bidi or maybe the java.awt for 
the Arabic shaping, but it
works well with some small bugs,
I created from the same fo file [3] with your arabicfop a pdf file [6] 
and have seen that
there is some connection problems, see the (ALLEF connections, the 
vertical lines to the other words).
Please compare it with [5], and check the presentaion form A/B in Unicode.
This is not a font problem; I tested the same files with your font and 
several other Unicode ttf fonts.

There is some free fonts for Arabic and Persian language(GPL) [7], may 
be we can create some free
Arabic/Persian fonts for fop.

Unfortunately I could get your first email on 4th August, because of 
some problems with the mail server.
About the CTM class and the rl-tb writing mode, in Arabic shaping we 
find the Arabic words in a paragraph,
then find the presentation forms for the chars depending on the position 
of chars in a word (four possibilities)
and at the end we should reverse the Arabic words but not the 
English/Latin words between the Arabic paragraph.
I think we can work together and trying to find a JDK1.3 compatible 
solution.
My aim is to be able to create Persian/Arabic documentation with docbook 
XML.
I am looking forward to your email! (Wenn du willst, kannst du mir auf 
Deutsch schreiben!)

Kind regards,
Kia Teymourian

[1] http://www.mail-archive.com/fop-dev@xmlgraphics.apache.org/msg04325.html
[2] http://www.lowagie.com/iText/
[3] http://user.cs.tu-berlin.de/~kiat/fop/TestSource.fo
[4] http://user.cs.tu-berlin.de/~kiat/fop/TestOutPut.fo
[5] http://user.cs.tu-berlin.de/~kiat/fop/TestOutPut.pdf
[6] http://user.cs.tu-berlin.de/~kiat/fop/your.pdf
[7] http://www.farsiweb.ir/wiki/Persian_fonts

Sebastian Weber schrieb:
> Hi Prakash,
> you can download the version of FOP that I use to print Arabic script from
> www.anneundsebp.de/fop/fop.html
>
> I hope it works for you. Unfortunately I don't understand Arabic but I know
> that there are still some problems with the type setting. Maybe you can
> inform me about bugs you'll find.
> I'll add some explanations and the source code in a few days.
>
> Regards
> Sebastian
>
>
>   


Re: arabic text

Posted by Prakash sen <pr...@gmail.com>.
Hi Sebastian,

Sorry For replying so late. I had used the FOP and is working fine for me.
The arabic text are comming properly. 
The text is comming properly only if we specify the writting mode in block
container other than that if I specify in cell or block it wont work.

The FOP which u had specified is a partial. Actually I m using a java file
to which i am sending xml & xsl fo as byte array & returning a pdf as byte
array It uses Driver class etc for rendering.

Can u please Help or suggest me to resolve this problem.

Thanks & Regards,

Prakash Sen


Sebastian Weber-2 wrote:
> 
> Hi Prakash,
> you can download the version of FOP that I use to print Arabic script from
> www.anneundsebp.de/fop/fop.html
> 
> I hope it works for you. Unfortunately I don't understand Arabic but I
> know
> that there are still some problems with the type setting. Maybe you can
> inform me about bugs you'll find.
> I'll add some explanations and the source code in a few days.
> 
> Regards
> Sebastian
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/writing-mode-and-arabic-text-tf2051509.html#a6185263
Sent from the FOP - Dev forum at Nabble.com.


Re: arabic text

Posted by Prakash sen <pr...@gmail.com>.
Hi Sebastian,

     By using your fop only I am able to print in arabic, Not with the
normal fop.  Noraml fop does not support block container & writting mode.
In the Fop given by you It prints properly only when-
1) If I specify writting-mode="rl-tb" in the blockcontainer
 other than that if I specify in other place like fo:block than the text are
not comming properly.

Using Command Prompt I am able to print It, But Now My Problem is In my
project I am using a java class file in which I send Xml,XSLT and get pdf as
Byte Array (Note: The File is the same which we get in apache to which we
send xml,xslt files).  In this file Driver Class is also used for rendering
to pdf which is not present in your FOP.


Can u please Help or suggest me to solve this problem.

Thanks & Regards,
Prakash Sen
-- 
View this message in context: http://www.nabble.com/writing-mode-and-arabic-text-tf2051509.html#a6319432
Sent from the FOP - Dev forum at Nabble.com.