Hi
I am getting the subjected Error when trying to convert Excel document to pdf using workbook.save(). I am using JDK1.8 in windows OS. Your help is appreciated.
Regards,
Sathish D
Hi
Hi,
Hi, I am using the same file which came with the aspose example package. I have tried out the following options to fix the issue as prescribed in your forum. Please find the code that I am using to convert the EXCEL to PDF
public class Excel2PDFConversion {
public static void main(String[] args) throws Exception {
// The path to the documents directory.
//Properties props = System.getProperties();
//props.setProperty(“com.aspose.cells.fontdir”, “C://Windows//Fonts”);
System.setProperty(“java.awt.headless”, “true”);
//-DAspose.Cells.Disable=SunFontManager
String dataDir = Utils.getSharedDataDir(Excel2PDFConversion.class) + “loading_saving/”;
Workbook workbook = new Workbook(dataDir + “Book1.xls”);
// Save the document in PDF format
workbook.save(dataDir + “E2PDFC-out.pdf”, SaveFormat.PDF);
// Print message
System.out.println(“Excel to PDF conversion performed successfully.”);
}
}
Hi,
Hi, the error got resolved when I updated the jar to the latest version aspose-cells-16.12.3 from aspose-cells-7.0.0. thanks for you support
Hi,