yourself has asked for the wisdom of the Perl Monks concerning the following question:
Hi!
When I use PDF::Create or PDF::API2, I have the problems.
#!/usr/bin/perl use strict; use warnings; use PDF::API2; use Encode; use Encode::CN; use utf8; my $name = encode("euc-cn",'中文'); my $pdf = PDF::API2->open('ns.pdf'); $pdf->saveas("ns001.pdf"); $pdf = PDF::API2->open("ns001.pdf"); my $page = $pdf->openpage(1); $page->mediabox('A4'); my $fnt = $pdf->corefont('Courier'); my $gfx = $page->gfx; $gfx->textlabel(220,690,$fnt,20,$name); $pdf->update;
How can I output the Simplified Chinese Code with Correct 'Encoding'? When I use 'gb2312' or 'utf-8', there has the wrong output.
Thanks!
Code tags added by GrandFather
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to use Simplified Chinese word in the PDF::API2?
by ForgotPasswordAgain (Vicar) on Nov 02, 2006 at 10:24 UTC | |
|
Re: How to use Simplified Chinese word in the PDF::API2?
by Khen1950fx (Canon) on Nov 03, 2006 at 03:25 UTC | |
by Anonymous Monk on Dec 13, 2014 at 10:30 UTC |