Supported Document Formats
This page lists all the document formats supported by the parsers in Apache Tika 1.13. Follow the links to the various parser class javadocs for more detailed information about each document format and how it is parsed by Tika.
Please note that Apache Tika is able to detect a much wider range of formats than those listed below, this page only documents those formats from which Tika is able to extract metadata and/or textual content.
-
Supported Document Formats
- HyperText Markup Language
- XML and derived formats
- Microsoft Office document formats
- OpenDocument Format
- iWorks document formats
- Portable Document Format
- Electronic Publication Format
- Rich Text Format
- Compression and packaging formats
- Text formats
- Feed and Syndication formats
- Help formats
- Audio formats
- Image formats
- Video formats
- Java class files and archives
- Source code
- Mail formats
- CAD formats
- Font formats
- Scientific formats
- Executable programs and libraries
- Crypto formats
- Database formats
- Full list of Supported Formats
HyperText Markup Language
The HyperText Markup Language (HTML) is the lingua franca of the web. Tika uses the TagSouplibrary to support virtually any kind of HTML found on the web. The output from the HtmlParserclass is guaranteed to be well-formed and valid XHTML, and various heuristics are used to prevent things like inline scripts from cluttering the extracted text content.
XML and derived formats
The Extensible Markup Language (XML) format is a generic format that can be used for all kinds of content. Tika has custom parsers for some widely used XML vocabularies like XHTML, OOXML and ODF, but the default DcXMLParser class simply extracts the text content of the document and ignores any XML structure. The only exception to this rule are Dublin Core metadata elements that are used for the document metadata.
Microsoft Office document formats
Microsoft Office and some related applications produce documents in the generic OLE 2 Compound Document and Office Open XML (OOXML) formats. The older OLE 2 format was introduced in Microsoft Office version 97 and was the default format until Office version 2007 and the new XML-based OOXML format. The OfficeParser and OOXMLParser classes use Apache POI libraries to support text and metadata extraction from both OLE2 and OOXML documents.
Old, pre-OLE2 Excel files (Excel 2, 3 and 4) are handled by the OldExcelParser.
OpenDocument Format
The OpenDocument format (ODF) is used most notably as the default format of the OpenOffice.org office suite. The OpenDocumentParser class supports this format and the earlier OpenOffice 1.0 format on which ODF is based.
iWorks document formats
The various iWorks document formats (Numbers, Pages, Keynote) are supported by theIWorkPackageParser class, which extracts text and metadata.
Portable Document Format
The PDFParser class parsers Portable Document Format (PDF) documents using the Apache PDFBoxlibrary.
Electronic Publication Format
The EpubParser class supports the Electronic Publication Format (EPUB) used for many digital books.
The FictionBookParser class supports the xml-based Fiction Book publishing format.
Rich Text Format
The RTFParser class uses the standard javax.swing.text.rtf feature to extract text content from Rich Text Format (RTF) documents.
Compression and packaging formats
Tika uses the Commons Compress library to support various compression and packaging formats. TheCompressorParser class handles parsing of the top level compression formats, then PackageParserclass and its subclasses parse the packaging formats and then pass the unpacked document streams to a second parsing stage using the parser instance specified in the parse context. Formats supported include Tar, AR, CPIO, Zip, 7Zip, Gzip, BZip2, XZ and Pack200.
Additionally, the RARParser class supports the RAR archive format, which isn't supported by Commons Compress.
Text formats
Extracting text content from plain text files seems like a simple task until you start thinking of all the possible character encodings. The TXTParser class uses encoding detection code from theICU project to automatically detect the character encoding of a text document.
Feed and Syndication formats
The FeedParser class supports the RSS and Atom feed syndication formats.
The IptcAnpaParser class supports the IPTC ANPA News Wire feed format.
Help formats
The ChmParser class supports the CHM Help format.
Audio formats
Tika can detect several common audio formats and extract metadata from them. Even text extraction is supported for some audio files that contain lyrics or other textual content. Extracted metadata includes sampling rates, channels, format information, artists, titles etc. The AudioParser andMidiParser classes use standard javax.sound features to process simple audio formats. The Mp3Parserclass adds support for the widely used MP3 format, and the MP4Parser class provides it for MP4 audio. The Ogg family of audio formats (Vorbis, Speex, Opus, Flac etc) are supported by theVorbisParser, OpusParser, SpeexParser and FlacParser classes.
Image formats
The ImageParser class uses the standard javax.imageio feature to extract simple metadata from image formats supported by the Java platform, such as PNG, GIF and BMP. More complex image metadata is available through the JpegParser class and TiffParser classes that uses the metadata-extractor library to supports Exif metadata extraction from Jpeg and Tiff images. The PSDParser class extracts metadata from PSD images. The BPGParser class extracts simple metadata from BPG (Better Portable Graphics) images. The WebPParser class extracts simple metadata from WebP image format. The ICNSParser class extracts simple metadata from the Apple ICNS icon image format.
When extracting from images, it is also possible to chain in Tesseract via the TesseractOCRParserto have OCR performed on the contents of the image.
Video formats
Tika supports the Flash video format using a simple parsing algorithm implemented in the FLVParserclass.
The MP4 family of video formats (MP4, Quicktime, 3GPP etc) is supported by the MP4Parser class, which extracts metadata on the video, along with audio stream (if present).
For the Ogg family of video formats, a limited amount of metadata is extracted by the OggParserclass. There is also an experimental TheoraParser class which extracts only limited metadata, pending a consensus on the "right" way to return metadata for audio streams along with the video metadata.
As an alternative to the metadata-focused parsers above, the PooledTimeSeriesParser can be used (if the required tool is installed) to generate a numeric representation of the video suitable for similarity searches. More details on this approach, and setup instructions for the parser + tool, can be found on the Tika wiki page for the parser.
Java class files and archives
The ClassParser class extracts class names and method signatures from Java class files, and theZipParser class supports also jar archives.
Source code
The SourceCodeParser class handles a number of source code formats, including Java, C, C++ and Groovy. It provides a formatted form of the code, along with some simple metadata.
Mail formats
The MboxParser can extract email messages from the mbox format used by many email archives and Unix-style mailboxes.
The RFC822Parser can process single email messages in the RFC 822 format used by many email clients in their archives / exports.
The OutlookPSTParser can extract email messages from the Microsoft Outlook PST email format.
The OutlookExtractor (part of OfficeParser) is able to extract email messages from the Microsoft Outlook MSG email format.
The TNEFParser can extract email attachments from the Microsoft TNEF (Transport Neutral Encoding Format, aka Winmail.dat) used with some Microsoft email clients.
CAD formats
The DWGParser can extract simple metadata from the DWG CAD format.
Font formats
The TrueTypeParser class can extract simple metadata from the TrueType font format. TheAdobeFontMetricParser class does something similar for Adobe Font Metrics files.
Scientific formats
The DIFParser is able to extract attribute metadata from the GCMD Directory Interchange Format (DIF) scientific file format.
The GDALParser is able to extract attribute metadata from the GDAL scientific file format.
The GeographicInformationParser is able to extract attribute metadata from the ISO-19139 georgraphic information file format.
The GeoParser is makes use of a pre-built collection of a geographic gazetteer, to resolve geographic entities into their positions into the metadata
The GribParser is able to extract attribute metadata from the Grib scientific file format.
The HDFParser is able to extract attribute metadata from the HDF scientific file format.
The ISArchiveParser is able to extract attribute metadata from the ISA-Tab (ISA Tools) family of scientific file formats.
The NetCDFParser is able to extract attribute metadata from the NetCDF scientific file format.
The MatParser is able to extract attribute metadata from the Matlab scientific file format.
Executable programs and libraries
The ExecutableParser can extract metadata information on platforms, architectures and types from a range of executable formats and libraries, such as Windows Executables and Linux / BSD programs and libraries.
Crypto formats
The Pkcs7Parser is able to parse the contents of PKCS7 signed messages, but doesn't include any information from the outer PKCS7 wrapper.
Database formats
The SQLite3Parser is able to extract content from SQLite3 files, in a tabular form. However, it requires that the is manually added to the classpath first, as that binary jar isn't shipped as standard.
The JackcessParser is able to extract metadata and content in a tabular form, from Microsoft Access database files.
Full list of Supported Formats
- org.apache.tika.parser.asm.ClassParser
- application/java-vm
- org.apache.tika.parser.audio.AudioParser
- audio/x-wav
- audio/basic
- audio/x-aiff
- org.apache.tika.parser.audio.MidiParser
- application/x-midi
- audio/midi
- org.apache.tika.parser.chm.ChmParser
- application/vnd.ms-htmlhelp
- application/x-chm
- application/chm
- org.apache.tika.parser.code.SourceCodeParser
- text/x-c++src
- text/x-groovy
- text/x-java-source
- org.apache.tika.parser.crypto.Pkcs7Parser
- application/pkcs7-signature
- application/pkcs7-mime
- org.apache.tika.parser.dif.DIFParser
- application/dif+xml
- org.apache.tika.parser.dwg.DWGParser
- image/vnd.dwg
- org.apache.tika.parser.epub.EpubParser
- application/x-ibooks+zip
- application/epub+zip
- org.apache.tika.parser.executable.ExecutableParser
- application/x-msdownload
- application/x-sharedlib
- application/x-elf
- application/x-object
- application/x-executable
- application/x-coredump
- org.apache.tika.parser.external.ExternalParser
- video/avi
- video/mpeg
- video/x-msvideo
- org.apache.tika.parser.feed.FeedParser
- application/atom+xml
- application/rss+xml
- org.apache.tika.parser.font.AdobeFontMetricParser
- application/x-font-adobe-metric
- org.apache.tika.parser.font.TrueTypeParser
- application/x-font-ttf
- org.apache.tika.parser.gdal.GDALParser
- application/x-gsc
- image/x-ozi
- application/x-pds
- image/eir
- application/x-usgs-dem
- application/aaigrid
- application/x-bag
- application/elas
- application/x-rs2
- application/x-tsx
- application/x-lcp
- image/geotiff
- application/x-mbtiles
- application/x-cappi
- application/x-netcdf
- application/x-gsag
- application/x-epsilon
- application/x-ace2
- application/jaxa-pal-sar
- image/x-pcraster
- application/x-msgn
- image/arg
- application/x-hdf
- image/x-mff
- application/x-kro
- image/x-hdf5-image
- image/x-dimap
- image/x-srp
- image/big-gif
- application/x-envi
- application/x-cosar
- application/x-ntv2
- image/bmp
- application/x-doq2
- application/x-bt
- application/x-kml
- application/x-gmt
- application/x-rst
- application/vrt
- application/pcisdk
- application/x-ctg
- application/x-e00-grid
- application/x-rik
- image/ida
- image/x-mff2
- application/sdts-raster
- application/x-snodas
- image/jp2
- image/sar-ceos
- application/terragen
- application/x-wcs
- application/leveller
- application/x-ingr
- application/x-gtx
- image/sgi
- application/x-pnm
- image/raster
- application/fits
- application/x-r
- image/gif
- application/x-envi-hdr
- application/x-http
- application/x-rmf
- application/x-ecrg-toc
- application/aig
- application/x-rpf-toc
- image/adrg
- application/x-srtmhgt
- application/x-generic-bin
- application/jdem
- image/x-airsar
- application/x-webp
- application/x-ngs-geoid
- application/x-pcidsk
- image/x-fujibas
- application/x-wms
- application/x-map
- image/ceos
- application/xpm
- application/x-zmap
- image/envisat
- application/x-ers
- application/x-doq1
- application/x-isis2
- application/x-nwt-grd
- application/x-ppi
- image/ilwis
- application/x-isis3
- application/x-nwt-grc
- application/x-blx
- application/gff
- application/x-ndf
- image/jpeg
- application/x-geo-pdf
- application/x-l1b
- image/fit
- application/x-gsbg
- application/x-sdat
- application/x-ctable2
- application/x-grib
- application/x-coasp
- application/x-dipex
- application/grass-ascii-grid
- image/fits
- application/x-til
- application/x-dods
- image/png
- application/x-gxf
- application/x-gs7bg
- application/x-cpg
- application/x-lan
- application/x-xyz
- image/bsb
- application/x-p-aux
- application/dted
- application/x-rasterlite
- image/nitf
- image/hfa
- application/x-fast
- application/x-los-las
- org.apache.tika.parser.geo.topic.GeoParser
- application/geotopic
- org.apache.tika.parser.geoinfo.GeographicInformationParser
- text/iso19139+xml
- org.apache.tika.parser.grib.GribParser
- application/x-grib2
- org.apache.tika.parser.hdf.HDFParser
- application/x-hdf
- org.apache.tika.parser.html.HtmlParser
- text/html
- application/vnd.wap.xhtml+xml
- application/x-asp
- application/xhtml+xml
- org.apache.tika.parser.image.BPGParser
- image/bpg
- image/x-bpg
- org.apache.tika.parser.image.ICNSParser
- image/icns
- org.apache.tika.parser.image.ImageParser
- image/png
- image/vnd.wap.wbmp
- image/bmp
- image/x-xcf
- image/gif
- image/x-icon
- image/x-ms-bmp
- org.apache.tika.parser.image.PSDParser
- image/vnd.adobe.photoshop
- org.apache.tika.parser.image.TiffParser
- image/tiff
- org.apache.tika.parser.image.WebPParser
- image/webp
- org.apache.tika.parser.iptc.IptcAnpaParser
- text/vnd.iptc.anpa
- org.apache.tika.parser.isatab.ISArchiveParser
- application/x-isatab
- org.apache.tika.parser.iwork.IWorkPackageParser
- application/vnd.apple.keynote
- application/vnd.apple.iwork
- application/vnd.apple.numbers
- application/vnd.apple.pages
- org.apache.tika.parser.jpeg.JpegParser
- image/jpeg
- org.apache.tika.parser.mail.RFC822Parser
- message/rfc822
- org.apache.tika.parser.mat.MatParser
- application/x-matlab-data
- org.apache.tika.parser.mbox.MboxParser
- application/mbox
- org.apache.tika.parser.mbox.OutlookPSTParser
- application/vnd.ms-outlook-pst
- org.apache.tika.parser.microsoft.JackcessParser
- application/x-msaccess
- org.apache.tika.parser.microsoft.OfficeParser
- application/x-tika-msoffice-embedded; format=ole10_native
- application/msword
- application/vnd.visio
- application/vnd.ms-project
- application/x-tika-msworks-spreadsheet
- application/x-mspublisher
- application/vnd.ms-powerpoint
- application/x-tika-msoffice
- application/sldworks
- application/x-tika-ooxml-protected
- application/vnd.ms-excel
- application/vnd.ms-outlook
- org.apache.tika.parser.microsoft.OldExcelParser
- application/vnd.ms-excel.workspace.3
- application/vnd.ms-excel.workspace.4
- application/vnd.ms-excel.sheet.2
- application/vnd.ms-excel.sheet.3
- application/vnd.ms-excel.sheet.4
- org.apache.tika.parser.microsoft.TNEFParser
- application/vnd.ms-tnef
- application/x-tnef
- application/ms-tnef
- org.apache.tika.parser.microsoft.ooxml.OOXMLParser
- application/vnd.ms-word.document.macroenabled.12
- application/vnd.ms-excel.addin.macroenabled.12
- application/x-tika-ooxml
- application/vnd.openxmlformats-officedocument.wordprocessingml.template
- application/vnd.ms-powerpoint.addin.macroenabled.12
- application/vnd.openxmlformats-officedocument.spreadsheetml.template
- application/vnd.openxmlformats-officedocument.wordprocessingml.document
- application/vnd.openxmlformats-officedocument.presentationml.template
- application/vnd.ms-powerpoint.slideshow.macroenabled.12
- application/vnd.openxmlformats-officedocument.presentationml.presentation
- application/vnd.ms-powerpoint.presentation.macroenabled.12
- application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
- application/vnd.openxmlformats-officedocument.presentationml.slideshow
- application/vnd.ms-excel.template.macroenabled.12
- application/vnd.ms-excel.sheet.macroenabled.12
- application/vnd.ms-word.template.macroenabled.12
- org.apache.tika.parser.mp3.Mp3Parser
- audio/mpeg
- org.apache.tika.parser.mp4.MP4Parser
- video/x-m4v
- application/mp4
- video/3gpp
- video/3gpp2
- video/quicktime
- audio/mp4
- video/mp4
- org.apache.tika.parser.netcdf.NetCDFParser
- application/x-netcdf
- org.apache.tika.parser.odf.OpenDocumentParser
- application/x-vnd.oasis.opendocument.presentation
- application/vnd.oasis.opendocument.chart
- application/x-vnd.oasis.opendocument.text-web
- application/x-vnd.oasis.opendocument.image
- application/vnd.oasis.opendocument.graphics-template
- application/vnd.oasis.opendocument.text-web
- application/x-vnd.oasis.opendocument.spreadsheet-template
- application/vnd.oasis.opendocument.spreadsheet-template
- application/vnd.sun.xml.writer
- application/x-vnd.oasis.opendocument.graphics-template
- application/vnd.oasis.opendocument.graphics
- application/vnd.oasis.opendocument.spreadsheet
- application/x-vnd.oasis.opendocument.chart
- application/x-vnd.oasis.opendocument.spreadsheet
- application/vnd.oasis.opendocument.image
- application/x-vnd.oasis.opendocument.text
- application/x-vnd.oasis.opendocument.text-template
- application/vnd.oasis.opendocument.formula-template
- application/x-vnd.oasis.opendocument.formula
- application/vnd.oasis.opendocument.image-template
- application/x-vnd.oasis.opendocument.image-template
- application/x-vnd.oasis.opendocument.presentation-template
- application/vnd.oasis.opendocument.presentation-template
- application/vnd.oasis.opendocument.text
- application/vnd.oasis.opendocument.text-template
- application/vnd.oasis.opendocument.chart-template
- application/x-vnd.oasis.opendocument.chart-template
- application/x-vnd.oasis.opendocument.formula-template
- application/x-vnd.oasis.opendocument.text-master
- application/vnd.oasis.opendocument.presentation
- application/x-vnd.oasis.opendocument.graphics
- application/vnd.oasis.opendocument.formula
- application/vnd.oasis.opendocument.text-master
- org.apache.tika.parser.pdf.PDFParser
- application/pdf
- org.apache.tika.parser.pkg.CompressorParser
- application/zlib
- application/x-gzip
- application/x-bzip2
- application/x-compress
- application/x-java-pack200
- application/gzip
- application/x-bzip
- application/x-xz
- org.apache.tika.parser.pkg.PackageParser
- application/x-tar
- application/java-archive
- application/x-archive
- application/zip
- application/x-cpio
- application/x-tika-unix-dump
- application/x-7z-compressed
- org.apache.tika.parser.pkg.RarParser
- application/x-rar-compressed
- org.apache.tika.parser.rtf.RTFParser
- application/rtf
- org.apache.tika.parser.txt.TXTParser
- text/plain
- org.apache.tika.parser.video.FLVParser
- video/x-flv
- org.apache.tika.parser.xml.DcXMLParser
- application/xml
- image/svg+xml
- org.apache.tika.parser.xml.FictionBookParser
- application/x-fictionbook+xml
- org.gagravarr.tika.FlacParser
- audio/x-oggflac
- audio/x-flac
- org.gagravarr.tika.OggParser
- audio/ogg
- application/kate
- application/ogg
- video/daala
- video/x-ogguvs
- video/x-ogm
- audio/x-oggpcm
- video/ogg
- video/x-dirac
- video/x-oggrgb
- video/x-oggyuv
- org.gagravarr.tika.OpusParser
- audio/opus
- audio/ogg; codecs=opus
- org.gagravarr.tika.SpeexParser
- audio/ogg; codecs=speex
- audio/speex
- org.gagravarr.tika.TheoraParser
- video/theora
- org.gagravarr.tika.VorbisParser
- audio/vorbis
相关推荐
- **流式处理**:Tika支持处理大文件,无需一次性加载整个文件到内存。 - **集成其他库**:Tika可与其他Java库如Solr、Elasticsearch等集成,实现内容索引或搜索。 5. **示例代码**: ```java import org....
8. **性能优化**:Tika支持批量处理大量文件,这在处理大数据场景下非常有用。通过合理配置和优化,可以提高处理速度并减少内存占用。 9. **错误处理**:在处理损坏或格式不正确的文件时,Tika提供了错误处理机制,...
通过研究tika-1.4源代码,开发者可以学习到如何自定义内容处理器,处理特定格式的文件,或者扩展Tika以支持新的文件格式。此外,源代码中可能还包含了各种实用工具类和示例,帮助开发者快速上手和调试。 总的来说,...
- **可扩展性**:开发者可以通过自定义解析器扩展Tika的功能,以支持新的文件格式。 5. **应用领域**: - **搜索引擎**:Tika可以帮助构建搜索引擎,通过提取文件内容和元数据进行索引。 - **文档管理系统**:在...
1. **Magic Number**:大多数文件格式在其头部都有一些特定的字节序列,称为“魔法数字”。通过比较这些字节与已知文件类型的魔法数字,可以确定文件类型。例如,JPEG文件以`FF D8 FF E0`开始,PDF文件则以`%PDF-`...
使用这个版本的Tika,开发者可以按照指定的依赖和配置将其集成到自己的Java项目中,以便处理和解析指定版本支持的文件格式。 总结起来,Apache Tika是Apache Lucene项目中的关键组件,它提供了一个统一的接口来解析...
如果需要处理现代的文件格式或者更全面的功能,建议升级到较新版本的Tika,如Tika 1.x系列,它们通常会提供更好的性能和更多的文件格式支持。同时,随着技术的发展,新的安全问题可能会被发现,使用较旧版本的库可能...
Tika支持众多文件格式,包括但不限于PDF、DOCX、PPTX、HTML、XML等。在处理大量文档时,Tika可以提供稳定和高效的解决方案。 在标题中提到的"FileCheck_排查损坏文件_tika_",这是一项使用Tika进行文件健康检查的...
它支持多种文件格式,包括但不限于CSV、XML,能够帮助开发者轻松处理不同类型的文档。通过调用Tika的API,我们可以方便地获取文件的MIME类型,甚至解析文件内容。在实际开发中,掌握Tika的使用将极大地提升处理文档...
这可能是为了扩展Tika的默认功能,例如添加对新文件格式的支持,或者为特定业务需求提供定制的元数据提取策略。 3. **构建过程**:构建开源项目通常涉及以下步骤:安装Java Development Kit (JDK)、获取项目源代码...
Apache Tika是一个内容分析工具,主要用于从各种文件格式中提取元数据和文本内容。它内置了多种解析器,能够处理从简单文本到复杂的PDF、Microsoft Office文档等各种格式。Tika的核心组件是`TikaParser`,它通过识别...
它支持众多文件格式,包括常见的文档(如PDF、Word、Excel)、图像、音频和视频等。Tika的核心在于其解析器,它们能够将不同文件格式的内容转换成统一的API输出。 **Python库tika** 在Python中使用tika-1.13,首先...
由于Tika支持的文件格式广泛,因此在处理多样化的文档输入时,它是一个非常实用的工具。 总的来说,这个压缩包提供的资源涵盖了从源代码到可执行应用程序的所有要素,对于开发者来说,无论是学习Tika的内部机制,...
此外,如果你想要扩展Tika,添加对新文件格式的支持,源代码包是不可或缺的资源。 总的来说,"apache-tika-1.0-src.zip"是学习和定制Tika的重要资料,可以帮助开发者深入理解其内部机制,从而更好地利用Tika在信息...
6. **可扩展性**:Tika的设计允许添加自定义解析器,以便处理新的或特定的文件格式。 在"apache-tika-0.8-src"源代码中,你可以找到以下几个关键部分: - **Parsers**: 这里包含了各种解析器的实现,每个解析器...
3. **内容检测**:Tika支持自动识别文件类型,即使在没有扩展名的情况下也能准确判断,这在处理大量未知格式文件时非常实用。 4. **可扩展性**:Tika设计为模块化,开发者可以通过添加新的解析器来扩展其支持的文件...
Tika是Apache下开源的文档内容解析工具,支持上千种文档格式(如PPT、XLS、PDF)。Tika使用统一的方法对各种类型文件进行内容解析,封装了各种格式解析的内部实现,可用于搜索引擎索引、内容分析、转换等场景。
在IT领域,转换文件格式是一项常见的任务,尤其在处理数据迁移、分析或解析时。本话题将探讨如何将任意文件转换为文本文件并进行还原,这通常涉及到文件的编码、解码以及内容提取过程。首先,我们要理解的是,不是...