----Next_Part(Sun_Mar_19_00_42_18_2006_921)--
Content-Type: Multipart/Mixed;
 boundary-Next_Part(Sun_Mar_19_00_42_18_2006_921)--"

----Next_Part(Sun_Mar_19_00_42_18_2006_921)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi,

In <1142687748.778142.58240 / g10g2000cwb.googlegroups.com>
  "Arabic PDF Reports" on Sat, 18 Mar 2006 22:18:48 +0900,
  "Tobes" <tobin / tobinharris.com> wrote:

> I need to be able to generate PDF reports in Arabic using Ruby, does
> anyone know of any reporting libraries or tools that will let me do
> this?

What about a combination of Ruby/GnomePrint and Ruby/Pango?

I attach two examples:
  * gen-arabic-pdf.rb: a simple example.
    output: http://pub.cozmixng.org/~kou/archives/arabic-sample.pdf

  * gen-m17n-pdf.rb: a general example.
    output: http://pub.cozmixng.org/~kou/archives/m17n-sample.pdf

Thanks,
--
kou

----Next_Part(Sun_Mar_19_00_42_18_2006_921)--
Content-Type: Text/Plain; charset=utf-8
Content-Transfer-Encoding: base64
Content-Disposition: inline; filename="gen-arabic-pdf.rb"

IyEvdXNyL2Jpbi9lbnYgcnVieQ0KDQokS0NPREUgPSAiVVRGLTgiDQoNCnJlcXVpcmUgJ2dub21l
cHJpbnQyJw0KDQpqb2IgPSBHbm9tZTo6UHJpbnRKb2IubmV3DQpqb2IuY29uZmlnWyJQcmludGVy
Il0gPSAiUERGIg0Kam9iLnByaW50X3RvX2ZpbGUoImFyYWJpYy1zYW1wbGUucGRmIikNCmNvbnRl
eHQgPSBqb2IuY29udGV4dA0KDQpjb250ZXh0LmJlZ2luX3BhZ2UgZG8NCiAgeCA9IDI1MA0KICB5
ID0gNTAwDQogIFsiSGVsbG8iLCAi2KfZjtmE2LPZkdmO2YTZjtin2YXZjyDYudmO2YTZjtmK2ZLZ
g9mP2YUiXS5lYWNoIGRvIHx0ZXh0fA0KICAgIGxheW91dCA9IGNvbnRleHQuY3JlYXRlX2xheW91
dA0KICAgIGxheW91dC50ZXh0ID0gdGV4dA0KICAgIGxheW91dC53aWR0aCA9IDcwICogUGFuZ286
OlNDQUxFDQogICAgbGF5b3V0LmNvbnRleHRfY2hhbmdlZA0KDQogICAgY29udGV4dC5tb3ZlX3Rv
KHgsIHkpDQogICAgY29udGV4dC5sYXlvdXQobGF5b3V0KQ0KICAgIHkgLT0gbGF5b3V0LnBpeGVs
X3NpemVbMV0gKyAxMA0KICBlbmQNCmVuZA0KDQpqb2IuY2xvc2UNCmpvYi5wcmludA0K

----Next_Part(Sun_Mar_19_00_42_18_2006_921)--
Content-Type: Text/Plain; charset=utf-8
Content-Transfer-Encoding: base64
Content-Disposition: inline; filename="gen-m17n-pdf.rb"

IyEvdXNyL2Jpbi9lbnYgcnVieQ0KDQokS0NPREUgPSAiVVRGLTgiDQoNCnJlcXVpcmUgJ0VuZ2xp
c2gnDQpyZXF1aXJlICdnbm9tZXByaW50MicNCg0KdGV4dHMgPSBbXQ0KREFUQS5yZWFkLmVhY2gg
ZG8gfGxpbmV8DQogIG5leHQgaWYgL1xBXHMqXHovID1+IGxpbmUNCiAgbGFuZywgaGVsbG8gPSBs
aW5lLmNob3Auc3BsaXQoL1xzKixccyovdSwgMikNCiAgaWYgL1xzKyhcKC4rXCkpXHovdSA9fiBs
YW5nDQogICAgbGFuZywgbmF0aXZlX2xhbmcgPSAkUFJFTUFUQ0gsICQxDQogIGVsc2UNCiAgICBu
YXRpdmVfbGFuZyA9IGxhbmcNCiAgZW5kDQogIHRleHRzIDw8IFtsYW5nLCBuYXRpdmVfbGFuZywg
aGVsbG9dDQplbmQNCg0KaGVhZGVyID0gWyJMYW5ndWFnZSIsICIoTGFuZ3VhZ2UgaW4gdGhlIGxh
bmd1YWdlKSIsICJIZWxsbyBpbiB0aGUgbGFuZ3VhZ2UiXQ0KaGVhZGVyLmNvbGxlY3QhIGRvIHx0
ZXh0fA0KICAiPHNwYW4gY29sb3I9J3JlZCcgc2l6ZT0nbGFyZ2UnPiN7dGV4dH08L3NwYW4+Ig0K
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yEuOya
lA0K

----Next_Part(Sun_Mar_19_00_42_18_2006_921)----
----Next_Part(Sun_Mar_19_00_42_18_2006_921)----