Subject: | Cyrillic letters |
1. The following Cyrillic glyphs (names according to http://
www.adobe.com/
devnet/font/pdfs/5013.Cyrillic_Font_Spec.pdf)
afii10047 (uppercase 'Э')
afii10049 (uppercase 'Я')
afii10095 (lowercase 'э')
are not displayed when using TrueType fonts.
I tried different encodings (CP1251, UTF8) with the same result.
2. When using core fonts, all the cyrillics are displayed overlapping
each other with CP1251 encoding, and are not displayed at all with UTF8
encoding.
Perl version v5.10.1 built for MSWin32-x86-multi-thread
Binary build 1007 [291969] provided by ActiveState
Operating system Windows Vista Home Premium, Service Pack 1 (ver.
6.0.6001)
Subject: | test-utf8.pdf |
Message body not shown because it is not plain text.
Subject: | test.pl |
use locale;
use POSIX;
use PDF::Report;
my $encoding = 'cp1251';
POSIX::setlocale($encoding)
or die 'cannot set locale';
my $pdf = new PDF::API2( );
$pdf->mediabox( 'A4' );
my $page = $pdf->page();
my $txt = $page->text;
my $font = $pdf->ttfont('Times.ttf', '-encode' => $encoding );
my $fontsize = 12;
$txt->font($font,$fontsize);
$txt->translate(10,700);
$txt->text("ABCDEFGHIJKLMNOPQRSTUVWXYZ");
$txt->translate(10,650);
$txt->text("abcdefghijklmnopqrstuvwxyz");
$txt->translate(10,600);
$txt->text("àáâãäå¸æçèéêëìíîïðñòóôõö÷øùüûúýþÿ");
$txt->translate(10,550);
$txt->text("ÀÁÂÃÄŨÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÜÛÚÝÞß");
my $font = $pdf->corefont('Times', '-encode' => $encoding );
my $fontsize = 12;
$txt->font($font,$fontsize);
$txt->translate(10,400);
$txt->text("ABCDEFGHIJKLMNOPQRSTUVWXYZ");
$txt->translate(10,350);
$txt->text("abcdefghijklmnopqrstuvwxyz");
$txt->translate(10,300);
$txt->text("àáâãäå¸æçèéêëìíîïðñòóôõö÷øùüûúýþÿ");
$txt->translate(10,250);
$txt->text("ÀÁÂÃÄŨÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÜÛÚÝÞß");
my $font = $pdf->corefont('Times', '-encode' => $encoding );
my $fontsize = 12;
$txt->font($font,$fontsize);
$txt->translate(10,750);
$txt->text("Using true type font:");
$txt->translate(10,450);
$txt->text("Using core font:");
$pdf->saveas( 'test.pdf' );
Subject: | test-cp1251.pdf |
Message body not shown because it is not plain text.