You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by "Adrian Bird (Jira)" <ji...@apache.org> on 2026/05/21 09:39:00 UTC

[jira] [Created] (TIKA-4736) tika-app-4.0.0-alpha1 - image extraction fails when using --extract

Adrian Bird created TIKA-4736:
---------------------------------

             Summary: tika-app-4.0.0-alpha1 - image extraction fails when using --extract
                 Key: TIKA-4736
                 URL: https://issues.apache.org/jira/browse/TIKA-4736
             Project: Tika
          Issue Type: Bug
            Reporter: Adrian Bird


Using -z works:
{code:java}
%JAVA_HOME%\bin\java -jar %TIKA_JAR% -z --extract-dir=ImageFiles MyTestFile.pdf {code}
Using --extract fails:
{code:java}
%JAVA_HOME%\bin\java -jar %TIKA_JAR% --extract --extract-dir=ImageFiles MyTestFile.pdf 
Exception in thread "main" org.apache.tika.exception.TikaConfigException: Can't have more than 2 unknown args: [--extract, -o, ImageFiles, MyTestFile.pdf]{code}
If I change the order I get a different error:
{code:java}
%JAVA_HOME%\bin\java -jar %TIKA_JAR% --extract-dir=ImageFiles --extract MyTestFile.pdf 
Exception in thread "main" org.apache.tika.exception.TikaConfigException: Can only set inputDir and outputDir once. Extra args: [--extract, MyTestFile.pdf]

{code}
 

I also noticed that V4 produces an error if you do the extraction more than once, saying the image files already exist, where V3 created multiple files.

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)