Welcome Guest ( Log In | Register )

Outline · [ Standard ] · Linear+

 VB itextsharp chinese font problem, having problem in showing chinese fonts

views
     
TSwilliamchua8
post Jun 9 2017, 12:26 AM, updated 7y ago

Getting Started
**
Junior Member
88 posts

Joined: May 2012
public iTextSharp.text.Font CreateChineseFont()
{
BaseFont.AddToResourceSearch("iTextAsian.dll");
BaseFont.AddToResourceSearch("iTextAsianCmaps.dll"); //"STSong-Light", "UniGB-UCS2-H",
BaseFont baseFT=BaseFont.CreateFont("STSong-Light", "UniGB-UCS2-H", BaseFont.EMBEDDED);
iTextSharp.text.Font font = new iTextSharp.text.Font(baseFT);
return font;
}

tried adding this paragraph into my code to let my pdf show chinese words, but it says expected class....

as shown in the image below, please help...



Attached thumbnail(s)
Attached Image
dewill
post Jun 20 2017, 02:18 PM

Regular
******
Senior Member
1,716 posts

Joined: Feb 2006


this code, your function seem missing class inside the namespace constructor
plz do refer to your error which indicate missing class

 

Change to:
| Lo-Fi Version
0.0123sec    0.43    6 queries    GZIP Disabled
Time is now: 28th March 2024 - 06:22 PM