private Paragraph getExtName(String inStr) {
Paragraph simplePara = new Paragraph();
BaseFont bf_name = null;
int i_char = 0;
try {
bf_name = BaseFont.createFont("c:\\windows\\fonts\\mingliu.ttc,1", "Identity-H", BaseFont.NOT_EMBEDDED);
int getCode;
int start=0;
int end=0;
String getstr = "";
for(int j=0;j<inStr.length();j++)
{
getCode = inStr.codePointAt(j);
start=j;
end=start+1;
if(getCode > 65535) {
j++;
end=start+2;
}
getstr = inStr.substring(start, end);
boolean tmpc = bf_name.charExists(getCode);
if(tmpc) {
Chunk Chunkid0 = new Chunk(getstr, font12_name);
simplePara.add(Chunkid0);
i_char++;
} else {
tmpc = bf_name_ext.charExists(getCode);
if(tmpc) {
Chunk Chunkid1 = new Chunk(getstr, font12_name_ext);
simplePara.add(Chunkid1);
i_char++;
}
}
}
} catch (Exception ex) {
i_char = 0;
log.error(ex.toString());
}
if (i_char == 0) {
Phrase simplePhr1 = new Phrase(inStr, font12_name);
simplePara.add(simplePhr1);
}
return simplePara;
}