[ https://issues.apache.org/jira/browse/PDFBOX-5791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17830705#comment-17830705 ]
Kabir Soneja commented on PDFBOX-5791: -------------------------------------- [~tilman] After adding the above two jars in classpath, I no longer see the error related to decoding the jpeg image but the image being generated has distorted colors for the first page. For reference, I am using the same pdf as mentioned in PDFBOX-5615 and the image being generated for the first page is same as the image reported in the ticket. Classpath has jai-imageio-core-1.3.0 and jai-imageio-jpeg2000-1.4.0 still the image being generated is having distorted colors. What could be missing in this case? > PDFBox CLI unable to read JPEG Image > ------------------------------------ > > Key: PDFBOX-5791 > URL: https://issues.apache.org/jira/browse/PDFBOX-5791 > Project: PDFBox > Issue Type: Bug > Components: Utilities > Affects Versions: 2.0.27 > Reporter: Kabir Soneja > Priority: Major > Attachments: screenshot-1.png > > > 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-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org