# Need pdf gen which is support to Asian languages

**URL:** <https://www.ruby-forum.com/t/need-pdf-gen-which-is-support-to-asian-languages/191271>\
**Category:** Rails\
**Created:** [July 8, 2010, 4:27pm UTC](https://www.ruby-forum.com/t/need-pdf-gen-which-is-support-to-asian-languages/191271 "2010-07-08T16:27:46Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![nirosh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/ce7236/32.png) [@nirosh](https://www.ruby-forum.com/u/nirosh)\
**Post date:** [July 8, 2010, 4:27pm UTC](https://www.ruby-forum.com/t/need-pdf-gen-which-is-support-to-asian-languages/191271/1 "2010-07-08T16:27:46Z")

</div>

which PDF plug-in is support to Asian languages? i tried prawn  
PDF::writer both of those dosen’t workout for me.  
any idea??

-nirosh-

---

<div class="post-metadata">

**Author:** ![nirosh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/ce7236/32.png) [@nirosh](https://www.ruby-forum.com/u/nirosh)\
**Post date:** [July 8, 2010, 6:05pm UTC](https://www.ruby-forum.com/t/need-pdf-gen-which-is-support-to-asian-languages/191271/2 "2010-07-08T18:05:22Z")

</div>

nirosh wrote:

> which PDF plug-in is support to Asian languages? i tried prawn  
> PDF::writer both of those dosen’t workout for me.  
> any idea??

Prawn should support UTF-8 text. It wouldn’t do font fallback last time  
I tried, though, so you need to select a font that actually contains the  
characters you want.

> -nirosh-

Best,

–Â  
Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid

Sent from my iPhone

---

<div class="post-metadata">

**Author:** ![nirosh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/ce7236/32.png) [@nirosh](https://www.ruby-forum.com/u/nirosh)\
**Post date:** [July 9, 2010, 9:00am UTC](https://www.ruby-forum.com/t/need-pdf-gen-which-is-support-to-asian-languages/191271/3 "2010-07-09T09:00:37Z")

</div>

i tried so many time but didn’t get the proper output yet

-nirosh-

---

<div class="post-metadata">

**Author:** ![nirosh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/ce7236/32.png) [@nirosh](https://www.ruby-forum.com/u/nirosh)\
**Post date:** [July 9, 2010, 9:09am UTC](https://www.ruby-forum.com/t/need-pdf-gen-which-is-support-to-asian-languages/191271/4 "2010-07-09T09:09:58Z")

</div>

PrinceXML will do it, but it’s quite expensive (great product with  
excellent support though).

On 09 Jul 2010, at 08:59, nirosh wrote:

> > Prawn should support UTF-8 text. It wouldn’t do font fallback last  
> > time  
> > I tried, though, so you need to select a font that actually  
> > contains the  
> > characters you want.

Best regards

Peter De Berdt

---

<div class="post-metadata">

**Author:** ![nirosh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/ce7236/32.png) [@nirosh](https://www.ruby-forum.com/u/nirosh)\
**Post date:** [July 10, 2010, 1:43pm UTC](https://www.ruby-forum.com/t/need-pdf-gen-which-is-support-to-asian-languages/191271/5 "2010-07-10T13:43:35Z")

</div>

While Prawn does support UTF-8, it doesn’t mean you can print all Asian  
characters.

To print Asian characters you’ll need to have a font (a TTF file if I  
remember it correctly) that supports them and use that with Prawn, I  
don’t think the built in fonts support Asian characters.

---

<div class="post-metadata">

**Author:** ![nirosh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/ce7236/32.png) [@nirosh](https://www.ruby-forum.com/u/nirosh)\
**Post date:** [July 10, 2010, 1:47pm UTC](https://www.ruby-forum.com/t/need-pdf-gen-which-is-support-to-asian-languages/191271/6 "2010-07-10T13:47:40Z")

</div>

i integrate the google indic in my app. So which font i have to use  
to print those characters in prawn. i almost stuck here.

---

<div class="post-metadata">

**Author:** ![nirosh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/ce7236/32.png) [@nirosh](https://www.ruby-forum.com/u/nirosh)\
**Post date:** [July 10, 2010, 3:43pm UTC](https://www.ruby-forum.com/t/need-pdf-gen-which-is-support-to-asian-languages/191271/7 "2010-07-10T15:43:46Z")

</div>

Mark K. wrote:

> While Prawn does support UTF-8, it doesn’t mean you can print all Asian  
> characters.

Yes it does, and you even go on to explain how.

> To print Asian characters you’ll need to have a font (a TTF file if I  
> remember it correctly) that supports them and use that with Prawn, I  
> don’t think the built in fonts support Asian characters.

If that’s so, it’s simply a matter of finding an appropriate font.  
There are lists on the Web of which fonts contain which characters.  
Alan Wood maintains a site with that info and more, though I’m not sure  
it’s up to date. In any case, there are lots of suitable fonts.

---

<div class="post-metadata">

**Author:** ![nirosh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/ce7236/32.png) [@nirosh](https://www.ruby-forum.com/u/nirosh)\
**Post date:** [July 11, 2010, 5:31pm UTC](https://www.ruby-forum.com/t/need-pdf-gen-which-is-support-to-asian-languages/191271/8 "2010-07-11T17:31:06Z")

</div>

Mark K. wrote:

> My previous response was incomplete, let me elaborate.
> 
> While Unicode supports a lot of Asian characters it does not support all  
> Asian characters (they’re working on it).

It supports all Indic, East Asian, and Southeast Asian scripts. The  
only major issue is that there are some lingering questions about  
certain Chinese characters. However, it is perfectly feasible to use  
Unicode for any modern Asian script (including Chinese – the remaining  
issues are not deal-breakers). I do not believe, then, that this is the  
OP’s problem.

–Â  
Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid

Sent from my iPhone

---

<div class="post-metadata">

**Author:** ![nirosh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/ce7236/32.png) [@nirosh](https://www.ruby-forum.com/u/nirosh)\
**Post date:** [July 11, 2010, 8:24am UTC](https://www.ruby-forum.com/t/need-pdf-gen-which-is-support-to-asian-languages/191271/9 "2010-07-11T08:24:54Z")

</div>

My previous response was incomplete, let me elaborate.

While Unicode supports a lot of Asian characters it does not support all  
Asian characters (they’re working on it).  
You can read a bit about it on Wikipedia on  
[Unicode - Wikipedia](http://en.wikipedia.org/wiki/Unicode) and  
[Unicode - Wikipedia](http://en.wikipedia.org/wiki/Unicode#Issues), and you can read about it  
on [unicode.org](http://unicode.org) on these FAQs: [FAQ - Chinese and Japanese](http://www.unicode.org/faq/han_cjk.html)  
and [FAQ - Indic Scripts and Languages](http://www.unicode.org/faq/indic.html)

Yehuda K. also wrote a very informative article on encodings in Ruby:

> **[Encodings, Unabridged](https://yehudakatz.com/2010/05/17/encodings-unabridged/)**
>
> I wrote somewhat extensively about the problem of encodings in Ruby 1.9 in
> general last week.
> 
> For those who didn't read that post, let me start with a quick refresher.
> 
> What's an Encoding?
> An encoding specifies how to take a list of characters (such...

I hope this information is of some use to you.
