You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (Jira)" <ji...@apache.org> on 2024/03/25 17:01:00 UTC
[jira] [Commented] (PDFBOX-5791) PDFBox CLI unable to read JPEG Image
[ https://issues.apache.org/jira/browse/PDFBOX-5791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17830599#comment-17830599 ]
Tilman Hausherr commented on PDFBOX-5791:
-----------------------------------------
Maybe your download is broken? The class name is correct. Please download pdfbox-app-2.0.31.jar here
https://pdfbox.apache.org/download.html
Also, depending on what OS you are using, replace ";" with ":".
> PDFBox CLI unable to read JPEG Image
> ------------------------------------
>
> Key: PDFBOX-5791
> URL: https://issues.apache.org/jira/browse/PDFBOX-5791
> Project: PDFBox
> Issue Type: Bug
> Reporter: Kabir Soneja
> Priority: Major
>
> 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:
> {code:java}
> java -jar pdfbox-app-2.0.27.jar PDFToImage og-color-doc.pdf {code}
> 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:
> {code:java}
> java -cp "pdfbox-app-2.0.27.jar;lib/*" org.apache.pdfbox.tools.PDFBox PDFToImage og-color-doc.pdf {code}
> Can you please help me understand how to pass the specific jars/libraries that pdfbox-app needs while using the CLI?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org