While converting docx to PDF i am getting following exception.I added all required jars.
java.lang.NoClassDefFoundError: org/docx4j/openpackaging/packages/WordprocessingMLPackage
Source code is:
String inputfilepath = "c:/temp/DocxToPdfTest.docx";
FileOutputStream fos1=new FileOutputStream(inputfilepath);
fos1.write(byteArr);
fos1.close();
File file = new java.io.File("c:/temp/DoctoPDF2007.docx");
WordprocessingMLPackage wordMLPackage = WordprocessingMLPackage.load(file);
String out="c:/temp/DocxToPdfTest.pdf";
java.io.File temp = new File(out);
OutputStream os = new java.io.FileOutputStream(temp);
wordMLPackage.pdf(os);
os.close();
com.sun.pdfview.PDFViewer pv = new com.sun.pdfview.PDFViewer(true);
pv.openFile(temp);
Please anyone help me where is the problem ..This is urgent for me.
Ramesh.K