フィルターのクリア

Extracting text from PDF with extractFileText is not working for some PDF

29 ビュー (過去 30 日間)
mario
mario 2023 年 10 月 17 日
回答済み: Christopher Creutzig 2023 年 12 月 11 日
I am using the extractFileText function to extract text from PDF files but with some files the function returns an empty string.
Through the function pdfinfo, I realized that the PDF files from which extractFileText cannot extract the text have different producer tag than those for which it works. In particular, it seems that extractFileText fails to extract the text in the case where the producer tag is Producer: "iText 2.1.7 by 1T3XT".
No error message is generated; you simply get an empty string.
Can anyone help me? Thank you!
  7 件のコメント
dpb
dpb 2023 年 10 月 18 日
pdfinfo('cs 2023.01.03.pdf')
ans = struct with fields:
NumPages: 40 PageSize: [40×4 double] PDFVersion: "1.4" Title: "" Subject: "" Language: "" Keywords: "" Author: "" Creator: "" Producer: "iText 2.1.7 by 1T3XT" CreationDate: 03-Jan-2023 03:17:20 ModificationDate: 03-Jan-2023 03:17:20 Encrypted: 0 AllowsTextExtraction: 1 Filename: "/users/mss.system.asxxnt/cs 2023.01.03.pdf"
extractFileText('cs 2023.01.03.pdf')
ans = ""
probably confirms identical symptoms you get locally. I did comment to a TMW staff member who responded to another Q? on reading pdf files to make aware of this issue if comes back on the presumption might have a specific interest in MATLAB pdf file functions.
mario
mario 2023 年 10 月 19 日
Thank you

サインインしてコメントする。

回答 (1 件)

Christopher Creutzig
Christopher Creutzig 2023 年 12 月 11 日
This is a known issue in Text Analytics Toolbox. Please watch https://www.mathworks.com/support/bugreports/3155425 for updates.

カテゴリ

Help Center および File ExchangeText Data Preparation についてさらに検索

製品


リリース

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by