Nazir LAJDEL wrote:
> An idea comes to me :) perhaps; I have to change the Arabic text to an
> image. That will be easier.


I'm just going to poke my nose in here for a second, as I know l10n and
i18n pretty well. Making images of text just because you haven't got
your character encodings straight is precisely the worst thing you can do.

I'm not sure what you're using to generate the pdfs, but first switch to
unicode then use a font with arabic glyphs; Tahoma is the canonical
example as that's got pretty much everything under the sun (and the full
Arabic character set, properly shaped).

On the off chance that I do need to point out why making bitmaps of the
characters is A Bad Idea(tm):

1. Breaks searching through code
2. Breaks separation of internationalization facilities from
localization files employing them (bye bye code maintainability)
3. Will end up looking horrible (someone somewhere down the line will
use MS Comic; it's a universal constant)
4. Can't select the text in the browser (such as one might need when bug
reporting for example?)
5. Increases page weight (consider: a tiny 5 kb jpg is over 1000 times
as heavy as the 5 character word it might represent)
6. Complicates the life of anyone making a custom page CSS
7. ad infinitum

So:

A: Try just specifying Tahoma. I'm guessing that's all you need to do
B: Having done that, try specifying that the generated pdf should embed
fonts used (or outline them, both common pdf generation options)
C: See if there's an encoding configuration parameter for your pdf
library (if A and B above don't work, there's guaranteed to be one;
careful, could be called UTF-8 or Identity-H).

'scuse the rant, images of strings just isn't a good idea.

-------------------------------------------------------------------------
SF.Net email is sponsored by: 
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php

Reply via email to