We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Unable to Generate PDF with Licensed version

HI,

We have bought the license version of Aspose total.Can you please help me how to use the license version.

I have used the following code.it is not working.Only Excel is converted to PDF not MsWord..Can you please help. Can you provide any Call center number where we can get support.

Example ex = new Example();

InputStream licenseStream = null;

try{

OutputStream fos = new FileOutputStream(new File("D:\\aspose\\Testfiles\\files\\Aspose test files\\convertedWordExcel12.pdf"));

FileInputStream fis = new FileInputStream(new File("D:\\aspose\\Testfiles\\files\\Aspose test files\\DocuFind_FMEA.xls"));

FileInputStream fis1 = new FileInputStream(new File("D:\\aspose\\Testfiles\\files\\Aspose test files\\sample.doc"));

licenseStream = ex.getStream();

//license for pdf

License lPdf = new License();

lPdf.setLicense(licenseStream);

/*//license for excel

com.aspose.cells.License lCell = new com.aspose.cells.License();

lCell.setLicense(licenseStream);

//license for word

com.aspose.words.License lWord = new com.aspose.words.License();

lWord.setLicense(licenseStream);

//license for pdf kit

com.aspose.pdf.kit.License lPdfKit = new com.aspose.pdf.kit.License();

lPdfKit.setLicense(licenseStream);*/

com.aspose.words.Document doc = new com.aspose.words.Document(fis1);

doc.save(fos, com.aspose.words.SaveFormat.PDF);

Workbook workbook = new Workbook(fis);

workbook.save(fos, com.aspose.cells.SaveFormat.PDF);

}

catch(Exception e){

e.printStackTrace();

}

finally{

if(licenseStream != null)

licenseStream.close();

}

Hi
DocuFind,


Thanks for your inquiry.

You can save MS WORD documents to PDF format by using Aspose.Words component. I would suggest you please read the following tutorials:
http://www.aspose.com/documentation/java-components/aspose.words-for-java/save-a-document.html
http://www.aspose.com/documentation/java-components/aspose.words-for-java/howto-convert-a-document-to-pdf.html

I hope, this will help.

Moreover, you can use these forums, in case you have any queries.

Best Regards,

I have problem with setting the license file.For pdf I am able to set license,unable to set to other document ex:word,Excel can u please help.Same code which is above.

Hi DocuFind,

Sorry for your inconvenience.

Kindly check the following documentation links for details and code snippets as per your requirement.

Excel - How to Set License

Word - How to Set License

Please feel free to contact support in case you need any further assistance.

Thanks & Regards,