[ 
https://issues.apache.org/jira/browse/PDFBOX-4681?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16971215#comment-16971215
 ] 

Tilman Hausherr commented on PDFBOX-4681:
-----------------------------------------

I assume he used ExtractImages, and this one needs the extra libraries, 
regardless of the OS. Same problem is also with PDFToImage and PrintPDF and 
PDFDebugger. So either each of these commands would need the additional command 
line that I mentioned, or alternatively link to a new FAQ entry "How can I use 
extra libraries with the command line application?" and then mention "Sometimes 
extra libraries are needed, (see dependencies), in that case we can't call the 
app jar directly, but need to specifiy a classpath call the main method. Add 
the needed jar files into a "lib" subdirectory, then call

{{java -cp "pdfbox-app-n.n.n.jar;lib/*" org.apache.pdfbox.tools.PDFBox command 
extra parameters}}

> doc bug - jpeg2000 support
> --------------------------
>
>                 Key: PDFBOX-4681
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4681
>             Project: PDFBox
>          Issue Type: Wish
>          Components: Documentation
>    Affects Versions: 2.0.17
>         Environment: windows documented above but likely cross platform
>            Reporter: Chris Clark
>            Priority: Major
>
> # PDFs with jpeg2000 fail to extract, even if dependencies documented in 
> [https://pdfbox.apache.org/2.0/dependencies.html] are satisfied. There 
> appears to be an additional dependency on 
> [https://github.com/jai-imageio/jai-imageio-jpeg2000], without it get error:
> {code}
> Nov 09, 2019 11:04:07 AM org.apache.pdfbox.contentstream.PDFStreamEngine 
> operatorException
> SEVERE: Cannot read JPEG2000 image: Java Advanced Imaging (JAI) Image I/O 
> Tools are not installed
> {code}
> Additionally for a novice user who is using the command line tool, it is 
> *not* clear how to the use the sample CLI application once the dependencies 
> are satisfied. For example, simply adding the three (3) jar files to the 
> class path is not sufficient, additionally the main jar file needs to be 
> executed without the -jar parameter and the entry classname specified 
> (alternatively the jar file contents need to be merged).
> I found that the following was needed:
>  * jai-imageio-core-1.4.0.jar
>  * jai-imageio-jpeg2000-1.3.0.jar
>  * pdfbox-app-2.0.17.jar
> and then call via:
> {code}
> REM Windows classpath separators used
> java -cp 
> jai-imageio-jpeg2000-1.3.0.jar;jai-imageio-core-1.4.0.jar;pdfbox-app-2.0.17.jar
>    org.apache.pdfbox.tools.PDFBox ExtractImages   TEST.pdf
> {code}
>  Its possible there is a code solution to this but quick fix is to:
>  # document the jpeg2000 dependency as well as the (already) documented JAI 
> Image I/O need
>  # document how to then use these with the sample pdfbox app with an example



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to