Could you please help me write a java code that converts the word docuemnt into PDF? I have to save the generated PDFs also.
I got a code like the below, and i am unable to download the office tools. Can i write a code without downloading the office tools software?
import officetools.OfficeFile; fis = new FileInputStream(new File("test.doc")); FileOutputStream fos = new FileOutputStream(new File("test.pdf")); OfficeFile f = new OfficeFile(fis,"localhost","8100", false); f.replaceAll("aaa","bbb"); f.convert(fos,"pdf");
I would also want to know, what does "OfficeFile" in the code mean? Does it an inbuilt class file or should i create such a class file?
I am a java beginner. Please help out in this.
Thanks in advance.