Converting docx file to pdf
<p>I want to convert word document(docx) to pdf format using apache.poi.xwpf.It convert fine.But cover pages and diagrams not converting.I mention my code following.I want to know what are the jar and how to convert docx to pdf. So please be kind enough to solve my problem.</p>

<pre><code>package javaapplication1;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import org.apache.poi.xwpf.converter.pdf.PdfConverter;
import org.apache.poi.xwpf.converter.pdf.PdfOptions;
import org.apache.poi.xwpf.usermodel.XWPFDocument;



/**
 *
 * @author Manos_T
 */
public class JavaApplication1 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws FileNotFoundException, IOException {
        String filePath = "C:/Users/manos_t/Desktop/777.docx";
        FileInputStream fInputStream = new FileInputStream(new File(filePath));
//        XWPFDocument document = new XWPFDocument(Data.class.getResourceAsStream(filePath));
        XWPFDocument document = new XWPFDocument(fInputStream);

        File outFile = new File("C:/Users/manos_t/Desktop/777.pdf");
        outFile.getParentFile().mkdirs();

        OutputStream out = new FileOutputStream(outFile);
        PdfOptions options = PdfOptions.create().fontEncoding("windows-1250");
        PdfConverter.getInstance().convert(document, out, options);

        System.out.println("Sucess");

    }
}
</code></pre>