1PDF::API2::Resource::CIUDsFeorntC:o:nCtJrKiFbountte(d3P)PDeFr:l:ADPoIc2u:m:eRnetsaotuirocne::CIDFont::CJKFont(3)
2
3
4

NAME

6       PDF::API2::Resource::CIDFont::CJKFont - Deprecated base class for CJK
7       fonts
8

DESCRIPTION

10       This is not the CJK font support you are looking for.  It dates back to
11       the days when Unicode was young and poorly supported.  PDFs created
12       using this class are not portable.
13
14       Instead, use a regular TrueType or OpenType font that includes Unicode
15       support and create your PDF normally:
16
17           use PDF::API2;
18           use utf8;
19
20           my $pdf = PDF::API2->new();
21           my $font = $pdf->font('/path/to/font.ttf');
22           my $page = $pdf->page();
23           my $content = $page->text();
24           $content->font($font, 24);
25
26           # Chinese
27           $content->translate(72, 72 * 9);
28           $content->text('你好');
29
30           # Japanese
31           $content->distance(0, -72);
32           $content->text('こんにちは');
33
34           # Korean
35           $content->distance(0, -72);
36           $content->text('안녕하세요');
37
38           $pdf->save('hello.pdf');
39
40       Note: The maintainer is not familiar with CJK languages and has
41       deprecated this class based on his current understanding of Unicode and
42       from reading many bug reports.  If you are successfully using the CJK
43       support from this class and think it should not be deprecated, please
44       contact him to discuss.
45

DEPRECATED METHODS

47       $font = $class->new($pdf, $cjk_font_name, %options)
48           Returns a CJK font object.  The requested font will not be embedded
49           in the PDF, so it will only be readable on computers that have the
50           font installed.
51
52           Available fonts:
53
54           Chinese (Traditional)
55               Ming, Ming-Bold, Ming-Italic, and Ming-BoldItalic
56
57           Chinese (Simplified)
58               Song, Song-Bold, Song-Italic, and Song-BoldItalic
59
60           Korean
61               MyungJo, MyungJo-Bold, MyungJo-Italic, and MyungJo-BoldItalic
62
63           Japanese (Mincho Serif)
64               KozMin, KozMin-Bold, KozMin-Italic, and KozMin-BoldItalic
65
66           Japanese (Gothic Sans Serif)
67               KozGo, KozGo-Bold, KozGo-Italic, KozGo-BoldItalic
68
69           If the text isn't UTF-8, include an "-encode" option with the
70           encoding to be used.
71
72
73
74perl v5.36.0                      2023-P0D1F-:2:0API2::Resource::CIDFont::CJKFont(3)
Impressum