Viewing PDFs with missing Asian fonts on Android / iOS

426 views
Skip to first unread message

Support

unread,
Mar 8, 2012, 3:14:46 PM3/8/12
to pdfne...@googlegroups.com
Q:
 
Some of the PDF documents with missing CJKV (Chinese, Japanese, Korean, Vietnamese) fonts cannot be displayed correctly on Android / iOS
This happens on Japanese PDFs that do not embed the corresponding font (e.g. MS Gothic).
 
Can PDFTron SDK support to display of such files on mobile devices?
 
--------------------
 
A:
 

PDFNet comes with base 14 fonts (i.e. standard PDF fonts), however these do not include full Unicode set (which could be prohibitive in terms of the file size etc).

 

If your device or application includes extra fonts you can let PDFNet know using PDFNet.AddFontSubst(...) method.

 

PDFNet.addFontSubst("StoneSans-Semibold", " /Fonts/comic.ttf");

PDFNet.addFontSubst(PDFNet.e_Identity, "arialuni.ttf");

PDFNet.addFontSubst(PDFNet.e_Japan1, " Acrobat/Resource/CIDFont/KozMinProVI-Regular.otf");

PDFNet.addFontSubst(PDFNet.e_Japan2, "myfonts/KozMinProVI-Regular.otf");

PDFNet.addFontSubst(PDFNet.e_Korea1, "AdobeMyungjoStd-Medium.otf");

PDFNet.addFontSubst(PDFNet.e_CNS1, "AdobeSongStd-Light.otf");

PDFNet.addFontSubst(PDFNet.e_GB1, "AdobeMingStd-Light.otf");

 

For example, see comments in PDFDraw sample:

  http://www.pdftron.com/pdfnet/samplecode.html#PDFDraw

 

The following font mapping (using standard Windows fonts) works well on many Japanese documents:

 

  <subst name="HGGothicE"         file="Fonts\HGRGE.TTC"/>

  <subst name="HGPGothicE"        file="Fonts\HGRGE.TTC"/>

  <subst name="HGSGothicE"        file="Fonts\HGRGE.TTC"/>

  <subst name="HGGothicM"         file="Fonts\HGRGM.TTC"/>

  <subst name="HGPGothicM"        file="Fonts\HGRGM.TTC"/>

  <subst name="HGSGothicM"        file="Fonts\HGRGM.TTC"/>

  <subst name="HGMaruGothicMPRO"  file="Fonts\HGRSMP.TTF"/>

  <subst name="HGKyokashotai"     file="Fonts\HGRKK.TTC"/>

  <subst name="HGPKyokashotai"    file="Fonts\HGRKK.TTC"/>

  <subst name="HGSKyokashotai"    file="Fonts\HGRKK.TTC"/>

  <subst name="HGGyoshotai"       file="Fonts\HGRGY.TTC"/>

  <subst name="HGPGyoshotai"      file="Fonts\HGRGY.TTC"/>

  <subst name="HGSGyoshotai"      file="Fonts\HGRGY.TTC"/>

  <subst name="HGSeikaishotaiPRO" file="Fonts\HGRSKP.TTF"/>

  <subst name="HGSoeiPresenceEB"  file="Fonts\HGRPRE.TTC"/>

  <subst name="HGPSoeiPresenceEB" file="Fonts\HGRPRE.TTC"/>

  <subst name="HGSSoeiPresenceEB" file="Fonts\HGRPRE.TTC"/>

  <subst name="HGSoeiKakugothicUB" file="Fonts\HGRSGU.TTC"/>

  <subst name="HGPSoeiKakugothicUB" file="Fonts\HGRSGU.TTC"/>

  <subst name="HGSSoeiKakugothicUB" file="Fonts\HGRSGU.TTC"/>

  <subst name="HGSoeiKakupoptai"  file="Fonts\HGRPP1.TTC"/>

  <subst name="HGPSoeiKakupoptai" file="Fonts\HGRPP1.TTC"/>

  <subst name="HGSSoeiKakupoptai" file="Fonts\HGRPP1.TTC"/>

  <subst name="HGMinchoB"         file="Fonts\HGRMB.TTC"/>

  <subst name="HGPMinchoB"        file="Fonts\HGRMB.TTC"/>

  <subst name="HGSMinchoB"        file="Fonts\HGRMB.TTC"/>

  <subst name="HGMinchoE"         file="Fonts\HGRME.TTC"/>

  <subst name="HGPMinchoE"        file="Fonts\HGRME.TTC"/>

  <subst name="HGSMinchoE"        file="Fonts\HGRME.TTC"/>

  <subst name="MSGothic"         file="Fonts\msgothic.ttc"/>

  <subst name="MSPGothic"        file="Fonts\msgothic.ttc"/>

  <subst name="MSUIGothic"        file="Fonts\msgothic.ttc"/>

  <subst name="MSMincho"         file="Fonts\msmincho.ttc"/>

  <subst name="MSPMincho"        file="Fonts\msmincho.ttc"/>

  <subst name="Meiryo"            file="Fonts\meiryo.ttc"/>

  <subst name="MeiryoItalic"     file="Fonts\meiryo.ttc"/>

  <subst name="MeiryoBold"       file="Fonts\meiryob.ttc"/>

  <subst name="MeiryoBoldItalic" file="Fonts\meiryob.ttc"/>

 

 
Reply all
Reply to author
Forward
0 new messages