Forum: Ruby Creation of i18n PDF files (from UTF-8 encoded strings)

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
8a8ba7e85e336beb1304453ef20a7470?d=identicon&s=25 Karel Miarka (kajism)
on 2006-01-29 09:33
Hi,

I have been playing with PDF::Writer for a while, but wasn't able to
force it to display international characters correctly. I have succeed
to display the right characters using select_font diferencies hash, but
this results to invalid character widths which produced overlapped
texts. I have tried to edit the provided .asf files without any
effect/success.

Any help will be welcome.

Thanks in advance,
Karel
31ab75f7ddda241830659630746cdd3a?d=identicon&s=25 Austin Ziegler (Guest)
on 2006-01-29 19:19
(Received via mailing list)
On 29/01/06, Karel Miarka <kajism@yahoo.com> wrote:
> I have been playing with PDF::Writer for a while, but wasn't able to
> force it to display international characters correctly. I have succeed
> to display the right characters using select_font diferencies hash, but
> this results to invalid character widths which produced overlapped
> texts. I have tried to edit the provided .asf files without any
> effect/success.

PDF::Writer only supports limited I18N at this point; it will never
support UTF-8 (the underlying specification does not support UTF-8).

When Unicode support is added, it will be using UTF-16.

-austin
8a8ba7e85e336beb1304453ef20a7470?d=identicon&s=25 Karel Miarka (kajism)
on 2006-01-30 17:02
Austin, thanks for your response.

So is there a chance how to affect the character with by editing the
.asf file?
I mean, I define the in the differences array that 200 will be for
example "Cacute", but this character is wider than the original one with
ascii code 200.

I have tried editing Helvetica.asf file but without success. It seems
that the PDF::Writer code reading the character widths from .asf is
never executed (due to the conditions).

Any advice concerning this?

Thanks in advance,
Karel
This topic is locked and can not be replied to.