1

My goal is to take an existing .docx file and convert it, from a Linux command-line, to PDF using docx4j (http://www.docx4java.orghttp://www.docx4java.org). The "getting started" guide (http://www.docx4java.org/svn/docx4j/trunk/docx4j/docs/Docx4j_GettingStarted.html) 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:

java -cp docx4j-2.8.1.jar:log4j-1.2.15.jar org.docx4j.samples.CreatePdf my-file.docx

And I get the error:

Error: Could not find or load main class samples.org.docx4j.samples.CreatePdf

Any help would be greatly appreciated.

brianjcohen
  • 965
  • 2
  • 10
  • 14

1 Answers1

0

The samples are included in 2.8.1. Nothing has changed there, except the name of the sample, which is now ConvertOutPDF

Please try that instead.

btw, the SVN repository has been superseded since May. See docx4j-from-github-in-eclipse

JasonPlutext
  • 15,352
  • 4
  • 44
  • 84