Free Support Forum -

Convert Word PPT and EXCEL File formats to PDF in JAVA using Aspose Cloud APIs

My company is evaluating Aspose Cloud APIs for converting documents from various formats to pdf.

you provide a complete snippet in Java to upload a file from local
computer to the cloud storage, then call the conversion APIs to convert
to PDF?

Please do not send me links to various samples scattered in the online documentation. They are quite confusing and incomplete.



You can download Aspose Cloud SDK for Java from which contains the complete code to upload and convert files e.g. you can use the following code after downloading the SDK to upload any file (Excel file in this case) and convert it PDF.



try {

Folder folder =new Folder();

folder.UploadFile(“C:\Sample.xlsx”, “”);

//Create Converter
converter = new“Sample.xlsx”);

<?xml:namespace prefix = “o” ns = “urn:schemas-microsoft-com:office:office” /><o:p> </o:p>

//Convert Workbook

converter.Save(“D:\Output.pdf”, SaveFormat.PDF);

<o:p> </o:p>


} catch (Exception e) {

// TODO Auto-generated catch block



Upload file code will remain the same however you can use Converter classes from words, slides, cells and pdf folders to convert Word, PowerPoint, Excel and PDF files respectively.

Please let us know if you still find any issue in using the examples.