Aspose.Cells for Android platform exsit chinese charactor problems

Aspose.Cells Version: 8.6.0

Convert a .xls file to PDF exsit Chinese charactor problems. and some table colors changed.
I’m tested english charactor no any question. We need your helps. Thank you very much.

Code:

// example inputFile = "HelloWorld.xls"
Workbook workbook = new Workbook(inputFile); 

// example outputFile = "HelloWorld.pdf"
workbook.save(outputFile,SaveFormat.PDF);

Hi,

Generally your issue regarding Chinese characters might occur due to missing underlying fonts (*.ttf) at your platform. So, you should first copy/ push all those fonts used in your Workbook from e.g “C:\Windows\Fonts” onto a folder (named e.g “fonts)” that you could first create under your device folder e.g “mnt\sdcard” in case when using ADT tools. You should specify the fonts folder in your codes explicitly before opening the Excel file via Aspose.Cells for Android APIs.
e.g
Sample code:

…
public class MainActivity extends Activity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
try{
// …
String sdCardPath = Environment.getExternalStorageDirectory().getPath()+ File.separator;
CellsHelper.setFontDir(sdCardPath + "fonts");

// …
// Open an Excel file
Workbook wb = new Workbook(sdCardPath + strFileName);
…

Regarding your other issue for Table colors, we are not sure about it. Could you provide your template Excel file and output PDF file, we will check your issue soon.

Thank you.

Thank for your helps. This problem has been solved. By the way, Aspose.Word no such interface like “CellsHelper.setFontDir(”/sdcard/fonts"); ".
So. Aspose.Word have font problems and all the data is only one font.
Can you support us?

Details:
https://forum.aspose.com/t/38986

Hi,

Thanks for your inquiry. Please refer to the following articles:

Hope, this helps.

Best regards,