RE: RE: Wide character in print error
"Tim Turner" <[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.pdfapi2 |
|---|---|
| Message-ID | <20070713031826.BYBA8170.ibm69aec.bellsouth.net@SONYXP2003> |
It was not those characters or unicode. It's something with the ttfont()
loading some font files I uploaded to the server. Regardless I am not
getting the wide character error anymore. The PDF can be generated using
the corefonts just fine, with one exception....using "text" calls displays
nothing in the document.
# these types of lines display no text in the PDF
$txt = $page->text ;
$txt->font($headerfont, 18);
$txt->text_center("Your Assumptions are listed here for
ACME$trademark ");
# all of the gfx label calls like this one work fine
$gfx->textlabel(0.5*72,8.4*72,$headerfont,12,"Some text to print");
I'm wondering if we're missing a module or something. The text calls are
not working even when using the corefonts i.e. Helvetica. The gfx calls
work fine using the same fonts as the text calls.
No errors are showing in the error log with regards to this.
-Tim
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Rick Measham
Sent: Thursday, July 12, 2007 10:07 PM
To: [email protected]
Subject: Re: [perl-text-pdf-modules] RE: Wide character in print error
Tim Turner wrote:
> I am outputting codes for trademark, copyright, and a bullet... Maybe
> those are unicode?
1 byte == 0 - 255 == 00 - AF
> $trademark = "\x{2122}";
2122 > AF == multibyte
> $registered_trademark = "\x{ae}";
AE < FF == single byte
> $copyright = "\x{a9}";
A9 < FF == single byte
> $bullet = "\x{2022}";
2022 > AF == mutibyte
So yes, you have multibyte characters in your PDF. Did you check the locale
on each system? I can't remember if anything significant happened to unicode
between 5.8.5 and 5.8.7 .. but I doubt it.
Cheers!
Rick Measham