Hi Supports,
I am trying to use Rupee symbol in one of my template to generate PDF invoice. But the merged Rupee symbol can't be displayed.
The attached is the template as well as the merge result.
The following is the code I am using. Could you please have a look and give advice? Is it a bug of Aspose lib?
public class SimpleMerge {
public static void main(String[] args) throws Exception {
// TODO Auto-generated method stub
generateDoc("Rupee.doc");
}
private static void generateDoc(String template) throws Exception {
Document doc = new Document(template);
doc.getMailMerge().execute(getDatasourceOne());
String fileName = template + ".doc";
doc.save(fileName, SaveFormat.DOC);
System.out.println(fileName);
}
public static IMailMergeDataSource getDatasourceOne() {
return new IMailMergeDataSource() {
boolean hasNext = true;
public String getTableName() throws Exception {
return "Invoice";
}
public boolean moveNext() throws Exception {
if (hasNext) {
hasNext = !hasNext;
return true;
} else {
return false;
}
}
public boolean getValue(String paramString, Object[] paramArrayOfObject) throws Exception {
//System.out.println("mergefield:" + paramString);
paramArrayOfObject[0] = 200;
return true;
}
public IMailMergeDataSource getChildDataSource(String paramString) throws Exception {
return null;
}
};
}
}
Thanks
TonyRupee.zip (35.0 KB)