package wordSamples; import com.qoppa.word.WordDocument; public class WordToPDF { public static void main (String [] args) { try { // Load the document WordDocument wd = new WordDocument ("input.doc"); // Save the document as a PDF file wd.saveAsPDF("output.pdf"); } catch (Throwable t) { t.printStackTrace(); } } }