PDF::Writer and unicode

Hi!

Ok, I know there is (or was) no easy way to do that, but the PDF::Writer
doc says:

If all of the conditions are correct, the following code
should display the Japanese characters[…]

pdf.text("\xfe\xff\x65\xe5\x67\x2c\x8a\x9e")

Well obviously not all conditions are correct in my environment, i don’t
see
any Japanese character, i get “þÿeÃ¥g,Šž” (if my newsgroup client gets it
right).

All i need are three special chars: ş ğ and ç

Is there any way to create a pdf document with these chars using
PDF::Writer?

cheers and thanks

Simon

On 12/2/06, Simon Kröger [email protected] wrote:

Hi!
Ok, I know there is (or was) no easy way to do that, but the PDF::Writer doc says:

If all of the conditions are correct, the following code
should display the Japanese characters[…]

pdf.text(“\xfe\xff\x65\xe5\x67\x2c\x8a\x9e”)

Well obviously not all conditions are correct in my environment, i don’t see
any Japanese character, i get “þÿeåg,Šž” (if my newsgroup client gets it right).

Yes. You won’t, either. The PDF::Writer document is incorrect; I
understand the reason why it won’t, but I haven’t been able to
implement it as of yet. There’s a bit of wedding-related stuff for me
to clean up, but I should be able to get UTF-16 working sometime in
2007.

-austin

Austin Z. wrote:

Yes. You won’t, either. The PDF::Writer document is incorrect; I
understand the reason why it won’t, but I haven’t been able to
implement it as of yet. There’s a bit of wedding-related stuff for me
to clean up, but I should be able to get UTF-16 working sometime in
2007.

-austin

In other words: “no way” ?

That makes me sad, really. Thanks anyway for such a great tool,
it’s a pity i can’t use it.

(The character substitution table doesn’t help me either, right?)

cheers

Simon

Hi,

In [email protected]
“PDF::Writer and unicode” on Sat, 2 Dec 2006 23:45:08 +0900,
Simon Kröger [email protected] wrote:

All i need are three special chars: ş ğ and ç

Is there any way to create a pdf document with these chars using PDF::Writer?

You can do the thing if you use Pango and cairo (Ruby/Pango
and rcairo).

Thanks,

kou

On 12/2/06, Simon Kröger [email protected] wrote:

Austin Z. wrote:

Yes. You won’t, either. The PDF::Writer document is incorrect; I
understand the reason why it won’t, but I haven’t been able to
implement it as of yet. There’s a bit of wedding-related stuff for me
to clean up, but I should be able to get UTF-16 working sometime in
2007.
In other words: “no way” ?

No, “not yet.”

The tools to do this within PDF::Writer don’t yet exist and I will not
be adding them until sometime in the new year (I’ve had a far more
important project this year, and I’m merely one week after the event).

(The character substitution table doesn’t help me either, right?)

It can, sort of. You won’t get Japanese out of it, but there’s a patch
out there for PDF::Writer 1.1.3 (I have not integrated it into my code
because it changes a few things that I’m not comfortable changing for
future directions, at least the way they were changed) that will allow
you to use particular Japanese fonts in specific code pages. It works,
and it works amazingly well. But it’s not going to be Unicode.

I’m not going to put timelines on any of this right now, but my first
order of business is to fix a few outstanding bugs (that’s PDF::Writer
1.1.4) long overdue for fixes. I hope that the author of the Japanese
patch will work with me shortly thereafter for a monkeypatch version
of his code so that his code can simply extend mine. That’s
PDF::Writer 1.1.5.

Then I have some serious decisions to make. When I did the
PDF::Presentation and PDF::SVG code last year, I rewrote some of the
code that generates the objects. This change is not backwards
compatible with PDF::Writer 1.1, but it makes the writing code
cleaner. However, it doesn’t do anything to make creating the objects
from existing PDFs any better. So if I keep that code, which works
well, I’ll spend some time pushing things out that will have to be
rewritten yet again to work with PDF::Reader[1]. Or, I can start
looking at the code I was experimenting with for the “next generation”
of Ruby PDF tools, which is far better for dealing with reading PDFs
but may be a little uglier for creation.

PDF::Writer is most certainly not dead, but as I have had to tell
people all year, getting married is more important to me than anyone’s
PDF projects. I’ve got someone who is willing to help me with some
adjunct code, and I’m certainly interested in taking advantage of his
offer, but before we can move forward with any of this I have to sort
out several other things and even push a couple of other projects out
the door (there is a planned update to Transaction::Simple to
hopefully fix a significant memory leakage and speed up PDF::Writer as
well as make it possible to generate larger tables if necessary).

-austin
[1] I am well aware that someone else has created a project that they
are calling PDF::Reader. As far as I can tell, they have not made
anything that is ultimately compatible with PDF::Writer. It seems to
be a nice project, but it’s not the PDF::Reader that I have been
planning. It doesn’t much matter because when I get around to actually
making this all work, I will probably end up making it a different
name. If I don’t, however, don’t be surprised if there are conflicts
between my PDF::Reader and this other project’s PDF::Reader.