You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tika.apache.org by ta...@apache.org on 2021/04/09 13:45:53 UTC

[tika] branch branch_1x updated: TIKA-3350

This is an automated email from the ASF dual-hosted git repository.

tallison pushed a commit to branch branch_1x
in repository https://gitbox.apache.org/repos/asf/tika.git


The following commit(s) were added to refs/heads/branch_1x by this push:
     new 74290b3  TIKA-3350
     new f51a905  Merge remote-tracking branch 'origin/branch_1x' into branch_1x
74290b3 is described below

commit 74290b35e2be1799f162f28508c765625c29cf45
Author: tallison <ta...@apache.org>
AuthorDate: Fri Apr 9 09:45:30 2021 -0400

    TIKA-3350
---
 CHANGES.txt                                                         | 6 ++++++
 .../src/main/java/org/apache/tika/parser/pdf/PDFParser.java         | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/CHANGES.txt b/CHANGES.txt
index d3894c5..4c3464b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,9 @@
+Release 1.27 - ???
+
+   * Tika's PDFParser should use the underlying file if one is passed in
+     via a TikaInputStream (TIKA-3350)
+
+
 Release 1.26 - 03/24/2021
 
    * Fix thread safety bug in OpenOffice parser (TIKA-3334).
diff --git a/tika-parsers/src/main/java/org/apache/tika/parser/pdf/PDFParser.java b/tika-parsers/src/main/java/org/apache/tika/parser/pdf/PDFParser.java
index f5c09ae..9327d3f 100644
--- a/tika-parsers/src/main/java/org/apache/tika/parser/pdf/PDFParser.java
+++ b/tika-parsers/src/main/java/org/apache/tika/parser/pdf/PDFParser.java
@@ -146,7 +146,7 @@ public class PDFParser extends AbstractParser implements Initializable {
             }
             if (tstream != null && tstream.hasFile()) {
                 // File based -- send file directly to PDFBox
-                pdfDocument = getPDDocument(tstream, password, memoryUsageSetting, metadata,
+                pdfDocument = getPDDocument(tstream.getPath(), password, memoryUsageSetting, metadata,
                         context);
             } else {
                 pdfDocument = getPDDocument(new CloseShieldInputStream(stream), password,