f



Missing japanese characters in PDF file

  Hello all,

it's many years ago I've intensivelly worked with Tex, GS, PDF and related =
stuff but never done something with asian CJK fonts.

But today I've a requiremet to put japanese chars in our reports.
All reports were generated by our own specialized .Net Library which worked=
 well.

It's particulary successed, but some characters are not rendered by Adobe R=
eader DC (actually updated).

What I have done is:
1. use one of standard Adobe Fonts "HeiseiMin-W3" which is installed with A=
dobe Reader DC Extended Asian Fonts Pack. This is checked to be sure - font=
 is in right place C:\Program Files (x86)\Adobe\Acrobat Reader\DC\Resource\=
CIDFont\KozMinPr6N-Regular.otf.
2. Reencode Unicode to Big Endian Unicode inside programm code
3. Write /Encoding /UniJIS-UTF16-H. Don't know why but this produce the bes=
t results and likes to me as UniJIS-UTF16-H CMap will be used. Checked: the=
 CMap-file is also installed in right place c:\Program Files (x86)\Adobe\Ac=
robat Reader DC\Resource\CMap\UniJIS-UTF16-H.

Within very simply PDF file.

Following string must be the output:

=E8=A6=8E=E7=BB=A8 =E8=84=82=E9=96=99 xx =E3=82=B9=E3=82=BF=E3=83=BC=E3=82=
=BC=E3=83=B3=E6=A0=AA=E5=BC=8F=E4=BC=9A=E7=A4=BE

But what I see is:

=F4=88=A6=8E=F4=87=BB=A8 =E8=84=82=E9=96=99 xx =E3=82=B9=E3=82=BF=E3=83=BC=
=E3=82=BC=E3=83=B3=E6=A0=AA=E5=BC=8F=E4=BC=9A=E7=A4=BE

The first two are replaced by placeholders

In unicode byte[] =3D=20
{142, 137,   232,126,   32, 0,   ....}

or in big endian unicode byte [] =3D

{137,142   126,232,   0,32,   ....}

In other words the chars =E8=A6=8E=E7=BB=A8 with unicodes pairs {142,137} a=
nd {232,126} are not renderable.

I've particulary overheated my head to put some japanese chars in PDF and w=
as now I'm very unlucky that it does not worked well.

Can somebody, please, help me to resolve this problem?

Here is a link to an example document (without flate encoding for readabili=
ty!)

https://drive.google.com/file/d/0B1tF6IyZkk3ES1BfZ0xfNVVGMHc/view?usp=3Dsha=
ring

P.S. Inside PDF the internal FontName is "Meiryo-H" (simply don't changed!)=
 but the experts know, that has nothing with real font name. Sad here to pr=
event confusion.

My problem is I can't read and understand japanese and I can't even check i=
f some chars are simply missing inside installed Adobe Font.

Many, many thanks in advance!!!

Alex
0
Alexander
6/2/2016 1:25:24 PM
comp.text.pdf 5600 articles. 0 followers. ramon (1518) is leader. Post Follow

1 Replies
180 Views

Similar Articles

[PageSpeed] 44

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 06/02/2016 02:25 PM, Alexander Landa wrote:
> Hello all,
> 
> it's many years ago I've intensivelly worked with Tex, GS, PDF and 
> related stuff but never done something with asian CJK fonts.
> 
> But today I've a requiremet to put japanese chars in our reports.

I wanted a Japanese phrase in my (LaTeX) thesis, so I used the CJK
package:

\documentclass{report}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[encapsulated]{CJK}
\begin{document}
Following string must be the output:
\begin{CJK}{UTF8}{min}覎绨 脂閙 xx スターゼン株式会社\end{CJK}
\end{document}

That works (using pdflatex).

///Peter

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJXVeMTAAoJEHt9ZfbX6inQjEQH/A1zP4a7WyTdd4nV0meI5vt/
SO7mfGyXaYPzpDZXJg6E5+I3Iwkk6pxkz6+5qHDOdncg3uBmoQcotr3LzZPST6yD
BtUr8eOhYdaokg64hUR0whkgtMM132FqORvzNXol4jK2Uw1JRXiiNAikgbgoYwZu
k0QqZQgZa5x/FH0ExPXTIOdww6T6J2krYqmcQk3ffDV+m77EsVeCLlbhWlU6q+11
JzV3AzD0w3yuhqIQIsReI1E9Igjm+HrrJmU2IvG46KLPM/b+UK6RSjmjfR01mos1
KPD3IKJqXRpnB9oOFlyd2Sk8tGmnHzNTMwJZj25g04ZO3VVFSCIP5ZqYBqPORXk=
=m4Ie
-----END PGP SIGNATURE-----
0
Peter
6/6/2016 8:54:43 PM
Reply: