Aspose implementing Office to PDF key code:
Jar Package:
Aspose-words-14.6.0.jar
Aspose-cells-10.8.jar
Aspose.slides-14.4.0.jar
Aspose-diagram-2.1.0.jar
Protected void realtransform (inputstream in, outputstream out) throws ioexception { string lowerfilename = This.fileName.toLowerCase (); try { if ((Lowerfilename.endswith (". xls")) | | (Lowerfilename.endswith (". xlsx")) | | (Lowerfilename.endswith (". csv")) { Workbook workbook = new workbook (in); workbook.save (out, 13); } else if ((Lowerfilename.endswith (". Doc")) | | (Lowerfilename.endswith (". docx")) | | (Lowerfilename.endswith (". rtf"))) { Document doc = new document (in); doc.save (out, 40); } else if ((Lowerfilename.endswith (". ppt")) | | (Lowerfilename.endswith (". pptx")) | | (Lowerfilename.endswith (". pps")) | | (Lowerfilename.endswith (". Ppsx")) { presentation ppt = new presentation (in); ppt.save (out, 1); } else if ((Lowerfilename.endswith (". vdx")) | | (Lowerfilename.endswith (". VSX")) | | (Lowerfilename.endswith (". vtx")) | | (Lowerfilename.endswith (". vsd")) { diagram visio = new diagram (in); &nbsP; visio.save (out, 8); } } catch (Exception ex) { throw new runtimeexception (ex); } }
Aspose Implementing Office to PDF