Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Not A Problem
-
2.0.27
-
None
-
None
Description
Hi,
I am trying to use pdfbox-app jar to execute PDFBox commands through CLI. I am using the CLI to convert PDF to Images. While doing so, for some documents PDFBox app jar is unable to read JPEG2000 Image.
Commands I executed:
java -jar pdfbox-app-2.0.27.jar PDFToImage og-color-doc.pdf
I realized that PDFBox needs additional jars like jai-imageio-core and jai-imageio-jpeg2000 and I tried including these jars in the class path while executing the pdfbox command but I am still running into the same issue. Is there a specific way to ensure that pdfbox-app jar is able to reference the dependencies it needs when I am executing through the CLI?
I have all jars present in lib directory and upon executing this command I am getting an error indicating:
Error: Could not find or load main class org.apache.pdfbox.tools.PDFBox
Caused by: java.lang.ClassNotFoundException: org.apache.pdfbox.tools.PDFBox
Command:
java -cp "pdfbox-app-2.0.27.jar;lib/*" org.apache.pdfbox.tools.PDFBox PDFToImage og-color-doc.pdf
Can you please help me understand how to pass the specific jars/libraries that pdfbox-app needs while using the CLI?