首页 > 代码库 > Aspose Linux下字体找不到报错
Aspose Linux下字体找不到报错
http://www.aspose.com/community/forums/thread/402193.aspx
http://www.aspose.com/community/forums/thread/362576/aspose-and-fonts-on-linux.cannot-find-font.aspx
Hi,
Thanks for your posting and using Aspose.Cells for Java.
Please try setting java.awt.headless=true before running your code and see if it gets crashed or not.
Please note the red line below.
Java
System.setProperty("java.awt.headless", "true");
CellsHelper.setFontDir(fontDir); //这里应该是字体路径
Workbook book = new Workbook("2.xls");
Worksheet sheet = book.getWorksheets().get(0);
PageSetup pageSetup = sheet.getPageSetup();
pageSetup.setOrder(PrintOrderType.OVER_THEN_DOWN);
book.save("2.pdf");
CellsHelper.setFontDir(fontDir); //这里应该是字体路径
Workbook book = new Workbook("2.xls");
Worksheet sheet = book.getWorksheets().get(0);
PageSetup pageSetup = sheet.getPageSetup();
pageSetup.setOrder(PrintOrderType.OVER_THEN_DOWN);
book.save("2.pdf");
Many Thanks and Kind Regards,
Shakeel Faiz
Support Developer
Aspose Support Team
Aspose - Your File Format APIs
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。