title: docx4j: help converting docx to PDF
body: <p>My goal is to take an existing .docx file and convert it, from a Linux command-line, to PDF using docx4j (<a href="http://www.docx4java.org" rel="nofollow">http://www.docx4java.org</a>http://www.docx4java.org). The "getting started" guide (<a href="http://www.docx4java.org/svn/docx4j/trunk/docx4j/docs/Docx4j_GettingStarted.html" rel="nofollow">http://www.docx4java.org/svn/docx4j/trunk/docx4j/docs/Docx4j_GettingStarted.html</a>) refers to a samples directory that isn't actually included in the latest (2.8.1) package. Regardless, I located the samples directory in their SVN browser, created a 'samples/' subdirectory in my docx4j folder containing all the .jar files, and downloaded the CreatePdf.java file into the samples directory. Then I tried running: </p>
  
  <pre><code>java -cp docx4j-2.8.1.jar:log4j-1.2.15.jar org.docx4j.samples.CreatePdf my-file.docx
  </code></pre>
  
  <p>And I get the error:</p>
  
  <pre><code>Error: Could not find or load main class samples.org.docx4j.samples.CreatePdf
  </code></pre>
  
  <p>Any help would be greatly appreciated.</p>